Fix for bug 12751, doctype nodes aren't part of the Document (Acid3).
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Feb 2008 22:47:57 +0000 (22:47 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Feb 2008 22:47:57 +0000 (22:47 +0000)
commit923d5c8d287ea2df2019fa1779906d579533d24d
tree321ad9ff46126be89238766cb4c1034801f188ca
parent40cd86b797758194a3ec55b07803703059006f08
    Fix for bug 12751, doctype nodes aren't part of the Document (Acid3).

        Reviewed by Sam Weinig

        Many tests added in fast/doctypes.

        * dom/DOMImplementation.cpp:
        (WebCore::DOMImplementation::createDocument):
        (WebCore::DOMImplementation::createHTMLDocument):
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::setDocType):
        (WebCore::Document::attach):
        (WebCore::Document::getImageMap):
        * dom/Document.h:
        (WebCore::Document::doctype):
        (WebCore::Document::):
        (WebCore::Document::determineParseMode):
        (WebCore::Document::setParseMode):
        (WebCore::Document::parseMode):
        (WebCore::Document::inCompatMode):
        (WebCore::Document::inAlmostStrictMode):
        (WebCore::Document::inStrictMode):
        * dom/DocumentType.cpp:
        (WebCore::DocumentType::cloneNode):
        (WebCore::DocumentType::insertedIntoDocument):
        (WebCore::DocumentType::removedFromDocument):
        * dom/DocumentType.h:
        * dom/Node.cpp:
        (WebCore::Node::childAllowed):
        * dom/StyledElement.cpp:
        (WebCore::StyledElement::attributeChanged):
        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::internalSubset):
        (WebCore::):
        * editing/markup.cpp:
        (WebCore::appendStartMarkup):
        * html/HTMLAppletElement.cpp:
        (WebCore::HTMLAppletElement::createRenderer):
        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::HTMLDocument):
        (WebCore::HTMLDocument::childAllowed):
        (WebCore::HTMLDocument::determineParseMode):
        * html/HTMLDocument.h:
        * html/HTMLMapElement.cpp:
        (WebCore::HTMLMapElement::parseMappedAttribute):
        * html/HTMLParamElement.cpp:
        (WebCore::HTMLParamElement::parseMappedAttribute):
        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::parseDoctypeToken):
        * html/HTMLParser.h:
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::reset):
        (WebCore::HTMLTokenizer::parseDoctype):
        (WebCore::HTMLTokenizer::parseTag):
        (WebCore::HTMLTokenizer::write):
        (WebCore::HTMLTokenizer::finish):
        (WebCore::HTMLTokenizer::processDoctypeToken):
        * html/HTMLTokenizer.h:
        (WebCore::):
        (WebCore::DoctypeToken::DoctypeToken):
        (WebCore::DoctypeToken::reset):
        (WebCore::DoctypeToken::state):
        (WebCore::DoctypeToken::setState):
        (WebCore::HTMLTokenizer::State::inDoctype):
        (WebCore::HTMLTokenizer::State::setInDoctype):
        (WebCore::HTMLTokenizer::State::needsSpecialWriteHandling):
        (WebCore::HTMLTokenizer::State::):
        * html/HTMLViewSourceDocument.cpp:
        (WebCore::HTMLViewSourceDocument::addViewSourceToken):
        (WebCore::HTMLViewSourceDocument::addViewSourceDoctypeToken):
        * html/HTMLViewSourceDocument.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::write):
        (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
        * page/Frame.cpp:
        (WebCore::Frame::documentTypeString):
        * page/inspector/utilities.js:
        * xml/XSLTProcessor.cpp:
        (WebCore::XSLTProcessor::createDocumentFromSource):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30431 268f45cc-cd09-0410-ab3c-d52691b4dbfc
127 files changed:
LayoutTests/dom/xhtml/level3/core/documentgetdoctype01-expected.txt
LayoutTests/dom/xhtml/level3/core/nodeappendchild01-expected.txt
LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition02-expected.txt
LayoutTests/dom/xhtml/level3/core/nodeinsertbefore02-expected.txt
LayoutTests/dom/xhtml/level3/core/nodeinsertbefore05-expected.txt
LayoutTests/dom/xhtml/level3/core/nodeisequalnode01-expected.txt
LayoutTests/dom/xhtml/level3/core/noderemovechild04-expected.txt
LayoutTests/dom/xhtml/level3/core/noderemovechild05-expected.txt
LayoutTests/dom/xhtml/level3/core/nodereplacechild13-expected.txt
LayoutTests/dom/xhtml/level3/core/nodereplacechild40-expected.txt
LayoutTests/fast/doctypes/doctype-after-comment-expected.txt [new file with mode: 0644]
LayoutTests/fast/doctypes/doctype-after-comment.html [new file with mode: 0644]
LayoutTests/fast/doctypes/doctype-at-end-expected.txt [new file with mode: 0644]
LayoutTests/fast/doctypes/doctype-at-end.html [new file with mode: 0644]
LayoutTests/fast/doctypes/doctype-in-element-expected.txt [new file with mode: 0644]
LayoutTests/fast/doctypes/doctype-in-element.html [new file with mode: 0644]
LayoutTests/fast/doctypes/doctype-parsing-expected.txt [new file with mode: 0644]
LayoutTests/fast/doctypes/doctype-parsing.html [new file with mode: 0644]
LayoutTests/fast/doctypes/html-doctype-expected.txt [new file with mode: 0644]
LayoutTests/fast/doctypes/html-doctype.html [new file with mode: 0644]
LayoutTests/fast/doctypes/resources/TestDoctype.js [new file with mode: 0644]
LayoutTests/fast/doctypes/resources/subframe.html [new file with mode: 0644]
LayoutTests/fast/doctypes/xml-doctype-expected.txt [new file with mode: 0644]
LayoutTests/fast/doctypes/xml-doctype.xhtml [new file with mode: 0644]
LayoutTests/fast/js/date-DST-time-cusps-expected.txt
LayoutTests/platform/mac-leopard/svg/W3C-SVG-1.1/text-tselect-02-f-expected.txt
LayoutTests/platform/mac-leopard/svg/custom/foreignObject-crash-on-hover-expected.txt
LayoutTests/platform/mac-leopard/svg/custom/text-dom-01-f-expected.txt
LayoutTests/platform/mac-leopard/svg/custom/text-hit-test-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-align-01-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-align-02-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-align-03-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-align-04-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-align-05-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-align-06-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-altglyph-01-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-deco-01-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-fonts-01-t-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-fonts-02-t-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-path-01-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-spacing-01-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-text-01-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-text-03-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-text-04-t-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-text-05-t-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-text-06-t-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-text-07-t-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-text-08-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-tref-01-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-tselect-01-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-tselect-02-f-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-tspan-01-b-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-ws-01-t-expected.txt
LayoutTests/platform/mac-leopard/svg/text/text-ws-02-t-expected.txt
LayoutTests/platform/mac/editing/pasteboard/4631972-expected.txt
LayoutTests/platform/mac/editing/pasteboard/paste-xml-expected.txt
LayoutTests/platform/mac/fast/css-generated-content/hover-style-change-expected.txt
LayoutTests/platform/mac/fast/css-generated-content/positioned-background-hit-test-crash-expected.txt
LayoutTests/platform/mac/fast/doctypes/003-expected.txt
LayoutTests/platform/mac/fast/dom/attr_dead_doc-expected.txt
LayoutTests/platform/mac/fast/dom/dom-parse-serialize-display-expected.txt
LayoutTests/platform/mac/fast/dynamic/selection-highlight-adjust-expected.txt
LayoutTests/platform/mac/fast/flexbox/016-expected.txt
LayoutTests/platform/mac/fast/forms/input-double-click-selection-gap-bug-expected.txt
LayoutTests/platform/mac/fast/forms/tabbing-input-iframe-expected.txt
LayoutTests/platform/mac/fast/frames/001-expected.txt
LayoutTests/platform/mac/fast/frames/002-expected.txt
LayoutTests/platform/mac/fast/frames/calculate-fixed-expected.txt
LayoutTests/platform/mac/fast/frames/calculate-order-expected.txt
LayoutTests/platform/mac/fast/frames/calculate-percentage-expected.txt
LayoutTests/platform/mac/fast/frames/calculate-relative-expected.txt
LayoutTests/platform/mac/fast/frames/calculate-round-expected.txt
LayoutTests/platform/mac/fast/frames/contentWindow_Frame-expected.txt
LayoutTests/platform/mac/fast/frames/contentWindow_iFrame-expected.txt
LayoutTests/platform/mac/fast/frames/empty-frame-src-expected.txt
LayoutTests/platform/mac/fast/frames/iframe-option-crash-expected.txt
LayoutTests/platform/mac/fast/frames/iframe-text-contents-expected.txt
LayoutTests/platform/mac/fast/frames/iframe-with-frameborder-expected.txt
LayoutTests/platform/mac/fast/frames/invalid-expected.txt
LayoutTests/platform/mac/fast/frames/no-frame-borders-expected.txt
LayoutTests/platform/mac/fast/frames/valid-expected.txt
LayoutTests/platform/mac/fast/lists/markers-in-selection-expected.txt
LayoutTests/platform/mac/fast/media/mq-js-stylesheet-media-04-expected.txt
LayoutTests/platform/mac/fast/repaint/inline-outline-repaint-expected.txt
LayoutTests/platform/mac/fast/replaced/replaced-breaking-expected.txt
LayoutTests/platform/mac/fast/selectors/159-expected.txt
LayoutTests/platform/mac/fast/selectors/177a-expected.txt
LayoutTests/platform/mac/fast/text/selection-hard-linebreak-expected.txt
LayoutTests/platform/mac/fast/xsl/document-function-expected.txt
LayoutTests/platform/mac/fast/xsl/xslt-enc-cyr-expected.txt
LayoutTests/platform/mac/fast/xsl/xslt-enc-expected.txt
LayoutTests/platform/mac/fast/xsl/xslt-enc16-expected.txt
LayoutTests/platform/mac/fast/xsl/xslt-enc16to16-expected.txt
LayoutTests/platform/mac/fast/xsl/xslt-import-depth-expected.txt
LayoutTests/platform/mac/fast/xsl/xslt-relative-path-expected.txt
LayoutTests/platform/mac/fast/xsl/xslt_unicode-expected.txt
LayoutTests/platform/mac/http/tests/local/file-url-sent-as-referer-expected.txt
LayoutTests/platform/mac/tables/mozilla/bugs/bug137388-1-expected.txt
LayoutTests/platform/mac/tables/mozilla/bugs/bug137388-2-expected.txt
LayoutTests/platform/mac/tables/mozilla/bugs/bug137388-3-expected.txt
LayoutTests/platform/mac/tables/mozilla/bugs/bug38916-expected.txt
LayoutTests/platform/mac/tables/mozilla/core/col_widths_fix_autoFixPer-expected.txt
WebCore/ChangeLog
WebCore/dom/DOMImplementation.cpp
WebCore/dom/Document.cpp
WebCore/dom/Document.h
WebCore/dom/DocumentType.cpp
WebCore/dom/DocumentType.h
WebCore/dom/Node.cpp
WebCore/dom/StyledElement.cpp
WebCore/dom/XMLTokenizer.cpp
WebCore/editing/markup.cpp
WebCore/html/HTMLAppletElement.cpp
WebCore/html/HTMLDocument.cpp
WebCore/html/HTMLDocument.h
WebCore/html/HTMLMapElement.cpp
WebCore/html/HTMLParamElement.cpp
WebCore/html/HTMLParser.cpp
WebCore/html/HTMLParser.h
WebCore/html/HTMLTokenizer.cpp
WebCore/html/HTMLTokenizer.h
WebCore/html/HTMLViewSourceDocument.cpp
WebCore/html/HTMLViewSourceDocument.h
WebCore/loader/FrameLoader.cpp
WebCore/page/Frame.cpp
WebCore/page/inspector/utilities.js
WebCore/xml/XSLTProcessor.cpp