| Index: third_party/WebKit/Source/core/dom/Element.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
|
| index 3f31f0a9877d3845d5260312a9899c18ed08faaf..4bab59a53de94c074d4e794151a2a72d2e96856d 100644
|
| --- a/third_party/WebKit/Source/core/dom/Element.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp
|
| @@ -2016,7 +2016,7 @@ StyleRecalcChange Element::RecalcOwnStyle(StyleRecalcChange change) {
|
| }
|
|
|
| if (local_change == kReattach) {
|
| - GetDocument().AddNonAttachedStyle(*this, std::move(new_style));
|
| + SetNonAttachedStyle(std::move(new_style));
|
| SetNeedsReattachLayoutTree();
|
| return kReattach;
|
| }
|
| @@ -2072,11 +2072,12 @@ void Element::RebuildLayoutTree(Text* next_text_sibling) {
|
|
|
| if (NeedsReattachLayoutTree()) {
|
| AttachContext reattach_context;
|
| - reattach_context.resolved_style = GetDocument().GetNonAttachedStyle(*this);
|
| + reattach_context.resolved_style = GetNonAttachedStyle();
|
| bool layout_object_will_change = NeedsAttach() || GetLayoutObject();
|
| ReattachLayoutTree(reattach_context);
|
| if (layout_object_will_change || GetLayoutObject())
|
| ReattachWhitespaceSiblingsIfNeeded(next_text_sibling);
|
| + SetNonAttachedStyle(nullptr);
|
| } else if (ChildNeedsReattachLayoutTree()) {
|
| DCHECK(!NeedsReattachLayoutTree());
|
| SelectorFilterParentScope filter_scope(*this);
|
|
|