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

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

Issue 2803593007: Fix position:sticky location bug when scroller is not a stacking context (Closed)
Patch Set: Created 3 years, 8 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
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 2b11d48670b148fad2330a31a67ba95c030d952d..d613174fed0c7f6538db0cadc9127b4d1495c1d4 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
@@ -318,7 +318,8 @@ void CompositedLayerMapping::updateStickyConstraints(
LayoutPoint enclosingLayerOffset;
compositingContainer->convertToLayerCoords(ancestorOverflowLayer,
enclosingLayerOffset);
- if (compositingContainer != ancestorOverflowLayer) {
+ DCHECK(!scrollParent() || scrollParent() == ancestorOverflowLayer);
+ if (!scrollParent() && compositingContainer != ancestorOverflowLayer) {
enclosingLayerOffset += LayoutSize(
ancestorOverflowLayer->getScrollableArea()->getScrollOffset());
}

Powered by Google App Engine
This is Rietveld 408576698