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 4048627057cfba89fd7ef6947df9c88e11af6486..b6d98073d22906841da7a20b008d97cef3e70ee1 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,7 +2072,7 @@ 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()) |