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

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: Fix lifetime issue with Internals::m_currentTouchEventRects 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 c446d3689b4dc32f4bc8425bc3d7067e927026c8..0f3f43fb0d46f1585b0f473e4d6c1b69275a9e47 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.h
+++ b/Source/core/page/scrolling/ScrollingCoordinator.h
@@ -98,12 +98,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*);
@@ -128,7 +134,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>);
@@ -139,6 +146,7 @@ private:
ScrollbarMap m_horizontalScrollbars;
ScrollbarMap m_verticalScrollbars;
+ HashSet<TouchEventTargetRectsObserver*> m_touchEventTargetRectsObservers;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698