Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1557993002: Add scroll units in GestureEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1963 matching lines...) Expand 10 before | Expand all | Expand 10 after
1974 if (m_gestureAnimation->animate(lastFrameTimeMonotonic)) 1974 if (m_gestureAnimation->animate(lastFrameTimeMonotonic))
1975 scheduleAnimation(); 1975 scheduleAnimation();
1976 else { 1976 else {
1977 ASSERT(m_flingSourceDevice != WebGestureDeviceUninitialized); 1977 ASSERT(m_flingSourceDevice != WebGestureDeviceUninitialized);
1978 WebGestureDevice lastFlingSourceDevice = m_flingSourceDevice; 1978 WebGestureDevice lastFlingSourceDevice = m_flingSourceDevice;
1979 endActiveFlingAnimation(); 1979 endActiveFlingAnimation();
1980 1980
1981 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, 1981 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd,
1982 m_positionOnFlingStart, m_globalPositionOnFlingStart, 1982 m_positionOnFlingStart, m_globalPositionOnFlingStart,
1983 IntSize(), 0, PlatformEvent::NoModifiers, lastFlingSourceDevice == WebGestureDeviceTouchpad ? PlatformGestureSourceTouchpad : PlatformGestureSou rceTouchscreen); 1983 IntSize(), 0, PlatformEvent::NoModifiers, lastFlingSourceDevice == WebGestureDeviceTouchpad ? PlatformGestureSourceTouchpad : PlatformGestureSou rceTouchscreen);
1984 endScrollEvent.setScrollGestureData(0, 0, 0, 0, true, false, -1 /* n ull plugin id */); 1984 endScrollEvent.setScrollGestureData(0, 0, ScrollByPrecisePixel, 0, 0 , true, false, -1 /* null plugin id */);
1985 1985
1986 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS crollEvent); 1986 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS crollEvent);
1987 } 1987 }
1988 } 1988 }
1989 1989
1990 if (!m_page) 1990 if (!m_page)
1991 return; 1991 return;
1992 1992
1993 PageWidgetDelegate::animate(*m_page, lastFrameTimeMonotonic); 1993 PageWidgetDelegate::animate(*m_page, lastFrameTimeMonotonic);
1994 } 1994 }
(...skipping 2633 matching lines...) Expand 10 before | Expand all | Expand 10 after
4628 void WebViewImpl::detachPaintArtifactCompositor() 4628 void WebViewImpl::detachPaintArtifactCompositor()
4629 { 4629 {
4630 if (!m_layerTreeView) 4630 if (!m_layerTreeView)
4631 return; 4631 return;
4632 4632
4633 m_layerTreeView->setDeferCommits(true); 4633 m_layerTreeView->setDeferCommits(true);
4634 m_layerTreeView->clearRootLayer(); 4634 m_layerTreeView->clearRootLayer();
4635 } 4635 }
4636 4636
4637 } // namespace blink 4637 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698