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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2636233002: Add offset of content in composited layer to sticky position offset. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698