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

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

Issue 2769353002: Only create sticky position constraints for constrained sticky position. (Closed)
Patch Set: Set dependent patch. 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.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 7ec9c51f4b883e324eb9c95b7648f71c4b11c2e2..2f11e3f16a6f899ef4594ae5261f21665464640b 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -3124,7 +3124,12 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
position() == EPosition::kSticky;
}
bool hasViewportConstrainedPosition() const {
- return position() == EPosition::kFixed || position() == EPosition::kSticky;
+ return position() == EPosition::kFixed;
+ }
+ bool hasStickyConstrainedPosition() const {
+ return position() == EPosition::kSticky &&
+ (!top().isAuto() || !left().isAuto() || !right().isAuto() ||
+ !bottom().isAuto());
}
// Clip utility functions.

Powered by Google App Engine
This is Rietveld 408576698