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 188d946d60596715872a0499f770a7bab79cb750..58ac91a086bc64a7329d678d2c23a894c59351d3 100644 |
--- a/third_party/WebKit/Source/core/dom/Element.cpp |
+++ b/third_party/WebKit/Source/core/dom/Element.cpp |
@@ -1796,10 +1796,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); |
@@ -1838,10 +1836,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()) |