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

Unified Diff: third_party/WebKit/Source/core/dom/Node.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/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index e86209842349280f79a9648027506024294764b0..cd6e22a617688b217ad939ffe69358a95899f04a 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -280,9 +280,9 @@ NodeRareData& Node::ensureRareData()
return *rareData();
if (isElementNode())
- m_data.m_rareData = ElementRareData::create(m_data.m_layoutObject);
nainar 2016/07/06 07:09:03 @bugsnash, These two lines should be changed in
Bugs Nash 2016/07/06 21:32:21 Good spot
+ m_data.m_rareData = ElementRareData::create(hasLayoutObject() ? m_data.m_layoutObject : nullptr);
else
- m_data.m_rareData = NodeRareData::create(m_data.m_layoutObject);
+ m_data.m_rareData = NodeRareData::create(hasLayoutObject() ? m_data.m_layoutObject : nullptr);
DCHECK(m_data.m_rareData);

Powered by Google App Engine
This is Rietveld 408576698