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

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: CR feedback - accumulate LayoutRects instead of IntRects, disable when page isn't composited. Also… 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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/page/scrolling/ScrollingCoordinator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e8e17626b14fdc5257cda6084a26febee1f1881d 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*);
@@ -127,18 +133,22 @@ private:
static WebKit::WebLayer* scrollingWebLayerForScrollableArea(ScrollableArea*);
+ bool touchHitTestingEnabled() const;
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>);
WebKit::WebScrollbarLayer* getWebScrollbarLayer(ScrollableArea*, ScrollbarOrientation);
void removeWebScrollbarLayer(ScrollableArea*, ScrollbarOrientation);
+
typedef HashMap<ScrollableArea*, OwnPtr<WebKit::WebScrollbarLayer> > ScrollbarMap;
ScrollbarMap m_horizontalScrollbars;
ScrollbarMap m_verticalScrollbars;
+ HashSet<TouchEventTargetRectsObserver*> m_touchEventTargetRectsObservers;
};
} // namespace WebCore
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/page/scrolling/ScrollingCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698