Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2001453002: Set ComputedStyle on Node and use that in buildOwnLayout() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@storage
Patch Set: Remove any cases that are forcing the newStyle on the old LayoutObject Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.h ('k') | third_party/WebKit/Source/core/dom/ElementRareData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.h ('k') | third_party/WebKit/Source/core/dom/ElementRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698