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

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: Created 4 years, 5 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 b24b198a3aaba10f914c8e05223ae1b4e805ab32..15ddd3fdf2ca76c7e9dfa9f8fc4a0b1b3a69ce71 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1769,10 +1769,8 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change)
}
if (localChange == Reattach) {
- // 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());
+ setComputedStyle(newStyle);
+ return buildOwnLayout();
}
DCHECK(oldStyle);
@@ -1811,10 +1809,10 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change)
return localChange;
}
-StyleRecalcChange Element::buildOwnLayout(const ComputedStyle* newStyle)
+StyleRecalcChange Element::buildOwnLayout()
{
AttachContext reattachContext;
- reattachContext.resolvedStyle = newStyle;
+ reattachContext.resolvedStyle = mutableComputedStyle();
bool layoutObjectWillChange = needsAttach() || layoutObject();
reattach(reattachContext);
if (layoutObjectWillChange || layoutObject())

Powered by Google App Engine
This is Rietveld 408576698