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

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

Issue 2813563005: Remove fast path checks that look into the Groups in ComputedStyle (Closed)
Patch Set: Reintroduce comparison of objects 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 303
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_ =
315 else 315 ElementRareData::Create(data_.layout_data_->GetLayoutObject());
316 data_.rare_data_ = NodeRareData::Create(data_.layout_object_); 316 } else {
317 data_.rare_data_ =
318 NodeRareData::Create(data_.layout_data_->GetLayoutObject());
319 }
317 320
318 DCHECK(data_.rare_data_); 321 DCHECK(data_.rare_data_);
319 SetFlag(kHasRareDataFlag); 322 SetFlag(kHasRareDataFlag);
320 ScriptWrappableVisitor::WriteBarrier(this, RareData()); 323 ScriptWrappableVisitor::WriteBarrier(this, RareData());
321 return *RareData(); 324 return *RareData();
322 } 325 }
323 326
324 Node* Node::ToNode() { 327 Node* Node::ToNode() {
325 return this; 328 return this;
326 } 329 }
(...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after
2531 if (node) { 2534 if (node) {
2532 std::stringstream stream; 2535 std::stringstream stream;
2533 node->PrintNodePathTo(stream); 2536 node->PrintNodePathTo(stream);
2534 LOG(INFO) << stream.str(); 2537 LOG(INFO) << stream.str();
2535 } else { 2538 } else {
2536 LOG(INFO) << "Cannot showNodePath for <null>"; 2539 LOG(INFO) << "Cannot showNodePath for <null>";
2537 } 2540 }
2538 } 2541 }
2539 2542
2540 #endif 2543 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698