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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 12552004: Support bottom-right anchored fixed-position elements during a pinch gesture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: correct translate order. move math to a separate function. Created 7 years, 9 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_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 1ff75b39139762b14c1a1115d2e87d5c412cf2c6..90a2440f28c7de5cfebab2a5b10a20f414ebc6da 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -216,6 +216,15 @@ void LayerTreeImpl::UpdateMaxScrollOffset() {
max_scroll.ClampToMin(gfx::Vector2dF());
root_scroll_layer_->SetMaxScrollOffset(gfx::ToFlooredVector2d(max_scroll));
+
+ gfx::Vector2dF scrollable_viewport_size =
+ gfx::RectF(ScrollableViewportSize()).bottom_right() - gfx::PointF();
+ gfx::Vector2dF original_scrollable_viewport_size =
+ gfx::RectF(layer_tree_host_impl_->VisibleViewportSize()).bottom_right() -
+ gfx::PointF();
+ original_scrollable_viewport_size.Scale(1 / page_scale_factor());
+ root_scroll_layer_->SetFixedContainerSizeDelta(
+ scrollable_viewport_size - original_scrollable_viewport_size);
}
gfx::Transform LayerTreeImpl::ImplTransform() const {

Powered by Google App Engine
This is Rietveld 408576698