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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 { | 464 { |
465 return treeScope().document(); | 465 return treeScope().document(); |
466 } | 466 } |
467 | 467 |
468 TreeScope& treeScope() const | 468 TreeScope& treeScope() const |
469 { | 469 { |
470 DCHECK(m_treeScope); | 470 DCHECK(m_treeScope); |
471 return *m_treeScope; | 471 return *m_treeScope; |
472 } | 472 } |
473 | 473 |
| 474 TreeScope& containingTreeScope() const |
| 475 { |
| 476 DCHECK(isInTreeScope()); |
| 477 return *m_treeScope; |
| 478 } |
| 479 |
474 bool inActiveDocument() const; | 480 bool inActiveDocument() const; |
475 | 481 |
476 // Returns true if this node is associated with a shadow-including document
and is in its associated document's | 482 // Returns true if this node is associated with a shadow-including document
and is in its associated document's |
477 // node tree, false otherwise. | 483 // node tree, false otherwise. |
478 bool inShadowIncludingDocument() const | 484 bool inShadowIncludingDocument() const |
479 { | 485 { |
480 return getFlag(InDocumentFlag); | 486 return getFlag(InDocumentFlag); |
481 } | 487 } |
482 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); } | 488 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); } |
483 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen
tFlag | IsInShadowTreeFlag)); } | 489 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen
tFlag | IsInShadowTreeFlag)); } |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 } // namespace blink | 920 } // namespace blink |
915 | 921 |
916 #ifndef NDEBUG | 922 #ifndef NDEBUG |
917 // Outside the WebCore namespace for ease of invocation from gdb. | 923 // Outside the WebCore namespace for ease of invocation from gdb. |
918 void showNode(const blink::Node*); | 924 void showNode(const blink::Node*); |
919 void showTree(const blink::Node*); | 925 void showTree(const blink::Node*); |
920 void showNodePath(const blink::Node*); | 926 void showNodePath(const blink::Node*); |
921 #endif | 927 #endif |
922 | 928 |
923 #endif // Node_h | 929 #endif // Node_h |
OLD | NEW |