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

Unified Diff: Source/core/page/EventHandler.cpp

Issue 732483003: Remove GestureScrollUpdateWithoutPropagation event (blink) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/events/GestureEvent.cpp ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index b494da3325acd28ce3d7869fbb6448eaecd65c29..6ecc667d868a6afdff0c010586d2ebd440058efd 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -2209,7 +2209,6 @@ bool EventHandler::handleGestureScrollEvent(const PlatformGestureEvent& gestureE
case PlatformEvent::GestureScrollBegin:
return handleGestureScrollBegin(gestureEvent);
case PlatformEvent::GestureScrollUpdate:
- case PlatformEvent::GestureScrollUpdateWithoutPropagation:
return handleGestureScrollUpdate(gestureEvent);
case PlatformEvent::GestureScrollEnd:
return handleGestureScrollEnd(gestureEvent);
@@ -2379,8 +2378,7 @@ bool EventHandler::handleScrollGestureOnResizer(Node* eventTarget, const Platfor
m_offsetFromResizeCorner = LayoutSize(m_resizeScrollableArea->offsetFromResizeCorner(p));
return true;
}
- } else if (gestureEvent.type() == PlatformEvent::GestureScrollUpdate ||
- gestureEvent.type() == PlatformEvent::GestureScrollUpdateWithoutPropagation) {
+ } else if (gestureEvent.type() == PlatformEvent::GestureScrollUpdate) {
if (m_resizeScrollableArea && m_resizeScrollableArea->inResizeMode()) {
m_resizeScrollableArea->resize(gestureEvent, m_offsetFromResizeCorner);
return true;
@@ -2456,6 +2454,8 @@ static bool scrollAreaOnBothAxes(const FloatSize& delta, ScrollableArea& view)
bool EventHandler::handleGestureScrollUpdate(const PlatformGestureEvent& gestureEvent)
{
+ ASSERT(gestureEvent.type() == PlatformEvent::GestureScrollUpdate);
+
FloatSize delta(gestureEvent.deltaX(), gestureEvent.deltaY());
if (delta.isZero())
return false;
@@ -2469,18 +2469,17 @@ bool EventHandler::handleGestureScrollUpdate(const PlatformGestureEvent& gesture
RefPtrWillBeRawPtr<FrameView> protector(m_frame->view());
Node* stopNode = nullptr;
- bool scrollShouldNotPropagate = gestureEvent.type() == PlatformEvent::GestureScrollUpdateWithoutPropagation
- || (gestureEvent.type() == PlatformEvent::GestureScrollUpdate && gestureEvent.preventPropagation());
// Try to send the event to the correct view.
if (passScrollGestureEventToWidget(gestureEvent, renderer)) {
- if (scrollShouldNotPropagate)
+ if (gestureEvent.preventPropagation())
m_previousGestureScrolledNode = m_scrollGestureHandlingNode;
return true;
}
- if (scrollShouldNotPropagate)
+
+ if (gestureEvent.preventPropagation())
stopNode = m_previousGestureScrolledNode.get();
// First try to scroll the closest scrollable RenderBox ancestor of |node|.
@@ -2488,7 +2487,7 @@ bool EventHandler::handleGestureScrollUpdate(const PlatformGestureEvent& gesture
bool horizontalScroll = scroll(ScrollLeft, granularity, node, &stopNode, delta.width());
bool verticalScroll = scroll(ScrollUp, granularity, node, &stopNode, delta.height());
- if (scrollShouldNotPropagate)
+ if (gestureEvent.preventPropagation())
m_previousGestureScrolledNode = stopNode;
if (horizontalScroll || verticalScroll) {
« no previous file with comments | « Source/core/events/GestureEvent.cpp ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698