[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
eric at webkit.org
eric at webkit.org
Wed Apr 7 23:59:35 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit 1862c84ef73bfe6868b985d32eaba3521b3741ec
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 30 01:02:43 2009 +0000
2009-11-29 Shu Chang <Chang.Shu at nokia.com>
Reviewed by Eric Seidel.
Test using Id as index of node list.
https://bugs.webkit.org/show_bug.cgi?id=31428
* fast/dom/Element/id-in-node-list-index01-expected.txt: Added.
* fast/dom/Element/id-in-node-list-index01.html: Added.
2009-11-29 Shu Chang <Chang.Shu at nokia.com>
Reviewed by Eric Seidel.
Continue to search for matching node in the case where multiple nodes
have the same id.
https://bugs.webkit.org/show_bug.cgi?id=31428
Test: fast/dom/Element/id-in-node-list-index01.html
* dom/DynamicNodeList.cpp:
(WebCore::DynamicNodeList::itemWithName):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c8a3bec..56d6d29 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2009-11-29 Shu Chang <Chang.Shu at nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ Test using Id as index of node list.
+ https://bugs.webkit.org/show_bug.cgi?id=31428
+
+ * fast/dom/Element/id-in-node-list-index01-expected.txt: Added.
+ * fast/dom/Element/id-in-node-list-index01.html: Added.
+
2009-11-28 Adam Barth <abarth at webkit.org>
Reviewed by Dimitri Glazkov.
diff --git a/LayoutTests/fast/dom/Element/id-in-node-list-index01-expected.txt b/LayoutTests/fast/dom/Element/id-in-node-list-index01-expected.txt
new file mode 100644
index 0000000..f36780d
--- /dev/null
+++ b/LayoutTests/fast/dom/Element/id-in-node-list-index01-expected.txt
@@ -0,0 +1,11 @@
+Test using id as index of node list
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS elems["id1"].getAttribute("name") is "name1"
+PASS elems["id2"].getAttribute("name") is "name2"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/Element/id-in-node-list-index01.html b/LayoutTests/fast/dom/Element/id-in-node-list-index01.html
new file mode 100644
index 0000000..6b35841
--- /dev/null
+++ b/LayoutTests/fast/dom/Element/id-in-node-list-index01.html
@@ -0,0 +1,26 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+
+<div name='name1' id='id1'/>
+<p name='name3' id='id2'/>
+<div name='name2' id='id2'/>
+
+<script>
+description("Test using id as index of node list");
+
+var elems = document.getElementsByTagName('div');
+
+shouldBe('elems["id1"].getAttribute("name")', '"name1"');
+shouldBe('elems["id2"].getAttribute("name")', '"name2"');
+
+var successfullyParsed = true;
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 859d265..09554fb 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2009-11-29 Shu Chang <Chang.Shu at nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ Continue to search for matching node in the case where multiple nodes
+ have the same id.
+ https://bugs.webkit.org/show_bug.cgi?id=31428
+
+ Test: fast/dom/Element/id-in-node-list-index01.html
+
+ * dom/DynamicNodeList.cpp:
+ (WebCore::DynamicNodeList::itemWithName):
+
2009-11-29 Daniel Bates <dbates at webkit.org>
Reviewed by Eric Seidel.
diff --git a/WebCore/dom/DynamicNodeList.cpp b/WebCore/dom/DynamicNodeList.cpp
index 892a5e7..3f0744b 100644
--- a/WebCore/dom/DynamicNodeList.cpp
+++ b/WebCore/dom/DynamicNodeList.cpp
@@ -129,7 +129,9 @@ Node* DynamicNodeList::itemWithName(const AtomicString& elementId) const
return node;
}
}
- return 0;
+ if (!node)
+ return 0;
+ // In the case of multiple nodes with the same name, just fall through.
}
unsigned length = this->length();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list