Reviewed by Sam Weinig.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Nov 2006 18:59:12 +0000 (18:59 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Nov 2006 18:59:12 +0000 (18:59 +0000)
commit588fe1dc9c7acb83cb9787a6cffa4e9e0f634f81
treee66b0dc063318b076cc9866100f1ec92dca999c5
parente9312d93ce1806c59d4b67da554c6c1e385c7d47
    Reviewed by Sam Weinig.

        http://bugs.webkit.org/show_bug.cgi?id=11633
        Implement XMLDocument properties xmlEncoding, xmlVersion, xmlStandalone

WebCore:
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::setXMLVersion):
        (WebCore::Document::setXMLStandalone):
        * dom/Document.h:
        (WebCore::Document::xmlEncoding):
        (WebCore::Document::xmlVersion):
        (WebCore::Document::xmlStandalone):
        (WebCore::Document::setXMLEncoding):
        * dom/Document.idl:
        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::startDocument):
        (WebCore::startDocumentHandler):
        (WebCore::XMLTokenizer::initializeParserContext):
        Added support for these properties, getting them from an libxml2 context.

        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::HTMLDocument):
        HTMLDocument is the only kind of document that doesn't have xmlVersion default to "1.0".

        * bindings/scripts/CodeGeneratorJS.pm:
        * bindings/scripts/CodeGeneratorObjC.pm:
        Added WK_ucfirst to properly uppercase xmlVersion and xmlStandalone.

LayoutTests:
        * dom/xhtml/level3/core/documentgetxmlencoding01-expected.txt:
        * dom/xhtml/level3/core/documentgetxmlencoding03-expected.txt
        * dom/xhtml/level3/core/documentgetxmlstandalone04-expected.txt:
        * dom/xhtml/level3/core/documentgetxmlversion01-expected.txt:
        * dom/xhtml/level3/core/documentgetxmlversion02-expected.txt:
        * dom/xhtml/level3/core/documentgetxmlversion03-expected.txt:
        These now pass.

        * dom/xhtml/level3/core/documentgetxmlencoding03.xhtml: Re-added a correct test.

        * fast/dom/Window/window-properties-expected.txt: Added these new properties.

        * http/tests/xmlhttprequest/xml-encoding-expected.txt: Added.
        * http/tests/xmlhttprequest/xml-encoding.html: Added.
        * http/tests/xmlhttprequest/resources/xml-encoding.xml: Added.
        * http/tests/xmlhttprequest/resources/post-echo-as-utf-8.cgi: Added.
        Test how xmlEncoding interacts with XMLHttpRequest.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
LayoutTests/ChangeLog
LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding01-expected.txt
LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding03-expected.txt
LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding03.xhtml [new file with mode: 0644]
LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone04-expected.txt
LayoutTests/dom/xhtml/level3/core/documentgetxmlversion01-expected.txt
LayoutTests/dom/xhtml/level3/core/documentgetxmlversion02-expected.txt
LayoutTests/dom/xhtml/level3/core/documentgetxmlversion03-expected.txt
LayoutTests/fast/dom/Window/window-properties-expected.txt
LayoutTests/http/tests/xmlhttprequest/resources/post-echo-as-utf-8.cgi [new file with mode: 0755]
LayoutTests/http/tests/xmlhttprequest/resources/xml-encoding.xml [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/xml-encoding-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/xml-encoding.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/bindings/scripts/CodeGeneratorObjC.pm
WebCore/dom/Document.cpp
WebCore/dom/Document.h
WebCore/dom/Document.idl
WebCore/dom/XMLTokenizer.cpp
WebCore/html/HTMLDocument.cpp