Index: Source/core/page/scrolling/ScrollingCoordinator.cpp |
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
index 9065ee3fd29c5bec78e7d5bd0d85ad734b35737c..a0ef870fad59d9896b57570a6e806bd48bd87d5c 100644 |
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp |
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
@@ -352,10 +352,7 @@ bool ScrollingCoordinator::scrollableAreaScrollLayerDidChange(ScrollableArea* sc |
if (scrollLayer) { |
ASSERT(m_page); |
- // With pinch virtual viewport we no longer need to special case the main frame. |
- bool pinchVirtualViewportEnabled = m_page->settings().pinchVirtualViewportEnabled(); |
- bool layerScrollShouldFireGraphicsLayerDidScroll = isForMainFrame(scrollableArea) && !pinchVirtualViewportEnabled; |
- scrollLayer->setScrollableArea(scrollableArea, layerScrollShouldFireGraphicsLayerDidScroll); |
+ scrollLayer->setScrollableArea(scrollableArea, isForViewport(scrollableArea)); |
} |
WebLayer* webLayer = toWebLayer(scrollableArea->layerForScrolling()); |
@@ -851,7 +848,16 @@ void ScrollingCoordinator::frameViewFixedObjectsDidChange(FrameView* frameView) |
bool ScrollingCoordinator::isForMainFrame(ScrollableArea* scrollableArea) const |
{ |
- return m_page->mainFrame()->isLocalFrame() ? scrollableArea == m_page->deprecatedLocalMainFrame()->view() : false; |
+ if (!m_page->mainFrame()->isLocalFrame()) |
+ return false; |
+ |
+ return scrollableArea == m_page->deprecatedLocalMainFrame()->view(); |
+} |
+ |
+bool ScrollingCoordinator::isForViewport(ScrollableArea* scrollableArea) const |
+{ |
+ return isForMainFrame(scrollableArea) |
+ || scrollableArea == &m_page->frameHost().pinchViewport(); |
} |
void ScrollingCoordinator::frameViewRootLayerDidChange(FrameView* frameView) |