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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 1646603004: Move scroll event handlers from layer to layer tree view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_cc_listeners
Patch Set: Rebase Created 4 years, 11 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/page/scrolling/ScrollingCoordinator.cpp
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
index d9e02578a3d7f6f24614f767b0e97a59ad045c8a..3a64da20ff27cc8540beb7a5f16fa4fe72774714 100644
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -680,22 +680,6 @@ void ScrollingCoordinator::willDestroyLayer(PaintLayer* layer)
m_layersWithTouchRects.remove(layer);
}
-void ScrollingCoordinator::updateHaveScrollEventHandlers()
-{
- ASSERT(isMainThread());
- ASSERT(m_page);
- if (!m_page->mainFrame()->isLocalFrame() || !m_page->deprecatedLocalMainFrame()->view())
- return;
-
- // Currently the compositor only cares whether there are scroll handlers anywhere on the page
- // instead on a per-layer basis. We therefore only update this information for the root
- // scrolling layer.
- if (WebLayer* scrollLayer = toWebLayer(m_page->deprecatedLocalMainFrame()->view()->layerForScrolling())) {
- bool haveHandlers = m_page->frameHost().eventHandlerRegistry().hasEventHandlers(EventHandlerRegistry::ScrollEvent);
- scrollLayer->setHaveScrollEventHandlers(haveHandlers);
- }
-}
-
void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons mainThreadScrollingReasons)
{
if (!m_page->mainFrame()->isLocalFrame() || !m_page->deprecatedLocalMainFrame()->view())
@@ -947,7 +931,6 @@ void ScrollingCoordinator::frameViewRootLayerDidChange(FrameView* frameView)
return;
notifyGeometryChanged();
- updateHaveScrollEventHandlers();
}
#if OS(MACOSX)
« no previous file with comments | « third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h ('k') | third_party/WebKit/Source/web/ChromeClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698