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

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.h

Issue 1840113005: Move viewport actions into an ApplyScroll callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase over my own changes Created 4 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: third_party/WebKit/Source/core/input/EventHandler.h
diff --git a/third_party/WebKit/Source/core/input/EventHandler.h b/third_party/WebKit/Source/core/input/EventHandler.h
index c95179c8275da084c2677d8cd8e3b6c9a70b1047..e609398cb78cfdd85b5b99beb27a4c4967532f2d 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.h
+++ b/third_party/WebKit/Source/core/input/EventHandler.h
@@ -240,6 +240,9 @@ public:
String region;
};
+ // TODO(bokan): This seems like it no longer belongs here.
+ void handleOverscroll(const ScrollResult&, const FloatPoint& positionInRootFrame = FloatPoint(), const FloatSize& velocity = FloatSize());
+
private:
static DragState& dragState();
@@ -284,6 +287,8 @@ private:
// delta - The delta to scroll by, in the units of the granularity param
// (e.g. pixels, lines, pages, etc.). These are in a physical
// direction. i.e. Positive is down and right.
+ // position - Where the scroll originated from (e.g. touch location).
+ // velocity - The velocity of the scroll in the case of fling gestures.
// startNode - The node to start the scroll chaining from.
// stopNode - On input, if non-null, the node at which we should stop
// chaining. On output, if provided and a node was scrolled,
@@ -292,7 +297,14 @@ private:
// ScrollResult.didScroll since we might not have scrolled but
// have reached the stopNode and thus don't want to continue
// chaining the scroll.
- ScrollResult physicalScroll(ScrollGranularity, const FloatSize& delta, Node* startNode, Node** stopNode, bool* consumed);
+ ScrollResult physicalScroll(
+ ScrollGranularity,
+ const FloatSize& delta,
+ const FloatPoint& position,
+ const FloatSize& velocity,
+ Node* startNode,
+ Node** stopNode,
+ bool* consumed);
// Performs a chaining logical scroll, within a *single* frame, starting
// from either a provided starting node or a default based on the focused or
@@ -307,8 +319,16 @@ private:
bool logicalScroll(ScrollDirection, ScrollGranularity, Node* startNode = nullptr);
void resetOverscroll(bool didScrollX, bool didScrollY);
- void handleOverscroll(const ScrollResult&, const FloatPoint& positionInRootFrame = FloatPoint(), const FloatSize& velocity = FloatSize());
+ ScrollResult scrollBox(
+ LayoutBox*,
+ ScrollGranularity,
+ const FloatSize& delta,
+ const FloatPoint& position,
+ const FloatSize& velocity,
+ bool* wasRootScroller);
+
+ bool isRootScroller(const Node&) const;
void customizedScroll(const Node& startNode, ScrollState&);
HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active);
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/core/input/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698