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

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: Rebase Created 3 years, 7 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..850bef6bbebbad114ff3e1974f3cc27d76e729b4 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
@@ -512,6 +512,15 @@ void StyleAdjuster::AdjustComputedStyle(
style.ClearMultiCol();
}
AdjustStyleForAlignment(style, layout_parent_style);
+
+ // If this node is sticky it marks the creation of a sticky subtree, which we
+ // must track to properly handle document lifecycle in some cases.
+ //
+ // It is possible that this node is already in a sticky subtree (i.e. we have
+ // nested sticky nodes) - in that case the bit will already be set via
+ // inheritance from the ancestor and there is no harm to setting it again.
+ if (style.GetPosition() == EPosition::kSticky)
+ style.SetSubtreeIsSticky(true);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698