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

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2814603002: Move LayoutObject to satellite NodeLayoutData that hangs from a Node. (Closed)
Patch Set: Incorporate esprehn@ feedback 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * 10 *
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 NodeRareData* Node::RareData() const { 304 NodeRareData* Node::RareData() const {
305 SECURITY_DCHECK(HasRareData()); 305 SECURITY_DCHECK(HasRareData());
306 return static_cast<NodeRareData*>(data_.rare_data_); 306 return static_cast<NodeRareData*>(data_.rare_data_);
307 } 307 }
308 308
309 NodeRareData& Node::EnsureRareData() { 309 NodeRareData& Node::EnsureRareData() {
310 if (HasRareData()) 310 if (HasRareData())
311 return *RareData(); 311 return *RareData();
312 312
313 if (IsElementNode()) 313 if (IsElementNode())
314 data_.rare_data_ = ElementRareData::Create(data_.layout_object_); 314 data_.rare_data_ = ElementRareData::Create(data_.node_layout_data_);
315 else 315 else
316 data_.rare_data_ = NodeRareData::Create(data_.layout_object_); 316 data_.rare_data_ = NodeRareData::Create(data_.node_layout_data_);
317 317
318 DCHECK(data_.rare_data_); 318 DCHECK(data_.rare_data_);
319 SetFlag(kHasRareDataFlag); 319 SetFlag(kHasRareDataFlag);
320 ScriptWrappableVisitor::WriteBarrier(this, RareData()); 320 ScriptWrappableVisitor::WriteBarrier(this, RareData());
321 return *RareData(); 321 return *RareData();
322 } 322 }
323 323
324 Node* Node::ToNode() { 324 Node* Node::ToNode() {
325 return this; 325 return this;
326 } 326 }
(...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after
2540 if (node) { 2540 if (node) {
2541 std::stringstream stream; 2541 std::stringstream stream;
2542 node->PrintNodePathTo(stream); 2542 node->PrintNodePathTo(stream);
2543 LOG(INFO) << stream.str(); 2543 LOG(INFO) << stream.str();
2544 } else { 2544 } else {
2545 LOG(INFO) << "Cannot showNodePath for <null>"; 2545 LOG(INFO) << "Cannot showNodePath for <null>";
2546 } 2546 }
2547 } 2547 }
2548 2548
2549 #endif 2549 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698