Chromium Code Reviews| 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 e84890844671dbaf9726b46c093f3c94278d9702..c8847b8e956a14a2ebc45147cf999e1872c3b224 100644 |
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
| @@ -235,7 +235,6 @@ void CompositedLayerMapping::createPrimaryGraphicsLayer() { |
| updateTransform(layoutObject()->styleRef()); |
| updateFilters(layoutObject()->styleRef()); |
| updateBackdropFilters(layoutObject()->styleRef()); |
| - updateStickyConstraints(layoutObject()->styleRef()); |
| updateLayerBlendMode(layoutObject()->styleRef()); |
| updateIsRootForIsolatedGroup(); |
| } |
| @@ -315,7 +314,9 @@ void CompositedLayerMapping::updateStickyConstraints( |
| enclosingLayerOffset); |
| FloatPoint stickyBoxOffset = |
| constraints.scrollContainerRelativeStickyBoxRect().location(); |
| - stickyBoxOffset.moveBy(FloatPoint(-enclosingLayerOffset)); |
| + DCHECK(!m_contentOffsetInCompositingLayerDirty); |
| + stickyBoxOffset.moveBy(FloatPoint(-enclosingLayerOffset) - |
| + FloatSize(contentOffsetInCompositingLayer())); |
|
chrishtr
2017/01/17 23:07:26
Is it possible for |layoutObject()| to be both sti
flackr
2017/01/18 13:28:45
If it was squashed its position would have to be u
|
| webConstraint.isSticky = true; |
| webConstraint.isAnchoredLeft = |
| @@ -943,8 +944,6 @@ void CompositedLayerMapping::updateGraphicsLayerGeometry( |
| if (!layoutObject()->style()->isRunningBackdropFilterAnimationOnCompositor()) |
| updateBackdropFilters(layoutObject()->styleRef()); |
| - updateStickyConstraints(layoutObject()->styleRef()); |
| - |
| // We compute everything relative to the enclosing compositing layer. |
| IntRect ancestorCompositingBounds; |
| if (compositingContainer) { |
| @@ -981,6 +980,7 @@ void CompositedLayerMapping::updateGraphicsLayerGeometry( |
| graphicsLayerParentLocation); |
| updateContentsOffsetInCompositingLayer(snappedOffsetFromCompositedAncestor, |
| graphicsLayerParentLocation); |
| + updateStickyConstraints(layoutObject()->styleRef()); |
| updateSquashingLayerGeometry( |
| graphicsLayerParentLocation, compositingContainer, m_squashedLayers, |
| m_squashingLayer.get(), &m_squashingLayerOffsetFromTransformedAncestor, |