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

Unified Diff: Source/core/page/scrolling/ScrollingCoordinator.h

Issue 17471008: Rework compositor touch hit testing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Various fixes and test additions Created 7 years, 5 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/scrolling/ScrollingCoordinator.h
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.h b/Source/core/page/scrolling/ScrollingCoordinator.h
index 925583bf4ee1157d9bd1b9828cda54672eb71a64..cd2acf5f0b1cd760173a43377b5dade9f2ccd23f 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.h
+++ b/Source/core/page/scrolling/ScrollingCoordinator.h
@@ -96,12 +96,18 @@ public:
void updateLayerPositionConstraint(RenderLayer*);
void touchEventTargetRectsDidChange(const Document*);
- void computeAbsoluteTouchEventTargetRects(const Document*, Vector<IntRect>&);
-
static String mainThreadScrollingReasonsAsText(MainThreadScrollingReasons);
String mainThreadScrollingReasonsAsText() const;
Region computeShouldHandleScrollGestureOnMainThreadRegion(const Frame*, const IntPoint& frameLocation) const;
+ class TouchEventTargetRectsObserver {
+ public:
+ virtual void touchEventTargetRectsChanged(const LayerHitTestRects&) = 0;
+ };
+
+ void addTouchEventTargetRectsObserver(TouchEventTargetRectsObserver*);
+ void removeTouchEventTargetRectsObserver(TouchEventTargetRectsObserver*);
+
protected:
explicit ScrollingCoordinator(Page*);
@@ -125,7 +131,8 @@ private:
static WebKit::WebLayer* scrollingWebLayerForScrollableArea(ScrollableArea*);
void setShouldHandleScrollGestureOnMainThreadRegion(const Region&);
- void setTouchEventTargetRects(const Vector<IntRect>&);
+ void setTouchEventTargetRects(const LayerHitTestRects&);
+ void computeTouchEventTargetRects(LayerHitTestRects&);
void setWheelEventHandlerCount(unsigned);
WebKit::WebScrollbarLayer* addWebScrollbarLayer(ScrollableArea*, ScrollbarOrientation, PassOwnPtr<WebKit::WebScrollbarLayer>);
@@ -136,6 +143,7 @@ private:
ScrollbarMap m_horizontalScrollbars;
ScrollbarMap m_verticalScrollbars;
+ HashSet<TouchEventTargetRectsObserver*> m_touchEventTargetRectsObservers;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698