WebCore:
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Mar 2008 03:50:33 +0000 (03:50 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Mar 2008 03:50:33 +0000 (03:50 +0000)
commit640c95041f057704f5ab0026a39724a5e317fd2c
treed97936f2f480773d27ba3ee49cc8bed774ccd469
parent81ff5aa607904645f0b209e17fd9bd95e9452047
WebCore:

2008-03-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        - fixed "Acid3 expects different exceptions for surroundContents calls involving comment nodes (affects Acid3 test 11)"
        http://bugs.webkit.org/show_bug.cgi?id=17509

        This gets us to 92/100

        * dom/Range.cpp:
        (WebCore::Range::surroundContents): Check for
        HIERARCHY_REQUEST_ERR before BAD_BOUNDARYPOINTS_ERR, since Acid3
        expects exceptional conditions to be tested in the order that the
        spec lists them. Also, adjust the HIERARCHY_REQUEST_ERR check. If
        the start point of the range is in a comment node, the node that
        would be the parent of a partial replacement is actually the
        comment node's parent (since comment nodes have character
        indices), so we should do the HIERARCHY_REQUEST_ERR check based on
        the parent of the comment node, as for text nodes, even though it
        will fail later with a different exception because it is not
        allowed to surround a partially selected non-text node.

LayoutTests:

2008-03-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        - test for "Acid3 expects different exceptions for surroundContents calls involving comment nodes (affects Acid3 test 11)"
        http://bugs.webkit.org/show_bug.cgi?id=17509

        * fast/dom/Range/acid3-surround-contents-expected.txt: Added.
        * fast/dom/Range/acid3-surround-contents.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/Range/acid3-surround-contents-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Range/acid3-surround-contents.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/dom/Range.cpp