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

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

Issue 1057603002: Expose scroll customization for touch to JS (behind REF). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix case where documentElement was added to scroll chain twice. Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index a2b496fd310859ff0c1de523d186a44af69d7f01..08fad34d180c0f8e33b04c58c2acab115d353aed 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -206,8 +206,12 @@ void recomputeScrollChain(const LocalFrame& frame, const Node& startNode,
while (curBox && !curBox->isLayoutView()) {
Node* curNode = curBox->node();
// FIXME: this should reject more elements, as part of crbug.com/410974.
- if (curNode && curNode->isElementNode())
- scrollChain.prepend(toElement(curNode));
+ if (curNode && curNode->isElementNode()) {
+ Element* curElement = toElement(curNode);
+ if (curElement == frame.document()->documentElement())
Rick Byers 2015/04/10 14:51:44 why doesn't the documentElement get put on the scr
tdresser 2015/05/08 18:23:02 I've clarified this in a comment. This only matter
+ break;
+ scrollChain.prepend(curElement);
+ }
curBox = curBox->containingBlock();
}
@@ -311,9 +315,8 @@ void EventHandler::clear()
m_targetForTouchID.clear();
m_touchSequenceDocument.clear();
m_touchSequenceUserGestureToken.clear();
- m_scrollGestureHandlingNode = nullptr;
+ clearGestureScrollState();
m_lastGestureScrollOverWidget = false;
- m_previousGestureScrolledNode = nullptr;
m_scrollbarHandlingScrollGesture = nullptr;
m_maxMouseMovedDuration = 0;
m_touchPressed = false;
@@ -2604,7 +2607,7 @@ bool EventHandler::handleGestureScrollEnd(const PlatformGestureEvent& gestureEve
}
}
- clearGestureScrollNodes();
+ clearGestureScrollState();
return false;
}
@@ -2731,7 +2734,7 @@ bool EventHandler::handleGestureScrollUpdate(const PlatformGestureEvent& gesture
return false;
}
-void EventHandler::clearGestureScrollNodes()
+void EventHandler::clearGestureScrollState()
{
m_scrollGestureHandlingNode = nullptr;
m_previousGestureScrolledNode = nullptr;

Powered by Google App Engine
This is Rietveld 408576698