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

Unified Diff: cc/layers/layer_impl.cc

Issue 646623003: Don't scale fixed container adjustment in pinch virtual viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test Created 6 years, 2 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 | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 98923df0a170abeabfd867b594d51ad5aa24296b..9127711e6b73f7c605c79f41e92ab30b0d8ec18b 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -619,6 +619,13 @@ gfx::Vector2dF LayerImpl::FixedContainerSizeDelta() const {
float scale = layer_tree_impl()->page_scale_factor();
gfx::Vector2dF delta_from_scroll = scroll_clip_layer_->bounds_delta();
+
+ // In virtual-viewport mode, we don't need to compensate for pinch zoom or
+ // scale since the fixed container is the outer viewport, which sits below
+ // the page scale.
+ if (layer_tree_impl()->settings().use_pinch_virtual_viewport)
+ return delta_from_scroll;
+
delta_from_scroll.Scale(1.f / scale);
// The delta-from-pinch component requires some explanation: A viewport of
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698