| Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| index 4113f099d81c63b52f95a89b7dd3474585c1c687..57770c68278be276b7df58440deb630337fe7040 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| @@ -1593,26 +1593,6 @@ void CompositedLayerMapping::UpdateDecorationOutlineLayerGeometry(
|
| graphics_layer_->OffsetFromLayoutObject());
|
| }
|
|
|
| -void CompositedLayerMapping::RegisterScrollingLayers() {
|
| - // Register fixed position layers and their containers with the scrolling
|
| - // coordinator.
|
| - ScrollingCoordinator* scrolling_coordinator =
|
| - owning_layer_.GetScrollingCoordinator();
|
| - if (!scrolling_coordinator)
|
| - return;
|
| -
|
| - scrolling_coordinator->UpdateLayerPositionConstraint(&owning_layer_);
|
| -
|
| - // Page scale is applied as a transform on the root layout view layer. Because
|
| - // the scroll layer is further up in the hierarchy, we need to avoid marking
|
| - // the root layout view layer as a container.
|
| - bool is_container =
|
| - owning_layer_.GetLayoutObject().CanContainFixedPositionObjects() &&
|
| - !owning_layer_.IsRootLayer();
|
| - scrolling_coordinator->SetLayerIsContainerForFixedPositionLayers(
|
| - graphics_layer_.get(), is_container);
|
| -}
|
| -
|
| void CompositedLayerMapping::UpdateInternalHierarchy() {
|
| // m_foregroundLayer has to be inserted in the correct order with child
|
| // layers, so it's not inserted here.
|
| @@ -2487,6 +2467,37 @@ void CompositedLayerMapping::UpdateClipParent(const PaintLayer* scroll_parent) {
|
| }
|
| }
|
|
|
| +void CompositedLayerMapping::RegisterScrollingLayers() {
|
| + // Register fixed position layers and their containers with the scrolling
|
| + // coordinator.
|
| + ScrollingCoordinator* scrolling_coordinator =
|
| + owning_layer_.GetScrollingCoordinator();
|
| + if (!scrolling_coordinator)
|
| + return;
|
| +
|
| + scrolling_coordinator->UpdateLayerPositionConstraint(&owning_layer_);
|
| +
|
| + // Page scale is applied as a transform on the root layout view layer. Because
|
| + // the scroll layer is further up in the hierarchy, we need to avoid marking
|
| + // the root layout view layer as a container.
|
| + bool is_container =
|
| + owning_layer_.GetLayoutObject().CanContainFixedPositionObjects() &&
|
| + !owning_layer_.IsRootLayer();
|
| + scrolling_coordinator->SetLayerIsContainerForFixedPositionLayers(
|
| + graphics_layer_.get(), is_container);
|
| + // Fixed-pos descendants inherits the space that has all CSS property applied,
|
| + // including perspective, overflow scroll/clip. Thus we also mark every layers
|
| + // below the main graphics layer so transforms implemented by them don't get
|
| + // skipped.
|
| + ApplyToGraphicsLayers(
|
| + this,
|
| + [scrolling_coordinator, is_container](GraphicsLayer* layer) {
|
| + scrolling_coordinator->SetLayerIsContainerForFixedPositionLayers(
|
| + layer, is_container);
|
| + },
|
| + kApplyToChildContainingLayers);
|
| +}
|
| +
|
| bool CompositedLayerMapping::UpdateSquashingLayers(
|
| bool needs_squashing_layers) {
|
| bool layers_changed = false;
|
|
|