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 190d1908070ca33a5920d6240e84c09f3b46732a..61c5085e0bcec37ec8972b129ed6a66d7b93e2e9 100644 |
| --- a/third_party/WebKit/Source/core/dom/Element.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp |
| @@ -1769,13 +1769,10 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change) |
| } |
| if (localChange == Reattach) { |
| - AttachContext reattachContext; |
| - reattachContext.resolvedStyle = newStyle.get(); |
| - bool layoutObjectWillChange = needsAttach() || layoutObject(); |
| - reattach(reattachContext); |
| - if (layoutObjectWillChange || layoutObject()) |
| - return Reattach; |
| - return ReattachNoLayoutObject; |
| + // TODO(nainar): Remove the style parameter being passed into buildOwnLayout() |
| + // ComputedStyle will now be stored on Node and accessed in buildOwnLayout() |
| + // using mutableComputedStyle() |
|
sashab
2016/07/05 01:48:56
Nit: full stops at the end of each sentence :)
nainar
2016/07/05 01:57:23
Done.
|
| + return buildOwnLayout(newStyle.get()); |
| } |
| DCHECK(oldStyle); |
| @@ -1814,6 +1811,17 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change) |
| return localChange; |
| } |
| +StyleRecalcChange Element::buildOwnLayout(ComputedStyle* newStyle) |
| +{ |
| + AttachContext reattachContext; |
| + reattachContext.resolvedStyle = newStyle; |
| + bool layoutObjectWillChange = needsAttach() || layoutObject(); |
| + reattach(reattachContext); |
| + if (layoutObjectWillChange || layoutObject()) |
| + return Reattach; |
| + return ReattachNoLayoutObject; |
| +} |
| + |
| void Element::updateCallbackSelectors(const ComputedStyle* oldStyle, const ComputedStyle* newStyle) |
| { |
| Vector<String> emptyVector; |