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

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

Issue 206603002: Add EventHandlerRegistry (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test for external handlers. Created 6 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
Index: Source/core/page/scrolling/ScrollingCoordinator.h
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.h b/Source/core/page/scrolling/ScrollingCoordinator.h
index 2423b1dfbccbe68cec3f2623172d939961e6770e..0614825ae11c59d045acf7f48c263f25e9fe793f 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.h
+++ b/Source/core/page/scrolling/ScrollingCoordinator.h
@@ -68,9 +68,11 @@ public:
bool needsToUpdateAfterCompositingChange() const { return m_scrollGestureRegionIsDirty || m_touchEventTargetRectsAreDirty || frameViewIsDirty(); }
- // Should be called whenever a wheel event handler is added or removed in the
- // frame view's underlying document.
- void frameViewWheelEventHandlerCountChanged(FrameView*);
+ // Should be called whenever the presence of wheel event handlers in the page changes.
+ void haveWheelEventHandlersChangedForPage();
+
+ // Should be called whenever the presence of scroll event handlers in the page changes.
+ void haveScrollEventHandlersChangedForPage();
// Should be called whenever the slow repaint objects counter changes between zero and one.
void frameViewHasSlowRepaintObjectsDidChange(FrameView*);
@@ -124,7 +126,6 @@ protected:
bool isForMainFrame(ScrollableArea*) const;
- unsigned computeCurrentWheelEventHandlerCount();
GraphicsLayer* scrollLayerForFrameView(FrameView*);
GraphicsLayer* counterScrollingLayerForFrameView(FrameView*);
@@ -136,7 +137,8 @@ protected:
bool m_shouldScrollOnMainThreadDirty;
private:
- void recomputeWheelEventHandlerCountForFrameView(FrameView*);
+ void updateHaveWheelEventHandlers();
+ void updateHaveScrollEventHandlers();
void setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons);
bool hasVisibleSlowRepaintViewportConstrainedObjects(FrameView*) const;
@@ -145,7 +147,6 @@ private:
void setShouldHandleScrollGestureOnMainThreadRegion(const Region&);
void setTouchEventTargetRects(const LayerHitTestRects&);
void computeTouchEventTargetRects(LayerHitTestRects&);
- void setWheelEventHandlerCount(unsigned);
blink::WebScrollbarLayer* addWebScrollbarLayer(ScrollableArea*, ScrollbarOrientation, PassOwnPtr<blink::WebScrollbarLayer>);
blink::WebScrollbarLayer* getWebScrollbarLayer(ScrollableArea*, ScrollbarOrientation);

Powered by Google App Engine
This is Rietveld 408576698