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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // (if the document changed or oldParent was in a shadow tree, AND *this
is in a shadow tree). | 131 // (if the document changed or oldParent was in a shadow tree, AND *this
is in a shadow tree). |
132 // Can we do better? | 132 // Can we do better? |
133 treeScope()->adoptIfNeeded(child.get()); | 133 treeScope()->adoptIfNeeded(child.get()); |
134 if (attached() && !child->attached()) | 134 if (attached() && !child->attached()) |
135 child->attach(); | 135 child->attach(); |
136 } | 136 } |
137 } | 137 } |
138 | 138 |
139 ContainerNode::~ContainerNode() | 139 ContainerNode::~ContainerNode() |
140 { | 140 { |
141 if (documentInternal()) { | 141 if (AXObjectCache::accessibilityEnabled() && documentInternal() && documentI
nternal()->axObjectCacheExists()) |
142 if (AXObjectCache* cache = documentInternal()->existingAXObjectCache()) | 142 documentInternal()->axObjectCache()->remove(this); |
143 cache->remove(this); | |
144 } | |
145 | 143 |
146 removeDetachedChildren(); | 144 removeDetachedChildren(); |
147 } | 145 } |
148 | 146 |
149 static inline bool isChildTypeAllowed(ContainerNode* newParent, Node* child) | 147 static inline bool isChildTypeAllowed(ContainerNode* newParent, Node* child) |
150 { | 148 { |
151 if (!child->isDocumentFragment()) | 149 if (!child->isDocumentFragment()) |
152 return newParent->childTypeAllowed(child->nodeType()); | 150 return newParent->childTypeAllowed(child->nodeType()); |
153 | 151 |
154 for (Node* node = child->firstChild(); node; node = node->nextSibling()) { | 152 for (Node* node = child->firstChild(); node; node = node->nextSibling()) { |
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 return true; | 1177 return true; |
1180 | 1178 |
1181 if (node->isElementNode() && toElement(node)->shadow()) | 1179 if (node->isElementNode() && toElement(node)->shadow()) |
1182 return true; | 1180 return true; |
1183 | 1181 |
1184 return false; | 1182 return false; |
1185 } | 1183 } |
1186 #endif | 1184 #endif |
1187 | 1185 |
1188 } // namespace WebCore | 1186 } // namespace WebCore |
OLD | NEW |