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

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

Issue 2765503003: Fix position:sticky location bug when scroller is not a stacking context (Closed)
Patch Set: Add DCHECK, whitespace fix Created 3 years, 9 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 a67d5daa6b6ed92a786f29761a9469fa43a62f88..90fb2662dd3dc6a1f13060acaa69f07979cac5e0 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
@@ -319,7 +319,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