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 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 for (Node* node = child.firstChild(); node; node = node->nextSibling()) { | 106 for (Node* node = child.firstChild(); node; node = node->nextSibling()) { |
107 if (!childTypeAllowed(node->nodeType())) | 107 if (!childTypeAllowed(node->nodeType())) |
108 return false; | 108 return false; |
109 } | 109 } |
110 return true; | 110 return true; |
111 } | 111 } |
112 | 112 |
113 bool ContainerNode::containsConsideringHostElements(const Node& newChild) const | 113 bool ContainerNode::containsConsideringHostElements(const Node& newChild) const |
114 { | 114 { |
115 if (isInShadowTree() || document() == document().templateDocument()) | 115 if (isInShadowTree() || document().isTemplateDocument()) |
116 return newChild.containsIncludingHostElements(*this); | 116 return newChild.containsIncludingHostElements(*this); |
117 return newChild.contains(this); | 117 return newChild.contains(this); |
118 } | 118 } |
119 | 119 |
120 bool ContainerNode::checkAcceptChild(const Node* newChild, const Node* oldChild,
ExceptionState& exceptionState) const | 120 bool ContainerNode::checkAcceptChild(const Node* newChild, const Node* oldChild,
ExceptionState& exceptionState) const |
121 { | 121 { |
122 // Not mentioned in spec: throw NotFoundError if newChild is null | 122 // Not mentioned in spec: throw NotFoundError if newChild is null |
123 if (!newChild) { | 123 if (!newChild) { |
124 exceptionState.throwDOMException(NotFoundError, "The new child element i
s null."); | 124 exceptionState.throwDOMException(NotFoundError, "The new child element i
s null."); |
125 return false; | 125 return false; |
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 return true; | 1067 return true; |
1068 | 1068 |
1069 if (node->isElementNode() && toElement(node)->shadow()) | 1069 if (node->isElementNode() && toElement(node)->shadow()) |
1070 return true; | 1070 return true; |
1071 | 1071 |
1072 return false; | 1072 return false; |
1073 } | 1073 } |
1074 #endif | 1074 #endif |
1075 | 1075 |
1076 } // namespace WebCore | 1076 } // namespace WebCore |
OLD | NEW |