| 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, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 Document* ownerDocument() const; | 485 Document* ownerDocument() const; |
| 486 | 486 |
| 487 // Returns the document associated with this node. A Document node returns i
tself. | 487 // Returns the document associated with this node. A Document node returns i
tself. |
| 488 Document& document() const | 488 Document& document() const |
| 489 { | 489 { |
| 490 ASSERT(this); | 490 ASSERT(this); |
| 491 ASSERT(documentInternal()); | 491 ASSERT(documentInternal()); |
| 492 return *documentInternal(); | 492 return *documentInternal(); |
| 493 } | 493 } |
| 494 | 494 |
| 495 // Can never return 0. |
| 496 // FIXME: This should return a reference. |
| 495 TreeScope* treeScope() const { return m_treeScope; } | 497 TreeScope* treeScope() const { return m_treeScope; } |
| 496 | 498 |
| 497 // Returns true if this node is associated with a document and is in its ass
ociated document's | 499 // Returns true if this node is associated with a document and is in its ass
ociated document's |
| 498 // node tree, false otherwise. | 500 // node tree, false otherwise. |
| 499 bool inDocument() const | 501 bool inDocument() const |
| 500 { | 502 { |
| 501 ASSERT(documentInternal() || !getFlag(InDocumentFlag)); | 503 ASSERT(documentInternal() || !getFlag(InDocumentFlag)); |
| 502 return getFlag(InDocumentFlag); | 504 return getFlag(InDocumentFlag); |
| 503 } | 505 } |
| 504 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); } | 506 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); } |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 | 943 |
| 942 } //namespace | 944 } //namespace |
| 943 | 945 |
| 944 #ifndef NDEBUG | 946 #ifndef NDEBUG |
| 945 // Outside the WebCore namespace for ease of invocation from gdb. | 947 // Outside the WebCore namespace for ease of invocation from gdb. |
| 946 void showTree(const WebCore::Node*); | 948 void showTree(const WebCore::Node*); |
| 947 void showNodePath(const WebCore::Node*); | 949 void showNodePath(const WebCore::Node*); |
| 948 #endif | 950 #endif |
| 949 | 951 |
| 950 #endif | 952 #endif |
| OLD | NEW |