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

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 unittest 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 c715a2954ec4c2eafbe10594703a5a5c310ac30e..d183975688e2d450bfc891d82813d4f57cf1e628 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
@@ -319,7 +319,7 @@ void CompositedLayerMapping::updateStickyConstraints(
LayoutPoint enclosingLayerOffset;
compositingContainer->convertToLayerCoords(ancestorOverflowLayer,
enclosingLayerOffset);
- if (compositingContainer != ancestorOverflowLayer) {
+ if (!scrollParent() && compositingContainer != ancestorOverflowLayer) {
flackr 2017/03/23 16:58:03 It's probably worth "documenting" why we do this w
smcgruer 2017/03/23 17:22:48 Done.
enclosingLayerOffset += LayoutSize(
ancestorOverflowLayer->getScrollableArea()->getScrollOffset());
}

Powered by Google App Engine
This is Rietveld 408576698