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

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

Issue 2093143002: Revert of Storage of ComputedStyle separate from LayoutObject. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 #endif 256 #endif
257 InstanceCounters::incrementCounter(InstanceCounters::NodeCounter); 257 InstanceCounters::incrementCounter(InstanceCounters::NodeCounter);
258 } 258 }
259 259
260 Node::~Node() 260 Node::~Node()
261 { 261 {
262 // With Oilpan, the rare data finalizer also asserts for 262 // With Oilpan, the rare data finalizer also asserts for
263 // this condition (we cannot directly access it here.) 263 // this condition (we cannot directly access it here.)
264 RELEASE_ASSERT(hasRareData() || !layoutObject()); 264 RELEASE_ASSERT(hasRareData() || !layoutObject());
265 InstanceCounters::decrementCounter(InstanceCounters::NodeCounter); 265 InstanceCounters::decrementCounter(InstanceCounters::NodeCounter);
266 if (!hasRareData() && !hasLayoutObject() && m_data.m_computedStyle)
267 m_data.m_computedStyle->deref();
268 } 266 }
269 267
270 NodeRareData* Node::rareData() const 268 NodeRareData* Node::rareData() const
271 { 269 {
272 ASSERT_WITH_SECURITY_IMPLICATION(hasRareData()); 270 ASSERT_WITH_SECURITY_IMPLICATION(hasRareData());
273 return static_cast<NodeRareData*>(m_data.m_rareData); 271 return static_cast<NodeRareData*>(m_data.m_rareData);
274 } 272 }
275 273
276 NodeRareData& Node::ensureRareData() 274 NodeRareData& Node::ensureRareData()
277 { 275 {
(...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2485 2483
2486 void showNodePath(const blink::Node* node) 2484 void showNodePath(const blink::Node* node)
2487 { 2485 {
2488 if (node) 2486 if (node)
2489 node->showNodePathForThis(); 2487 node->showNodePathForThis();
2490 else 2488 else
2491 fprintf(stderr, "Cannot showNodePath for (nil)\n"); 2489 fprintf(stderr, "Cannot showNodePath for (nil)\n");
2492 } 2490 }
2493 2491
2494 #endif 2492 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | third_party/WebKit/Source/core/dom/NodeComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698