Bug 30992 - Node.isDefaultNamespace doesn't convert empty strings to null
Summary: Node.isDefaultNamespace doesn't convert empty strings to null
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-01 05:43 PST by nanto_vi (TOYAMA Nao)
Modified: 2019-02-06 09:04 PST (History)
1 user (show)

See Also:


Attachments
proposed fix (4.75 KB, patch)
2009-11-01 16:34 PST, Alexey Proskuryakov
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nanto_vi (TOYAMA Nao) 2009-11-01 05:43:20 PST
Node.isDefaultNamespace('') and Node.isDefaultNamespcae(null) can return different values although DOM3 Core says "In programming languages where empty strings can be differentiated from null, empty strings, when given as a namespace URI, are converted to null."
http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Namespaces-Considerations

To reproduce, execute the following JavaScript code:
document.implementation.createDocument(null, 'root', null).isDefaultNamespace('')

Expected: true
Actual: false

Confirmed on WebKit-r50095
Comment 1 Alexey Proskuryakov 2009-11-01 16:34:30 PST
Created attachment 42284 [details]
proposed fix

And I thought we already fixed all of those..
Comment 2 Alexey Proskuryakov 2009-11-01 17:00:55 PST
Committed <http://trac.webkit.org/changeset/50396>.
Comment 3 Lucas Forschler 2019-02-06 09:04:10 PST
Mass moving XML DOM bugs to the "DOM" Component.