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

Unified Diff: third_party/WebKit/Source/core/dom/NodeComputedStyle.h

Issue 2727233005: Remove calls to styleForLayoutObject() in LayoutTreeBuilder::style() (Closed)
Patch Set: Created 3 years, 9 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/NodeComputedStyle.h
diff --git a/third_party/WebKit/Source/core/dom/NodeComputedStyle.h b/third_party/WebKit/Source/core/dom/NodeComputedStyle.h
index ea9a610c3a3fc8a3fde01aa954d2305c998667e0..ccd8c53d7c38ec16c43e4e683262eeeec803e609 100644
--- a/third_party/WebKit/Source/core/dom/NodeComputedStyle.h
+++ b/third_party/WebKit/Source/core/dom/NodeComputedStyle.h
@@ -39,6 +39,9 @@ inline const ComputedStyle* Node::computedStyle() const {
}
inline ComputedStyle* Node::mutableComputedStyle() const {
+ if (needsReattachLayoutTree())
+ return document().getStyleReattachData(*this).computedStyle.get();
+
if (LayoutObject* layoutObject = this->layoutObject())
return layoutObject->mutableStyle();
« no previous file with comments | « third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp ('k') | third_party/WebKit/Source/core/editing/EditingUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698