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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2096633002: Adds scroll position/scale emulation to DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes issues with visual viewport scroll override, mainFrameSize on scale override, clamps position… Created 4 years, 6 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: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 053ae8028000cff6ff1c0d18d8a862866f76b094..190716778a92be08b827ad10e4c7f2993ae88e12 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2548,6 +2548,12 @@ LayerImpl* LayerTreeHostImpl::FindScrollLayerForDeviceViewportPoint(
*main_thread_scrolling_reasons =
MainThreadScrollingReason::kNotScrollingOnMain;
+ // Falling back to the root scroll layer ensures generation of root overscroll
+ // notifications. The inner viewport layer represents the viewport during
+ // scrolling.
+ if (!layer_impl)
+ layer_impl = InnerViewportScrollLayer();
+
// Walk up the hierarchy and look for a scrollable layer.
LayerImpl* potentially_scrolling_layer_impl = NULL;
if (layer_impl) {
@@ -2580,12 +2586,6 @@ LayerImpl* LayerTreeHostImpl::FindScrollLayerForDeviceViewportPoint(
}
}
}
- // Falling back to the root scroll layer ensures generation of root overscroll
- // notifications while preventing scroll updates from being unintentionally
- // forwarded to the main thread. The inner viewport layer represents the
- // viewport during scrolling.
- if (!potentially_scrolling_layer_impl)
- potentially_scrolling_layer_impl = InnerViewportScrollLayer();
// The inner viewport layer represents the viewport.
if (potentially_scrolling_layer_impl == OuterViewportScrollLayer())
« no previous file with comments | « no previous file | content/browser/devtools/protocol/emulation_handler.h » ('j') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698