[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:27:56 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit fd3e245f161e77d5e7b3a393c82f561586de42dc
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Aug 24 08:15:16 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-24 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Tor Arne Vestbø and Nikolas Zimmermann.
setAttributeNS() should throw NAMESPACE_ERR for prefixed qualifiedName with null namespace
https://bugs.webkit.org/show_bug.cgi?id=44432
- Added a test for the new behavior.
- Rebaselined svg/custom/missing-xlink.svg
* 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.
* platform/chromium-mac/svg/custom/missing-xlink-expected.txt:
* platform/chromium-win/svg/custom/missing-xlink-expected.txt:
* platform/mac-leopard/svg/custom/missing-xlink-expected.txt:
* platform/mac/svg/custom/missing-xlink-expected.txt:
* platform/win/svg/custom/missing-xlink-expected.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f4621d6..33a8937 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,22 @@
+2010-08-24 Andreas Kling <andreas.kling at nokia.com>
+
+ Reviewed by Tor Arne Vestbø and Nikolas Zimmermann.
+
+ setAttributeNS() should throw NAMESPACE_ERR for prefixed qualifiedName with null namespace
+ https://bugs.webkit.org/show_bug.cgi?id=44432
+
+ - Added a test for the new behavior.
+ - Rebaselined svg/custom/missing-xlink.svg
+
+ * 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.
+ * platform/chromium-mac/svg/custom/missing-xlink-expected.txt:
+ * platform/chromium-win/svg/custom/missing-xlink-expected.txt:
+ * platform/mac-leopard/svg/custom/missing-xlink-expected.txt:
+ * platform/mac/svg/custom/missing-xlink-expected.txt:
+ * platform/win/svg/custom/missing-xlink-expected.txt:
+
2010-08-24 Roland Steiner <rolandsteiner at chromium.org>
Unreviewed: upstreaming chromium test suppressions.
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/LayoutTests/platform/chromium-mac/svg/custom/missing-xlink-expected.txt b/LayoutTests/platform/chromium-mac/svg/custom/missing-xlink-expected.txt
index 550e3d9..db64f4a 100644
--- a/LayoutTests/platform/chromium-mac/svg/custom/missing-xlink-expected.txt
+++ b/LayoutTests/platform/chromium-mac/svg/custom/missing-xlink-expected.txt
@@ -20,5 +20,3 @@ layer at (0,0) size 785x778
RenderSVGInlineText {#text} at (0,0) size 193x18
chunk 1 text run 1 at (0.00,120.00) startOffset 0 endOffset 29 width 193.00: "You should see an error above"
RenderPath {rect} at (8,166) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
- RenderSVGContainer {a} at (8,166) size 100x100
- RenderPath {rect} at (8,166) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
diff --git a/LayoutTests/platform/mac-leopard/svg/custom/missing-xlink-expected.txt b/LayoutTests/platform/mac-leopard/svg/custom/missing-xlink-expected.txt
index 224f556..7b42929 100644
--- a/LayoutTests/platform/mac-leopard/svg/custom/missing-xlink-expected.txt
+++ b/LayoutTests/platform/mac-leopard/svg/custom/missing-xlink-expected.txt
@@ -20,5 +20,3 @@ layer at (0,0) size 785x778
RenderSVGInlineText {#text} at (0,0) size 193x18
chunk 1 text run 1 at (0.00,120.00) startOffset 0 endOffset 29 width 193.00: "You should see an error above"
RenderPath {rect} at (8,166) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
- RenderSVGContainer {a} at (8,166) size 100x100
- RenderPath {rect} at (8,166) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/custom/missing-xlink-expected.txt b/LayoutTests/platform/mac/svg/custom/missing-xlink-expected.txt
index 550e3d9..db64f4a 100644
--- a/LayoutTests/platform/mac/svg/custom/missing-xlink-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/missing-xlink-expected.txt
@@ -20,5 +20,3 @@ layer at (0,0) size 785x778
RenderSVGInlineText {#text} at (0,0) size 193x18
chunk 1 text run 1 at (0.00,120.00) startOffset 0 endOffset 29 width 193.00: "You should see an error above"
RenderPath {rect} at (8,166) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
- RenderSVGContainer {a} at (8,166) size 100x100
- RenderPath {rect} at (8,166) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
diff --git a/LayoutTests/platform/win/svg/custom/missing-xlink-expected.txt b/LayoutTests/platform/win/svg/custom/missing-xlink-expected.txt
index 550e3d9..db64f4a 100644
--- a/LayoutTests/platform/win/svg/custom/missing-xlink-expected.txt
+++ b/LayoutTests/platform/win/svg/custom/missing-xlink-expected.txt
@@ -20,5 +20,3 @@ layer at (0,0) size 785x778
RenderSVGInlineText {#text} at (0,0) size 193x18
chunk 1 text run 1 at (0.00,120.00) startOffset 0 endOffset 29 width 193.00: "You should see an error above"
RenderPath {rect} at (8,166) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
- RenderSVGContainer {a} at (8,166) size 100x100
- RenderPath {rect} at (8,166) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3aa24cd..415a015 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-24 Adam Barth <abarth at webkit.org>
Build fix. leakPtr doesn't exist, contrary to my dreams.
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