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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
273 ASSERT_WITH_SECURITY_IMPLICATION(hasRareData()); | 273 ASSERT_WITH_SECURITY_IMPLICATION(hasRareData()); |
274 return static_cast<NodeRareData*>(m_data.m_rareData); | 274 return static_cast<NodeRareData*>(m_data.m_rareData); |
275 } | 275 } |
276 | 276 |
277 NodeRareData& Node::ensureRareData() | 277 NodeRareData& Node::ensureRareData() |
278 { | 278 { |
279 if (hasRareData()) | 279 if (hasRareData()) |
280 return *rareData(); | 280 return *rareData(); |
281 | 281 |
282 if (isElementNode()) | 282 if (isElementNode()) |
283 m_data.m_rareData = ElementRareData::create(m_data.m_layoutObject); | 283 m_data.m_rareData = ElementRareData::create(hasLayoutObject() ? m_data.m _layoutObject : nullptr); |
nainar
2016/07/06 07:09:03
@bugsnash,
These two lines should be changed in
Bugs Nash
2016/07/06 21:32:21
Good spot
| |
284 else | 284 else |
285 m_data.m_rareData = NodeRareData::create(m_data.m_layoutObject); | 285 m_data.m_rareData = NodeRareData::create(hasLayoutObject() ? m_data.m_la youtObject : nullptr); |
286 | 286 |
287 DCHECK(m_data.m_rareData); | 287 DCHECK(m_data.m_rareData); |
288 | 288 |
289 setFlag(HasRareDataFlag); | 289 setFlag(HasRareDataFlag); |
290 return *rareData(); | 290 return *rareData(); |
291 } | 291 } |
292 | 292 |
293 Node* Node::toNode() | 293 Node* Node::toNode() |
294 { | 294 { |
295 return this; | 295 return this; |
(...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2503 | 2503 |
2504 void showNodePath(const blink::Node* node) | 2504 void showNodePath(const blink::Node* node) |
2505 { | 2505 { |
2506 if (node) | 2506 if (node) |
2507 node->showNodePathForThis(); | 2507 node->showNodePathForThis(); |
2508 else | 2508 else |
2509 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2509 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
2510 } | 2510 } |
2511 | 2511 |
2512 #endif | 2512 #endif |
OLD | NEW |