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

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

Issue 584833003: Made double-tap zoom work in pinch virtual viewport mode. (Blink-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix assert Created 6 years, 3 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/page/scrolling/ScrollingCoordinator.h ('k') | Source/platform/graphics/GraphicsLayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.h ('k') | Source/platform/graphics/GraphicsLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698