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-2011, 2014 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 { | 450 { |
451 return treeScope().document(); | 451 return treeScope().document(); |
452 } | 452 } |
453 | 453 |
454 TreeScope& treeScope() const | 454 TreeScope& treeScope() const |
455 { | 455 { |
456 DCHECK(m_treeScope); | 456 DCHECK(m_treeScope); |
457 return *m_treeScope; | 457 return *m_treeScope; |
458 } | 458 } |
459 | 459 |
| 460 TreeScope& rootTreeScope() const |
| 461 { |
| 462 DCHECK(isInTreeScope()); |
| 463 return *m_treeScope; |
| 464 } |
| 465 |
460 bool inActiveDocument() const; | 466 bool inActiveDocument() const; |
461 | 467 |
462 // Returns true if this node is associated with a shadow-including document
and is in its associated document's | 468 // Returns true if this node is associated with a shadow-including document
and is in its associated document's |
463 // node tree, false otherwise. | 469 // node tree, false otherwise. |
464 bool inShadowIncludingDocument() const | 470 bool inShadowIncludingDocument() const |
465 { | 471 { |
466 return getFlag(InDocumentFlag); | 472 return getFlag(InDocumentFlag); |
467 } | 473 } |
468 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); } | 474 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); } |
469 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen
tFlag | IsInShadowTreeFlag)); } | 475 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen
tFlag | IsInShadowTreeFlag)); } |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 } // namespace blink | 900 } // namespace blink |
895 | 901 |
896 #ifndef NDEBUG | 902 #ifndef NDEBUG |
897 // Outside the WebCore namespace for ease of invocation from gdb. | 903 // Outside the WebCore namespace for ease of invocation from gdb. |
898 void showNode(const blink::Node*); | 904 void showNode(const blink::Node*); |
899 void showTree(const blink::Node*); | 905 void showTree(const blink::Node*); |
900 void showNodePath(const blink::Node*); | 906 void showNodePath(const blink::Node*); |
901 #endif | 907 #endif |
902 | 908 |
903 #endif // Node_h | 909 #endif // Node_h |
OLD | NEW |