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

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: Fix ScrollViewportRounding test 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
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_position_constraint_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 87cb2f8a8cfe4270a85f8abd9465b0c539a9a6fe..1136a2b5424aad4cd1efd4b66ff0ec20318db7ef 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
@@ -769,9 +769,10 @@ bool LayerImpl::IsActive() const {
return layer_tree_impl_->IsActiveTree();
}
-// TODO(wjmaclean) Convert so that bounds returns SizeF.
+// TODO(aelias): Convert so that bounds returns SizeF.
gfx::Size LayerImpl::bounds() const {
- return ToCeiledSize(temporary_impl_bounds_);
+ return gfx::ToCeiledSize(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());
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_position_constraint_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698