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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp

Issue 2825343003: Clean compositing inputs for location APIs for sticky-affected elements. (Closed)
Patch Set: First pass addressing reviewer comments 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/css/resolver/StyleAdjuster.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
index 57ce4f32a3654a19edf93e9414c22d1235eb31e9..d3969a25311bab1df679bcd78baa591ea54c1ad0 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
@@ -512,6 +512,13 @@ void StyleAdjuster::AdjustComputedStyle(
style.ClearMultiCol();
}
AdjustStyleForAlignment(style, layout_parent_style);
+
+ // Once the position of the element has been decided, we need to track whether
+ // or not it is in a sticky sub-tree. This is necessary to properly handle the
+ // document lifecycle for certain script APIs, see
+ // Document::EnsureLifecycleValidForLocationAPIsForNode.
+ style.SetIsInStickySubtree(parent_style.IsInStickySubtree() ||
fs 2017/05/01 21:19:34 if (style.GetPosition() == EPosition::kSticky) s
smcgruer 2017/05/02 15:25:41 I'm not sure I follow here. If our parent/ancestor
fs 2017/05/02 15:58:07 If parent is sticky, the inheritance mechanism wil
smcgruer 2017/05/02 17:25:30 Ok, the inheritance code is definitely confirmed m
+ style.GetPosition() == EPosition::kSticky);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698