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

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: Sending for Bugs' input Created 4 years, 4 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
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())

Powered by Google App Engine
This is Rietveld 408576698