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

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

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/LayoutTreeBuilder.cpp
diff --git a/third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp b/third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp
index d6df798b0f74e0a0ac49c3206c4ce4bbbb770dde..ad91666c0e00d0490159edc7ca9131a4dac0dd94 100644
--- a/third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp
@@ -100,8 +100,11 @@ bool LayoutTreeBuilderForElement::shouldCreateLayoutObject() const {
}
ComputedStyle& LayoutTreeBuilderForElement::style() const {
- if (!m_style)
+ m_style =
+ m_node->document().getStyleReattachData(*m_node).computedStyle.get();
+ if (!m_style) {
m_style = m_node->styleForLayoutObject();
+ }
return *m_style;
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/dom/NodeComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698