Bug 153119 - createElementNS and createAttributeNS should treat undefined namespaceURI as null string
Summary: createElementNS and createAttributeNS should treat undefined namespaceURI as ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-15 00:21 PST by Ryosuke Niwa
Modified: 2016-01-15 15:06 PST (History)
7 users (show)

See Also:


Attachments
Fixes the bug (9.28 KB, patch)
2016-01-15 00:24 PST, Ryosuke Niwa
cdumez: review+
cdumez: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2016-01-15 00:21:57 PST
Related to webkit.org/b/149238.  We should treat undefined as nulls in createElementNS and createAttributeNS.
Comment 1 Ryosuke Niwa 2016-01-15 00:24:10 PST
Created attachment 269041 [details]
Fixes the bug
Comment 2 Chris Dumez 2016-01-15 09:05:53 PST
Comment on attachment 269041 [details]
Fixes the bug

View in context: https://bugs.webkit.org/attachment.cgi?id=269041&action=review

r=me with comments.

> LayoutTests/fast/dom/Document/createAttributeNS-undefined-namespace-expected.txt:3
> +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

There is no TEST COMPLETE at the end :P

> LayoutTests/fast/dom/Document/createAttributeNS-undefined-namespace.html:10
> +shouldBe('attr.prefix', 'null');

shouldBeNull()

> LayoutTests/fast/dom/Document/createAttributeNS-undefined-namespace.html:11
> +shouldBe('attr.localName', '"foo"');

shouldBeEqualToString()

> LayoutTests/fast/dom/Document/createAttributeNS-undefined-namespace.html:12
> +shouldBe('attr.namespaceURI', 'null');

shouldBeNull()

> LayoutTests/fast/dom/Document/createAttributeNS-undefined-namespace.html:13
> +shouldBe('element.getAttributeNodeNS(null, "foo")', 'null');

shouldBeNull()

> LayoutTests/fast/dom/Document/createAttributeNS-undefined-namespace.html:16
> +</script>

You're missing the -post script.
Comment 3 Ryosuke Niwa 2016-01-15 15:06:43 PST
Committed r195152: <http://trac.webkit.org/changeset/195152>