LayoutTests:

        Reviewed by Darin.

        Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5624
        document.createElementNS() should not allow to insert a second <html> element

        * dom/xhtml/level3/core/documentnormalizedocument10-expected.txt:
        Updated to show a different failure.

        * dom/xhtml/level3/core/nodeappendchild02-expected.txt:
        * dom/xhtml/level3/core/nodeinsertbefore06-expected.txt:
        * dom/xhtml/level3/core/nodereplacechild39-expected.txt:
        Updated to reflect success.

        * fast/dom/createDocumentType2.html: Added.
        * fast/dom/createDocumentType2-expected.txt: Added.
        * fast/dom/createElementNS.html: Added.
        * fast/dom/createElementNS-expected.txt: Added.

WebCore:

        Reviewed by Darin.

        Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5624
        document.createElementNS() should not allow to insert a second <html> element

        Do extra checks for document nodes to detect multiple document elements
        and document types.

        * dom/Document.cpp:
        (WebCore::Document::childTypeAllowed):
        * dom/Document.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed