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 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 | 1133 |
1134 if (parent->isShadowRoot()) | 1134 if (parent->isShadowRoot()) |
1135 return toShadowRoot(parent)->host(); | 1135 return toShadowRoot(parent)->host(); |
1136 | 1136 |
1137 if (!parent->isElementNode()) | 1137 if (!parent->isElementNode()) |
1138 return 0; | 1138 return 0; |
1139 | 1139 |
1140 return toElement(parent); | 1140 return toElement(parent); |
1141 } | 1141 } |
1142 | 1142 |
| 1143 ContainerNode* Node::parentOrShadowHostOrTemplateHostNode() const |
| 1144 { |
| 1145 if (isDocumentFragment() && toDocumentFragment(this)->isTemplateContent()) |
| 1146 return static_cast<const TemplateContentDocumentFragment*>(this)->host()
; |
| 1147 return parentOrShadowHostNode(); |
| 1148 } |
| 1149 |
1143 bool Node::isBlockFlowElement() const | 1150 bool Node::isBlockFlowElement() const |
1144 { | 1151 { |
1145 return isElementNode() && renderer() && renderer()->isRenderBlockFlow(); | 1152 return isElementNode() && renderer() && renderer()->isRenderBlockFlow(); |
1146 } | 1153 } |
1147 | 1154 |
1148 Element *Node::enclosingBlockFlowElement() const | 1155 Element *Node::enclosingBlockFlowElement() const |
1149 { | 1156 { |
1150 Node *n = const_cast<Node *>(this); | 1157 Node *n = const_cast<Node *>(this); |
1151 if (isBlockFlowElement()) | 1158 if (isBlockFlowElement()) |
1152 return toElement(n); | 1159 return toElement(n); |
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2624 node->showTreeForThis(); | 2631 node->showTreeForThis(); |
2625 } | 2632 } |
2626 | 2633 |
2627 void showNodePath(const WebCore::Node* node) | 2634 void showNodePath(const WebCore::Node* node) |
2628 { | 2635 { |
2629 if (node) | 2636 if (node) |
2630 node->showNodePathForThis(); | 2637 node->showNodePathForThis(); |
2631 } | 2638 } |
2632 | 2639 |
2633 #endif | 2640 #endif |
OLD | NEW |