[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andreas.kling at nokia.com
andreas.kling at nokia.com
Wed Dec 22 12:26:04 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e674fbf199aa6734659b0af969c0179268dc1290
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Aug 23 16:34:54 2010 +0000
2010-08-23 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Tor Arne Vestbø.
setAttributeNS() should throw NAMESPACE_ERR for prefixed qualifiedName with null namespace
https://bugs.webkit.org/show_bug.cgi?id=44432
Test: fast/dom/setAttributeNS-prefix-and-null-namespace.html
* dom/Element.cpp:
(WebCore::Element::setAttributeNS): Throw NAMESPACE_ERR if namespace is null
and the qualifiedName has a prefix.
2010-08-23 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Tor Arne Vestbø.
setAttributeNS() should throw NAMESPACE_ERR for prefixed qualifiedName with null namespace
https://bugs.webkit.org/show_bug.cgi?id=44432
* fast/dom/script-tests/setAttributeNS-prefix-and-null-namespace.js: Added.
* fast/dom/setAttributeNS-prefix-and-null-namespace-expected.txt: Added.
* fast/dom/setAttributeNS-prefix-and-null-namespace.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5f248b6..42980ee 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-23 Andreas Kling <andreas.kling at nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ setAttributeNS() should throw NAMESPACE_ERR for prefixed qualifiedName with null namespace
+ https://bugs.webkit.org/show_bug.cgi?id=44432
+
+ * fast/dom/script-tests/setAttributeNS-prefix-and-null-namespace.js: Added.
+ * fast/dom/setAttributeNS-prefix-and-null-namespace-expected.txt: Added.
+ * fast/dom/setAttributeNS-prefix-and-null-namespace.html: Added.
+
2010-08-23 Hironori Bono <hbono at chromium.org>
Reviewed by Kent Tamura.
diff --git a/LayoutTests/fast/dom/script-tests/setAttributeNS-prefix-and-null-namespace.js b/LayoutTests/fast/dom/script-tests/setAttributeNS-prefix-and-null-namespace.js
new file mode 100644
index 0000000..c07f4c0
--- /dev/null
+++ b/LayoutTests/fast/dom/script-tests/setAttributeNS-prefix-and-null-namespace.js
@@ -0,0 +1,5 @@
+description("Test that calling setAttributeNS() with a prefixed qualifiedName and null NS throws NAMESPACE_ERR.");
+
+shouldThrow("document.createElement('test').setAttributeNS(null, 'foo:bar', 'baz')", "'Error: NAMESPACE_ERR: DOM Exception 14'");
+
+var successfullyParsed = true;
diff --git a/LayoutTests/fast/dom/setAttributeNS-prefix-and-null-namespace-expected.txt b/LayoutTests/fast/dom/setAttributeNS-prefix-and-null-namespace-expected.txt
new file mode 100644
index 0000000..7dc6dc5
--- /dev/null
+++ b/LayoutTests/fast/dom/setAttributeNS-prefix-and-null-namespace-expected.txt
@@ -0,0 +1,10 @@
+Test that calling setAttributeNS() with a prefixed qualifiedName and null NS throws NAMESPACE_ERR.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.createElement('test').setAttributeNS(null, 'foo:bar', 'baz') threw exception Error: NAMESPACE_ERR: DOM Exception 14.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/setAttributeNS-prefix-and-null-namespace.html b/LayoutTests/fast/dom/setAttributeNS-prefix-and-null-namespace.html
new file mode 100644
index 0000000..edc9fd3
--- /dev/null
+++ b/LayoutTests/fast/dom/setAttributeNS-prefix-and-null-namespace.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<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>
+<script src="script-tests/setAttributeNS-prefix-and-null-namespace.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4cf38e1..7300a1c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-23 Andreas Kling <andreas.kling at nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ setAttributeNS() should throw NAMESPACE_ERR for prefixed qualifiedName with null namespace
+ https://bugs.webkit.org/show_bug.cgi?id=44432
+
+ Test: fast/dom/setAttributeNS-prefix-and-null-namespace.html
+
+ * dom/Element.cpp:
+ (WebCore::Element::setAttributeNS): Throw NAMESPACE_ERR if namespace is null
+ and the qualifiedName has a prefix.
+
2010-08-23 Ryuan Choi <ryuan.choi at samsung.com>
Reviewed by Antonio Gomes.
diff --git a/WebCore/dom/Element.cpp b/WebCore/dom/Element.cpp
index a469a42..2d44f62 100644
--- a/WebCore/dom/Element.cpp
+++ b/WebCore/dom/Element.cpp
@@ -1213,6 +1213,11 @@ void Element::setAttributeNS(const AtomicString& namespaceURI, const AtomicStrin
if (!Document::parseQualifiedName(qualifiedName, prefix, localName, ec))
return;
+ if (namespaceURI.isNull() && !prefix.isNull()) {
+ ec = NAMESPACE_ERR;
+ return;
+ }
+
QualifiedName qName(prefix, localName, namespaceURI);
if (scriptingPermission == FragmentScriptingNotAllowed && (isEventHandlerAttribute(qName) || isAttributeToRemove(qName, value)))
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list