| 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());
|
|
|
|
|