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 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1335 { | 1335 { |
1336 if (localName.isNull()) | 1336 if (localName.isNull()) |
1337 return 0; | 1337 return 0; |
1338 | 1338 |
1339 if (namespaceURI == starAtom) | 1339 if (namespaceURI == starAtom) |
1340 return getElementsByTagName(localName); | 1340 return getElementsByTagName(localName); |
1341 | 1341 |
1342 return ensureRareData().ensureNodeLists().addCacheWithQualifiedName(this, na
mespaceURI.isEmpty() ? nullAtom : namespaceURI, localName); | 1342 return ensureRareData().ensureNodeLists().addCacheWithQualifiedName(this, na
mespaceURI.isEmpty() ? nullAtom : namespaceURI, localName); |
1343 } | 1343 } |
1344 | 1344 |
1345 PassRefPtr<NodeList> Node::getElementsByName(const String& elementName) | 1345 // Takes an AtomicString in argument because it is common for elements to share
the same name attribute. |
| 1346 // Therefore, the NameNodeList factory function expects an AtomicString type. |
| 1347 PassRefPtr<NodeList> Node::getElementsByName(const AtomicString& elementName) |
1346 { | 1348 { |
1347 return ensureRareData().ensureNodeLists().addCacheWithAtomicName<NameNodeLis
t>(this, NameNodeListType, elementName); | 1349 return ensureRareData().ensureNodeLists().addCacheWithAtomicName<NameNodeLis
t>(this, NameNodeListType, elementName); |
1348 } | 1350 } |
1349 | 1351 |
1350 PassRefPtr<NodeList> Node::getElementsByClassName(const String& classNames) | 1352 // Takes an AtomicString in argument because it is common for elements to share
the same set of class names. |
| 1353 // Therefore, the ClassNodeList factory function expects an AtomicString type. |
| 1354 PassRefPtr<NodeList> Node::getElementsByClassName(const AtomicString& classNames
) |
1351 { | 1355 { |
1352 return ensureRareData().ensureNodeLists().addCacheWithName<ClassNodeList>(th
is, ClassNodeListType, classNames); | 1356 return ensureRareData().ensureNodeLists().addCacheWithAtomicName<ClassNodeLi
st>(this, ClassNodeListType, classNames); |
1353 } | 1357 } |
1354 | 1358 |
1355 PassRefPtr<RadioNodeList> Node::radioNodeList(const AtomicString& name, bool onl
yMatchImgElements) | 1359 PassRefPtr<RadioNodeList> Node::radioNodeList(const AtomicString& name, bool onl
yMatchImgElements) |
1356 { | 1360 { |
1357 ASSERT(hasTagName(formTag) || hasTagName(fieldsetTag)); | 1361 ASSERT(hasTagName(formTag) || hasTagName(fieldsetTag)); |
1358 CollectionType type = onlyMatchImgElements ? RadioImgNodeListType : RadioNod
eListType; | 1362 CollectionType type = onlyMatchImgElements ? RadioImgNodeListType : RadioNod
eListType; |
1359 return ensureRareData().ensureNodeLists().addCacheWithAtomicName<RadioNodeLi
st>(this, type, name); | 1363 return ensureRareData().ensureNodeLists().addCacheWithAtomicName<RadioNodeLi
st>(this, type, name); |
1360 } | 1364 } |
1361 | 1365 |
1362 PassRefPtr<Element> Node::querySelector(const AtomicString& selectors, Exception
State& exceptionState) | 1366 PassRefPtr<Element> Node::querySelector(const AtomicString& selectors, Exception
State& exceptionState) |
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2738 node->showTreeForThis(); | 2742 node->showTreeForThis(); |
2739 } | 2743 } |
2740 | 2744 |
2741 void showNodePath(const WebCore::Node* node) | 2745 void showNodePath(const WebCore::Node* node) |
2742 { | 2746 { |
2743 if (node) | 2747 if (node) |
2744 node->showNodePathForThis(); | 2748 node->showNodePathForThis(); |
2745 } | 2749 } |
2746 | 2750 |
2747 #endif | 2751 #endif |
OLD | NEW |