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 a70da0b7f8cd17c79bc6ff87a8f3bde279ee877f..ec1d785b984073011c31023135b38386cf0e0cee 100644 |
--- a/third_party/WebKit/Source/core/dom/Element.cpp |
+++ b/third_party/WebKit/Source/core/dom/Element.cpp |
@@ -1828,10 +1828,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 buildLayoutTree(*newStyle); |
+ setComputedStyle(newStyle); |
+ return buildLayoutTree(); |
} |
DCHECK(oldStyle); |
@@ -1870,10 +1868,10 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change) |
return localChange; |
} |
-StyleRecalcChange Element::buildLayoutTree(ComputedStyle& newStyle) |
+StyleRecalcChange Element::buildLayoutTree() |
{ |
AttachContext reattachContext; |
- reattachContext.resolvedStyle = &newStyle; |
+ reattachContext.resolvedStyle = mutableComputedStyle(); |
bool layoutObjectWillChange = needsAttach() || layoutObject(); |
reattachLayoutTree(reattachContext); |
if (layoutObjectWillChange || layoutObject()) |