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

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

Issue 2814603002: Move LayoutObject to satellite NodeLayoutData that hangs from a Node. (Closed)
Patch Set: Created 3 years, 8 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 b91538efcfaa7eb5ae14c5775966265e5ac000d0..bf2a5e12ca78cdb4aba7c2759446feab31b4bd62 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -310,10 +310,13 @@ NodeRareData& Node::EnsureRareData() {
if (HasRareData())
return *RareData();
- if (IsElementNode())
- data_.rare_data_ = ElementRareData::Create(data_.layout_object_);
- else
- data_.rare_data_ = NodeRareData::Create(data_.layout_object_);
+ if (IsElementNode()) {
+ data_.rare_data_ =
+ ElementRareData::Create(data_.layout_data_->GetLayoutObject());
esprehn 2017/04/10 22:20:12 You need to store the layout_data_ inside the Elem
nainar 2017/04/11 01:16:20 Referring back to IRL conversation. We shouldn't s
nainar 2017/04/13 00:10:22 NodeRareDataBase and its descendants now store Nod
+ } else {
+ data_.rare_data_ =
+ NodeRareData::Create(data_.layout_data_->GetLayoutObject());
+ }
DCHECK(data_.rare_data_);
SetFlag(kHasRareDataFlag);

Powered by Google App Engine
This is Rietveld 408576698