Chromium Code Reviews| 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 |