Reviewed by Darin.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Dec 2003 01:54:56 +0000 (01:54 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Dec 2003 01:54:56 +0000 (01:54 +0000)
<rdar://problem/3464315>: createDocument creates document with initial child element, unlike other browsers

        * khtml/xml/dom_docimpl.cpp:
        (DOMImplementationImpl::createDocument): Don;t add initial element.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@5776 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/xml/dom_docimpl.cpp

index f19f4b21f30083494e6ac61037f7d080cc6b9a2e..7bc38fb1aae946f5bc135522eee0067a7e63fef2 100644 (file)
@@ -1,3 +1,12 @@
+2003-12-11  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Darin.
+
+       <rdar://problem/3464315>: createDocument creates document with initial child element, unlike other browsers
+       
+        * khtml/xml/dom_docimpl.cpp:
+        (DOMImplementationImpl::createDocument): Don;t add initial element.
+
 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Darin. 
index fd72d06cc0a2f471b339abddbec22807ec5c21d0..d81ebd8f6954471d80a30f6c7c5855f2f198e923 100644 (file)
@@ -185,15 +185,6 @@ DocumentImpl *DOMImplementationImpl::createDocument( const DOMString &namespaceU
     if (doc->doctype() && dtype)
         doc->doctype()->copyFrom(*dtype);
 
-    ElementImpl *element = doc->createElementNS(namespaceURI,qualifiedName,exceptioncode);
-    if (element)
-        doc->appendChild(element,exceptioncode);
-    if (exceptioncode) {
-        delete element;
-        delete doc;
-        return 0;
-    }
-
     return doc;
 }