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..3a0db58ee26d3e10ffe3db430318eaf0d574f0e7 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(). |
+ return buildOwnLayout(newStyle.get()); |
} |
DCHECK(oldStyle); |
@@ -1814,6 +1811,17 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change) |
return localChange; |
} |
+StyleRecalcChange Element::buildOwnLayout(ComputedStyle* newStyle) |
+{ |
sashab
2016/07/05 23:28:55
DCHECK(newstyle) here
sashab
2016/07/05 23:28:55
DCHECK(newstyle) here
nainar
2016/07/06 00:52:09
Done.
|
+ 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; |