Bug 30992

Summary: Node.isDefaultNamespace doesn't convert empty strings to null
Product: WebKit Reporter: nanto_vi (TOYAMA Nao) <nanto>
Component: DOMAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
proposed fix mitz: review+

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.