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

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

Issue 2769353002: Only create sticky position constraints for constrained sticky position. (Closed)
Patch Set: Merge with master. 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/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index f685e1334d340973b091f0dee7305a9fde70618b..961058bc971652f3943c34e9b438744279055798 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -3027,8 +3027,12 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
GetPosition() == EPosition::kSticky;
}
bool HasViewportConstrainedPosition() const {
- return GetPosition() == EPosition::kFixed ||
- GetPosition() == EPosition::kSticky;
+ return GetPosition() == EPosition::kFixed;
+ }
+ bool HasStickyConstrainedPosition() const {
+ return GetPosition() == EPosition::kSticky &&
+ (!Top().IsAuto() || !Left().IsAuto() || !Right().IsAuto() ||
+ !Bottom().IsAuto());
}
// Clip utility functions.
« no previous file with comments | « third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698