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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 18647013: Delete CC-impl-side clip layer adjustment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename to ContainerLayer Created 7 years, 5 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/trees/layer_tree_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 25cd58a6bf26c695d6bae75db99f1ee2fe0a7afc..2a8de8ff5d7718d8937ad1338eafe6e803bc274a 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -140,7 +140,7 @@ LayerImpl* LayerTreeImpl::RootScrollLayer() const {
return root_scroll_layer_;
}
-LayerImpl* LayerTreeImpl::RootClipLayer() const {
+LayerImpl* LayerTreeImpl::RootContainerLayer() const {
return root_scroll_layer_ ? root_scroll_layer_->parent() : NULL;
}
@@ -233,9 +233,9 @@ void LayerTreeImpl::UpdateSolidColorScrollbars() {
gfx::PointAtOffsetFromOrigin(root_scroll->TotalScrollOffset()),
ScrollableViewportSize());
float vertical_adjust = 0.0f;
- if (RootClipLayer())
+ if (RootContainerLayer())
vertical_adjust = layer_tree_host_impl_->VisibleViewportSize().height() -
- RootClipLayer()->bounds().height();
+ RootContainerLayer()->bounds().height();
if (ScrollbarLayerImpl* horiz = root_scroll->horizontal_scrollbar_layer()) {
horiz->set_vertical_adjust(vertical_adjust);
horiz->set_visible_to_total_length_ratio(
@@ -249,20 +249,13 @@ void LayerTreeImpl::UpdateSolidColorScrollbars() {
}
void LayerTreeImpl::UpdateDrawProperties() {
- if (IsActiveTree() && RootScrollLayer() && RootClipLayer())
+ if (IsActiveTree() && RootScrollLayer() && RootContainerLayer())
UpdateRootScrollLayerSizeDelta();
if (settings().solid_color_scrollbars &&
IsActiveTree() &&
RootScrollLayer()) {
UpdateSolidColorScrollbars();
-
- // The top controls manager is incompatible with the WebKit-created cliprect
- // because it can bring into view a larger amount of content when it
- // hides. It's safe to deactivate the clip rect if no non-overlay scrollbars
- // are present.
- if (RootClipLayer() && layer_tree_host_impl_->top_controls_manager())
- RootClipLayer()->SetMasksToBounds(false);
}
needs_update_draw_properties_ = false;
@@ -525,16 +518,16 @@ void LayerTreeImpl::SetRootLayerScrollOffsetDelegate(
void LayerTreeImpl::UpdateRootScrollLayerSizeDelta() {
LayerImpl* root_scroll = RootScrollLayer();
- LayerImpl* root_clip = RootClipLayer();
+ LayerImpl* root_container = RootContainerLayer();
DCHECK(root_scroll);
- DCHECK(root_clip);
+ DCHECK(root_container);
DCHECK(IsActiveTree());
gfx::Vector2dF scrollable_viewport_size =
gfx::RectF(ScrollableViewportSize()).bottom_right() - gfx::PointF();
gfx::Vector2dF original_viewport_size =
- gfx::RectF(root_clip->bounds()).bottom_right() -
+ gfx::RectF(root_container->bounds()).bottom_right() -
gfx::PointF();
original_viewport_size.Scale(1 / page_scale_factor());
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698