Chromium Code Reviews| 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 933ae095265de2f12f0e572a266351581ee60336..2cbc3ae101fce968a33d9aec1a501747b5faf1a3 100644 |
| --- a/third_party/WebKit/Source/core/dom/Element.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp |
| @@ -1946,10 +1946,8 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change) { |
| } |
| if (localChange == Reattach) { |
| - // TODO(nainar): Remove the style parameter being passed into |
| - // buildLayoutTree(). ComputedStyle will now be stored on Node and accessed |
| - // in buildLayoutTree() using mutableComputedStyle(). |
| - return rebuildLayoutTree(*newStyle); |
| + document().addNonAttachedStyle(this, std::move(newStyle)); |
|
nainar
2016/10/05 03:32:37
Changed to -> *this
|
| + return rebuildLayoutTree(); |
| } |
| DCHECK(oldStyle); |
| @@ -1991,9 +1989,9 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change) { |
| return localChange; |
| } |
| -StyleRecalcChange Element::rebuildLayoutTree(ComputedStyle& newStyle) { |
| +StyleRecalcChange Element::rebuildLayoutTree() { |
| AttachContext reattachContext; |
| - reattachContext.resolvedStyle = &newStyle; |
| + reattachContext.resolvedStyle = document().getNonAttachedStyle(this).get(); |
|
nainar
2016/10/05 03:32:37
Changed to -> *this
|
| bool layoutObjectWillChange = needsAttach() || layoutObject(); |
| reattachLayoutTree(reattachContext); |
| if (layoutObjectWillChange || layoutObject()) |