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

Unified Diff: cc/layers/layer_impl.cc

Issue 476113004: Replace overdraw_bottom_height with top_controls_layout_height. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 4 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 e6e60f5f3ef7cc1e474c2b5c4a2aef192906b3b7..ecc18e86118cb98ebe53524f321f999329d63d21 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -609,7 +609,7 @@ gfx::Vector2dF LayerImpl::FixedContainerSizeDelta() const {
float scale_delta = layer_tree_impl()->page_scale_delta();
float scale = layer_tree_impl()->page_scale_factor();
- gfx::Vector2dF delta_from_scroll = scroll_clip_layer_->BoundsDelta();
+ gfx::Vector2dF delta_from_scroll = scroll_clip_layer_->bounds_delta();
delta_from_scroll.Scale(1.f / scale);
// The delta-from-pinch component requires some explanation: A viewport of
@@ -771,7 +771,8 @@ bool LayerImpl::IsActive() const {
// TODO(wjmaclean) Convert so that bounds returns SizeF.
gfx::Size LayerImpl::bounds() const {
- return ToFlooredSize(temporary_impl_bounds_);
+ return gfx::ToFlooredSize(gfx::SizeF(bounds_.width() + bounds_delta_.x(),
+ bounds_.height() + bounds_delta_.y()));
}
void LayerImpl::SetBounds(const gfx::Size& bounds) {
@@ -779,7 +780,6 @@ void LayerImpl::SetBounds(const gfx::Size& bounds) {
return;
bounds_ = bounds;
- temporary_impl_bounds_ = bounds;
ScrollbarParametersDidChange();
if (masks_to_bounds())
@@ -788,11 +788,11 @@ void LayerImpl::SetBounds(const gfx::Size& bounds) {
NoteLayerPropertyChanged();
}
-void LayerImpl::SetTemporaryImplBounds(const gfx::SizeF& bounds) {
- if (temporary_impl_bounds_ == bounds)
+void LayerImpl::SetBoundsDelta(const gfx::Vector2dF& bounds_delta) {
+ if (bounds_delta_ == bounds_delta)
return;
- temporary_impl_bounds_ = bounds;
+ bounds_delta_ = bounds_delta;
ScrollbarParametersDidChange();
if (masks_to_bounds())
@@ -1274,8 +1274,7 @@ void LayerImpl::SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer,
current_offset.Scale(layer_tree_impl()->total_page_scale_factor());
}
- scrollbar_layer->SetVerticalAdjust(
- layer_tree_impl()->VerticalAdjust(scrollbar_clip_layer->id()));
+ scrollbar_layer->SetVerticalAdjust(scrollbar_clip_layer->bounds_delta().y());
if (scrollbar_layer->orientation() == HORIZONTAL) {
float visible_ratio = clip_rect.width() / scroll_rect.width();
scrollbar_layer->SetCurrentPos(current_offset.x());

Powered by Google App Engine
This is Rietveld 408576698