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 f19f4b2..7bc38fb 100644 (file)
@@ -1,5 +1,14 @@
 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. 
 
        <rdar://problem/3507863>: XMLHttpRequest should not parse response if HTML
index fd72d06..d81ebd8 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;
 }