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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2716583005: Do not promote position sticky or fixed elements unless they move with scroll. (Closed)
Patch Set: Avoid computing constraints for non-anchored sticky and add/update tests. 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/style/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index 1a07e189c1ca942ee2389360984bf78d3f62f0f8..3bad30c2f33f8b0444314bc2930504e443cd67c1 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -1186,7 +1186,7 @@ void ComputedStyle::updateIsStackingContext(bool isDocumentElement,
hasOpacity() || hasTransformRelatedProperty() || hasMask() ||
clipPath() || boxReflect() || hasFilterInducingProperty() ||
hasBackdropFilter() || hasBlendMode() || hasIsolation() ||
- hasViewportConstrainedPosition() ||
+ hasViewportConstrainedPosition() || position() == EPosition::kSticky ||
hasPropertyThatCreatesStackingContext(willChangeProperties()) ||
containsPaint()) {
setIsStackingContext(true);

Powered by Google App Engine
This is Rietveld 408576698