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..abb5e45216633de1f2d3efdb88f616a512911781 100644 |
--- a/third_party/WebKit/Source/core/dom/Element.cpp |
+++ b/third_party/WebKit/Source/core/dom/Element.cpp |
@@ -567,7 +567,7 @@ void Element::nativeApplyScroll(ScrollState& scrollState) |
// page removes the default applyScroll (ViewportScrollCallback). |
if (document().effectiveRootScroller() == this) |
boxToScroll = document().layoutView(); |
- else if (layoutObject()) |
+ else if (hasLayoutObject()) |
boxToScroll = toLayoutBox(layoutObject()); |
if (!boxToScroll) |
@@ -1769,13 +1769,8 @@ 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; |
+ setComputedStyle(newStyle); |
+ return buildOwnLayout(); |
sashab
2016/07/04 07:57:12
A suggestion that might make this a little easier
nainar
2016/07/05 00:26:55
In progress update: Made a new CL with the mechani
|
} |
DCHECK(oldStyle); |
@@ -1814,6 +1809,17 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change) |
return localChange; |
} |
+StyleRecalcChange Element::buildOwnLayout() |
+{ |
+ AttachContext reattachContext; |
+ reattachContext.resolvedStyle = mutableComputedStyle(); |
+ bool layoutObjectWillChange = needsAttach() || hasLayoutObject(); |
+ reattach(reattachContext); |
+ if (layoutObjectWillChange || hasLayoutObject()) |
+ return Reattach; |
+ return ReattachNoLayoutObject; |
+} |
+ |
void Element::updateCallbackSelectors(const ComputedStyle* oldStyle, const ComputedStyle* newStyle) |
{ |
Vector<String> emptyVector; |