Changeset 30096
- Timestamp:
- 02/08/08 12:05:24 (10 months ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 modified
- 1 copied
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/dom/SelectorAPI/elementRoot-expected.txt (added)
-
LayoutTests/fast/dom/SelectorAPI/elementRoot.html (added)
-
LayoutTests/fast/dom/SelectorAPI/resources (added)
-
LayoutTests/fast/dom/SelectorAPI/resources/TEMPLATE.html (copied) (copied from trunk/LayoutTests/fast/js/resources/TEMPLATE.html)
-
LayoutTests/fast/dom/SelectorAPI/resources/elementRoot.js (added)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/dom/Node.cpp (modified) (1 diff)
-
WebCore/dom/SelectorNodeList.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r30089 r30096 1 2008-02-08 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Hyatt. 4 5 Test for <rdar://problem/5732491> 6 http://bugs.webkit.org/show_bug.cgi?id=17213 7 The querySelectorAll method on an element node does not search only the element's descendants 8 9 * fast/dom/SelectorAPI/elementRoot-expected.txt: Added. 10 * fast/dom/SelectorAPI/elementRoot.html: Added. 11 * fast/dom/SelectorAPI/resources: Added. 12 * fast/dom/SelectorAPI/resources/TEMPLATE.html: Copied from LayoutTests/fast/js/resources/TEMPLATE.html. 13 * fast/dom/SelectorAPI/resources/elementRoot.js: Added. 14 1 15 2008-02-08 Darin Adler <darin@apple.com> 2 16 -
trunk/WebCore/ChangeLog
r30095 r30096 1 2008-02-08 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Hyatt. 4 5 Fix for <rdar://problem/5732491> 6 http://bugs.webkit.org/show_bug.cgi?id=17213 7 The querySelectorAll method on an element node does not search only the element's descendants 8 9 Test: fast/dom/SelectorAPI/elementRoot.html 10 11 * dom/Node.cpp: 12 (WebCore::Node::querySelector): Make sure to stay within the root node when traversing the tree. 13 * dom/SelectorNodeList.cpp: 14 (WebCore::SelectorNodeList::SelectorNodeList): ditto. 15 1 16 2008-02-08 David Hyatt <hyatt@apple.com> 2 17 -
trunk/WebCore/dom/Node.cpp
r30089 r30096 1227 1227 1228 1228 // FIXME: We can speed this up by implementing caching similar to the one use by getElementById 1229 for (Node *n = traverseNextNode(); n; n = n->traverseNextNode()) {1229 for (Node* n = firstChild(); n; n = n->traverseNextNode(this)) { 1230 1230 if (n->isElementNode()) { 1231 1231 Element* element = static_cast<Element*>(n); -
trunk/WebCore/dom/SelectorNodeList.cpp
r29663 r30096 42 42 Document* document = rootNode->document(); 43 43 CSSStyleSelector* styleSelector = document->styleSelector(); 44 for (Node* n = rootNode-> traverseNextNode(); n; n = n->traverseNextNode()) {44 for (Node* n = rootNode->firstChild(); n; n = n->traverseNextNode(rootNode.get())) { 45 45 if (n->isElementNode()) { 46 46 styleSelector->initElementAndPseudoState(static_cast<Element*>(n));