Bug 149238 - Element's attribute NS API should treat defined undefined namespace as null
Summary: Element's attribute NS API should treat defined undefined namespace as null
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar, WebExposed
Depends on:
Blocks:
 
Reported: 2015-09-16 16:40 PDT by Chris Dumez
Modified: 2015-09-16 18:25 PDT (History)
3 users (show)

See Also:


Attachments
Patch (5.77 KB, patch)
2015-09-16 16:45 PDT, Chris Dumez
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2015-09-16 16:40:07 PDT
Element's attribute NS API should defined undefined namespace as null instead of converting it to the "undefined" String. This is because the namespace parameter is a nullable String as per the DOM spec:
https://dom.spec.whatwg.org/#element

The attribute is nullable and WebIDL says undefined should be converted to null for nullable parameters:
https://heycam.github.io/webidl/#es-nullable-type (step 3)
Comment 1 Chris Dumez 2015-09-16 16:45:51 PDT
Created attachment 261338 [details]
Patch
Comment 2 Chris Dumez 2015-09-16 16:46:22 PDT
rdar://problem/22562204
Comment 3 Ryosuke Niwa 2015-09-16 18:23:02 PDT
Comment on attachment 261338 [details]
Patch

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

> Source/WebCore/ChangeLog:9
> +        Element's attribute NS API should defined undefined namespace as null

should treat?
Comment 4 Chris Dumez 2015-09-16 18:25:12 PDT
Committed r189893: <http://trac.webkit.org/changeset/189893>