<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>25111</bug_id>
          
          <creation_ts>2009-04-09 03:19:02 -0700</creation_ts>
          <short_desc>document.implementation.createDocument is too lenient</short_desc>
          <delta_ts>2022-07-21 17:02:36 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>25096</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>rniwa</cc>
    
    <cc>rwlbuis</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>117007</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-04-09 03:19:02 -0700</bug_when>
    <thetext>document.implementation.createDocument is too lenient

This was discovered while writing a test for bug 25096 (fast/dom/DOMImplementation/createDocument-namespace-err.html)
I copied fast/dom/Document/resources/createElementNS-namespace-err.js which was written as part of bug 16833.

Our failures:
FAIL createDocument(, null, null)
FAIL createDocument(null, null, null)
FAIL createDocument(null, &quot;&quot;, null)
FAIL createDocument(&quot;&quot;, null, null)
FAIL createDocument(&quot;&quot;, &quot;&quot;, null)

(No message means that we didn&apos;t throw an exception when one was expected... the test could be improved to display that.)

FF behavior:
FAIL createDocument(, null, null); expected INVALID_CHARACTER_ERR, threw NAMESPACE_ERR
FAIL createDocument(null, null, null)
FAIL createDocument(null, &quot;&quot;, null)
FAIL createDocument(&quot;&quot;, null, null); expected INVALID_CHARACTER_ERR, threw NAMESPACE_ERR
FAIL createDocument(&quot;&quot;, &quot;&quot;, null)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117010</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-04-09 03:28:55 -0700</bug_when>
    <thetext>The relevant portion of the DOM3 spec:
http://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-DOM-createDocument</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>906203</commentid>
    <comment_count>2</comment_count>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2013-07-04 09:14:13 -0700</bug_when>
    <thetext>When I read DOM4 it seems lenient too:

http://dom.spec.whatwg.org/#dom-domimplementation-createdocument

Whereas DOM2/3 was strict indeed:

http://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-DOM-createDocument
NAMESPACE_ERR: if the qualifiedName is null and the namespaceURI is different from null.

FF latest version seem to be lenient like us, for the given 5 subtests it matches WebKit:

FAIL createDocument(, null, null)
FAIL createDocument(null, null, null)
FAIL createDocument(null, &quot;&quot;, null)
FAIL createDocument(&quot;&quot;, null, null)
FAIL createDocument(&quot;&quot;, &quot;&quot;, null)

Should we close the bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1503101</commentid>
    <comment_count>3</comment_count>
    <who name="Lucas Forschler">lforschler</who>
    <bug_when>2019-02-06 09:04:06 -0800</bug_when>
    <thetext>Mass moving XML DOM bugs to the &quot;DOM&quot; Component.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1885853</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-21 15:41:51 -0700</bug_when>
    <thetext>Safari 15.6 has full coverage of these in WPT:

https://wpt.fyi/results/dom/nodes?label=master&amp;label=experimental&amp;aligned&amp;q=createdocument

Is there anything needed more here? Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1885875</commentid>
    <comment_count>5</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-07-21 17:02:36 -0700</bug_when>
    <thetext>Neat. We&apos;re the only engine to pass all the tests even.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>