Changeset 65878 in webkit


Ignore:
Timestamp:
Aug 24, 2010 1:55:29 AM (14 years ago)
Author:
andreas.kling@nokia.com
Message:

2010-08-24 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Tor Arne Vestbø.

Disallow setting Document.xmlVersion to unsupported versions
https://bugs.webkit.org/show_bug.cgi?id=44494

Added XMLDocumentParser::supportsXMLVersion() - only returns true for "1.0"
in both implementations.

  • dom/Document.cpp: (WebCore::Document::setXMLVersion): Throw NOT_SUPPORTED_ERR if XMLDocumentParser::supportsXMLVersion() returns false for the version.
  • dom/XMLDocumentParser.h:
  • dom/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::supportsXMLVersion):
  • dom/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::supportsXMLVersion):

2010-08-24 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Tor Arne Vestbø.

Disallow setting Document.xmlVersion to unsupported versions
https://bugs.webkit.org/show_bug.cgi?id=44494

Rebaselined tests (to expect success in 9/10 cases)
documentsetxmlversion03.xhtml fails now (but legitimately.)

  • dom/xhtml/level3/core/canonicalform06-expected.txt:
  • dom/xhtml/level3/core/documentsetxmlversion01-expected.txt:
  • dom/xhtml/level3/core/documentsetxmlversion03-expected.txt:
  • dom/xhtml/level3/core/documentsetxmlversion05-expected.txt:
  • dom/xhtml/level3/core/infoset06-expected.txt:
  • dom/xhtml/level3/core/infoset07-expected.txt:
  • dom/xhtml/level3/core/wellformed01-expected.txt:
  • dom/xhtml/level3/core/wellformed02-expected.txt:
  • dom/xhtml/level3/core/wellformed03-expected.txt:
  • dom/xhtml/level3/core/wellformed04-expected.txt:
Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r65875 r65878  
     12010-08-24  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Tor Arne Vestbø.
     4
     5        Disallow setting Document.xmlVersion to unsupported versions
     6        https://bugs.webkit.org/show_bug.cgi?id=44494
     7
     8        Rebaselined tests (to expect success in 9/10 cases)
     9        documentsetxmlversion03.xhtml fails now (but legitimately.)
     10
     11        * dom/xhtml/level3/core/canonicalform06-expected.txt:
     12        * dom/xhtml/level3/core/documentsetxmlversion01-expected.txt:
     13        * dom/xhtml/level3/core/documentsetxmlversion03-expected.txt:
     14        * dom/xhtml/level3/core/documentsetxmlversion05-expected.txt:
     15        * dom/xhtml/level3/core/infoset06-expected.txt:
     16        * dom/xhtml/level3/core/infoset07-expected.txt:
     17        * dom/xhtml/level3/core/wellformed01-expected.txt:
     18        * dom/xhtml/level3/core/wellformed02-expected.txt:
     19        * dom/xhtml/level3/core/wellformed03-expected.txt:
     20        * dom/xhtml/level3/core/wellformed04-expected.txt:
     21
    1222010-08-24  Adam Barth  <abarth@webkit.org>
    223
  • trunk/LayoutTests/dom/xhtml/level3/core/canonicalform06-expected.txt

    r21687 r65878  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform06
    2 Status  error
    3 Message Error: INVALID_CHARACTER_ERR: DOM Exception 5
     2Status  Success
  • trunk/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion01-expected.txt

    r11962 r65878  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetxmlversion01
    2 Status  failure
    3 Message NOT_SUPPORTED_ERR_documentsetversion01: assertTrue failed
     2Status  Success
  • trunk/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion03-expected.txt

    r21687 r65878  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetxmlversion03
    2 Status  Success
     2Status  error
     3Message Error: NOT_SUPPORTED_ERR: DOM Exception 9
  • trunk/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion05-expected.txt

    r21687 r65878  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetxmlversion05
    2 Status  failure
    3 Message throw_NOT_SUPPORTED_ERR: assertTrue failed
     2Status  Success
  • trunk/LayoutTests/dom/xhtml/level3/core/infoset06-expected.txt

    r21687 r65878  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset06
    2 Status  error
    3 Message Error: INVALID_CHARACTER_ERR: DOM Exception 5
     2Status  Success
  • trunk/LayoutTests/dom/xhtml/level3/core/infoset07-expected.txt

    r21687 r65878  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset07
    2 Status  error
    3 Message Error: INVALID_CHARACTER_ERR: DOM Exception 5
     2Status  Success
  • trunk/LayoutTests/dom/xhtml/level3/core/wellformed01-expected.txt

    r21687 r65878  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed01
    2 Status  error
    3 Message Error: INVALID_CHARACTER_ERR: DOM Exception 5
     2Status  Success
  • trunk/LayoutTests/dom/xhtml/level3/core/wellformed02-expected.txt

    r21687 r65878  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed02
    2 Status  error
    3 Message Error: INVALID_CHARACTER_ERR: DOM Exception 5
     2Status  Success
  • trunk/LayoutTests/dom/xhtml/level3/core/wellformed03-expected.txt

    r21687 r65878  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed03
    2 Status  error
    3 Message Error: INVALID_CHARACTER_ERR: DOM Exception 5
     2Status  Success
  • trunk/LayoutTests/dom/xhtml/level3/core/wellformed04-expected.txt

    r21687 r65878  
    11Test    http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed04
    2 Status  error
    3 Message Error: INVALID_CHARACTER_ERR: DOM Exception 5
     2Status  Success
  • trunk/WebCore/ChangeLog

    r65877 r65878  
     12010-08-24  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Tor Arne Vestbø.
     4
     5        Disallow setting Document.xmlVersion to unsupported versions
     6        https://bugs.webkit.org/show_bug.cgi?id=44494
     7
     8        Added XMLDocumentParser::supportsXMLVersion() - only returns true for "1.0"
     9        in both implementations.
     10
     11        * dom/Document.cpp:
     12        (WebCore::Document::setXMLVersion): Throw NOT_SUPPORTED_ERR
     13        if XMLDocumentParser::supportsXMLVersion() returns false for the version.
     14        * dom/XMLDocumentParser.h:
     15        * dom/XMLDocumentParserLibxml2.cpp:
     16        (WebCore::XMLDocumentParser::supportsXMLVersion):
     17        * dom/XMLDocumentParserQt.cpp:
     18        (WebCore::XMLDocumentParser::supportsXMLVersion):
     19
    1202010-08-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
    221
  • trunk/WebCore/dom/Document.cpp

    r65787 r65878  
    985985        return;
    986986    }
    987    
    988     // FIXME: Also raise NOT_SUPPORTED_ERR if the version is set to a value that is not supported by this Document.
     987
     988    if (!XMLDocumentParser::supportsXMLVersion(version)) {
     989        ec = NOT_SUPPORTED_ERR;
     990        return;
     991    }
    989992
    990993    m_xmlVersion = version;
  • trunk/WebCore/dom/XMLDocumentParser.h

    r65842 r65878  
    104104        virtual int lineNumber() const;
    105105        virtual int columnNumber() const;
     106
     107        static bool supportsXMLVersion(const String&);
    106108
    107109    private:
  • trunk/WebCore/dom/XMLDocumentParserLibxml2.cpp

    r65842 r65878  
    523523// --------------------------------
    524524
     525bool XMLDocumentParser::supportsXMLVersion(const String& version)
     526{
     527    return version == "1.0";
     528}
     529
    525530XMLDocumentParser::XMLDocumentParser(Document* document, FrameView* frameView)
    526531    : ScriptableDocumentParser(document)
  • trunk/WebCore/dom/XMLDocumentParserQt.cpp

    r65842 r65878  
    7979// --------------------------------
    8080
     81bool XMLDocumentParser::supportsXMLVersion(const String& version)
     82{
     83    return version == "1.0";
     84}
     85
    8186XMLDocumentParser::XMLDocumentParser(Document* document, FrameView* frameView)
    8287    : ScriptableDocumentParser(document)
Note: See TracChangeset for help on using the changeset viewer.