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

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

Issue 988823003: Use scroll customization primitives for touch scrolling (behind REF). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address rbyers' nit. Created 5 years, 9 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
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.h
diff --git a/Source/core/page/EventHandler.h b/Source/core/page/EventHandler.h
index 0351c0e9a7fb9c43c7ab0749f75a2b92aae9e40d..5c13171ddf0b70b810e16056cd37c718deaab595 100644
--- a/Source/core/page/EventHandler.h
+++ b/Source/core/page/EventHandler.h
@@ -74,6 +74,7 @@ class PlatformWheelEvent;
class LayoutObject;
class ScrollableArea;
class Scrollbar;
+class ScrollState;
class TextEvent;
class VisibleSelection;
class WheelEvent;
@@ -245,7 +246,7 @@ private:
// Scrolls the elements of the DOM tree. Returns true if a node was scrolled.
// False if we reached the root and couldn't scroll anything.
- // direction - The direction to scroll in. If this is a logicl direction, it will be
+ // direction - The direction to scroll in. If this is a logical direction, it will be
// converted to the physical direction based on a node's writing mode.
// granularity - The units that the scroll delta parameter is in.
// startNode - The node to start bubbling the scroll from. If a node can't scroll,
@@ -256,6 +257,8 @@ private:
// absolutePoint - For wheel scrolls - the location, in absolute coordinates, where the event occured.
bool scroll(ScrollDirection, ScrollGranularity, Node* startNode = nullptr, Node** stopNode = nullptr, float delta = 1.0f, IntPoint absolutePoint = IntPoint());
+ void customizedScroll(const Node& startNode, ScrollState&);
+
TouchAction intersectTouchAction(const TouchAction, const TouchAction);
TouchAction computeEffectiveTouchAction(const Node&);
@@ -389,6 +392,10 @@ private:
RefPtrWillBeMember<Node> m_scrollGestureHandlingNode;
bool m_lastGestureScrollOverWidget;
+ // The most recent element to scroll natively during this scroll
+ // sequence. Null if no native element has scrolled this scroll
+ // sequence, or if the most recent element to scroll used scroll
+ // customization.
RefPtrWillBeMember<Node> m_previousGestureScrolledNode;
RefPtrWillBeMember<Scrollbar> m_scrollbarHandlingScrollGesture;
@@ -399,6 +406,15 @@ private:
Timer<EventHandler> m_activeIntervalTimer;
double m_lastShowPressTimestamp;
RefPtrWillBeMember<Element> m_lastDeferredTapElement;
+
+ // Only used with the ScrollCustomization runtime enabled feature.
+ WillBeHeapDeque<RefPtrWillBeMember<Element>> m_currentScrollChain;
+ // True iff some of the delta has been consumed for the current
+ // scroll sequence in this frame, or any child frames. Only used
+ // with ScrollCustomization. If some delta has been consumed, a
+ // scroll which shouldn't propagate can't cause any element to
+ // scroll other than the |m_previousGestureScrolledNode|.
+ bool m_deltaConsumedForScrollSequence;
};
} // namespace blink
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698