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 84744848cfe370946fd1b638d8113ee47e8be747..b18b108ff77057ed634fd81e50903ea0de4da478 100644 |
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp |
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp |
@@ -92,6 +92,7 @@ ScrollingCoordinator::ScrollingCoordinator(Page* page) |
, m_touchEventTargetRectsAreDirty(false) |
, m_shouldScrollOnMainThreadDirty(false) |
, m_wasFrameScrollable(false) |
+ , m_webLayerTreeView(nullptr) |
, m_lastMainThreadScrollingReasons(0) |
{ |
} |
@@ -684,13 +685,10 @@ void ScrollingCoordinator::updateHaveWheelEventHandlers() |
{ |
ASSERT(isMainThread()); |
ASSERT(m_page); |
- if (!m_page->mainFrame()->isLocalFrame() || !m_page->deprecatedLocalMainFrame()->view()) |
+ if (!m_webLayerTreeView) |
return; |
- if (WebLayer* scrollLayer = toWebLayer(m_page->deprecatedLocalMainFrame()->view()->layerForScrolling())) { |
- bool haveHandlers = m_page->frameHost().eventHandlerRegistry().hasEventHandlers(EventHandlerRegistry::WheelEvent); |
- scrollLayer->setHaveWheelEventHandlers(haveHandlers); |
- } |
+ m_webLayerTreeView->setHaveWheelEventHandlers(m_page->frameHost().eventHandlerRegistry().hasEventHandlers(EventHandlerRegistry::WheelEvent)); |
} |
void ScrollingCoordinator::updateHaveScrollEventHandlers() |
@@ -729,6 +727,7 @@ void ScrollingCoordinator::layerTreeViewInitialized(WebLayerTreeView& layerTreeV |
m_programmaticScrollAnimatorTimeline = adoptPtr(Platform::current()->compositorSupport()->createAnimationTimeline()); |
layerTreeView.attachCompositorAnimationTimeline(m_programmaticScrollAnimatorTimeline.get()); |
} |
+ m_webLayerTreeView = &layerTreeView; |
aelias_OOO_until_Jul13
2016/01/27 23:55:46
I don't think we should make ScrollingCoordinator
dtapuska
2016/01/28 16:23:06
Done.
|
} |
void ScrollingCoordinator::willCloseLayerTreeView(WebLayerTreeView& layerTreeView) |
@@ -737,6 +736,7 @@ void ScrollingCoordinator::willCloseLayerTreeView(WebLayerTreeView& layerTreeVie |
layerTreeView.detachCompositorAnimationTimeline(m_programmaticScrollAnimatorTimeline.get()); |
m_programmaticScrollAnimatorTimeline.clear(); |
} |
+ m_webLayerTreeView = nullptr; |
} |
void ScrollingCoordinator::willBeDestroyed() |