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

Unified Diff: cc/layers/layer_impl.cc

Issue 641873003: Made top controls work with virtual viewport pinch-to-zoom. (Chromium) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added BoundsForScrolling 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
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 6dfec0e7d71c2069e3666f34d1371dbd275128fc..04144bf9245f681a1408ebdc86f364ceb0257fb7 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -777,6 +777,11 @@ gfx::Size LayerImpl::bounds() const {
bounds_.height() + bounds_delta_.y()));
}
+gfx::SizeF LayerImpl::BoundsForScrolling() const {
danakj 2014/10/10 18:47:15 This is much less scary than changing bounds(), th
+ return gfx::SizeF(bounds_.width() + bounds_delta_.x(),
+ bounds_.height() + bounds_delta_.y());
+}
+
void LayerImpl::SetBounds(const gfx::Size& bounds) {
if (bounds_ == bounds)
return;
@@ -1170,7 +1175,7 @@ gfx::ScrollOffset LayerImpl::MaxScrollOffset() const {
DCHECK(this != layer_tree_impl()->InnerViewportScrollLayer() ||
IsContainerForFixedPositionLayers());
- gfx::SizeF scaled_scroll_bounds(bounds());
+ gfx::SizeF scaled_scroll_bounds(BoundsForScrolling());
float scale_factor = 1.f;
for (LayerImpl const* current_layer = this;

Powered by Google App Engine
This is Rietveld 408576698