OLD | NEW |
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 #endif | 257 #endif |
258 InstanceCounters::incrementCounter(InstanceCounters::NodeCounter); | 258 InstanceCounters::incrementCounter(InstanceCounters::NodeCounter); |
259 } | 259 } |
260 | 260 |
261 Node::~Node() | 261 Node::~Node() |
262 { | 262 { |
263 // With Oilpan, the rare data finalizer also asserts for | 263 // With Oilpan, the rare data finalizer also asserts for |
264 // this condition (we cannot directly access it here.) | 264 // this condition (we cannot directly access it here.) |
265 RELEASE_ASSERT(hasRareData() || !layoutObject()); | 265 RELEASE_ASSERT(hasRareData() || !layoutObject()); |
266 InstanceCounters::decrementCounter(InstanceCounters::NodeCounter); | 266 InstanceCounters::decrementCounter(InstanceCounters::NodeCounter); |
| 267 if (!hasRareData() && !hasLayoutObject() && m_data.m_computedStyle) |
| 268 m_data.m_computedStyle->deref(); |
267 } | 269 } |
268 | 270 |
269 NodeRareData* Node::rareData() const | 271 NodeRareData* Node::rareData() const |
270 { | 272 { |
271 ASSERT_WITH_SECURITY_IMPLICATION(hasRareData()); | 273 ASSERT_WITH_SECURITY_IMPLICATION(hasRareData()); |
272 return static_cast<NodeRareData*>(m_data.m_rareData); | 274 return static_cast<NodeRareData*>(m_data.m_rareData); |
273 } | 275 } |
274 | 276 |
275 NodeRareData& Node::ensureRareData() | 277 NodeRareData& Node::ensureRareData() |
276 { | 278 { |
(...skipping 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2497 | 2499 |
2498 void showNodePath(const blink::Node* node) | 2500 void showNodePath(const blink::Node* node) |
2499 { | 2501 { |
2500 if (node) | 2502 if (node) |
2501 node->showNodePathForThis(); | 2503 node->showNodePathForThis(); |
2502 else | 2504 else |
2503 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2505 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
2504 } | 2506 } |
2505 | 2507 |
2506 #endif | 2508 #endif |
OLD | NEW |