Reviewed by Darin.
authorap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Nov 2007 20:29:27 +0000 (20:29 +0000)
committerap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Nov 2007 20:29:27 +0000 (20:29 +0000)
commit1a165356d80df035482b23622c4ab1b23cd282cc
treea36f034f2308e19743e6d752921037c5a2c650f9
parentd413982efac62b70a420552e0668e62fc69a96b1
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=15922
        Implement more of Mozilla Selection API

        Tests: editing/selection/containsNode.html
               editing/selection/deleteFromDocument.html
               editing/selection/extend.html
               editing/selection/selectAllChildren.html

        * editing/SelectionController.cpp:
        (WebCore::SelectionController::deleteFromDocument):
        (WebCore::SelectionController::containsNode):
        (WebCore::SelectionController::selectAllChildren):
        (WebCore::SelectionController::extend):
        * editing/SelectionController.h:
        Added deleteFromDocument(), containsNode(), and selectAllChildren(). Reimplemented extend(),
        which existed, but didn't match Firefox behavior and wasn't exposed via bindings.
        Removed a comment mentioning removeRange(), as this method makes no sense without multiple
        selection range support.

        * page/DOMSelection.cpp:
        (WebCore::DOMSelection::extend):
        (WebCore::DOMSelection::deleteFromDocument):
        (WebCore::DOMSelection::containsNode):
        (WebCore::DOMSelection::selectAllChildren):
        * page/DOMSelection.h:
        * page/DOMSelection.idl:
        Exposed the new methods.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/selection/containsNode-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/containsNode.html [new file with mode: 0644]
LayoutTests/editing/selection/deleteFromDocument-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/deleteFromDocument.html [new file with mode: 0644]
LayoutTests/editing/selection/extend-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/extend.html [new file with mode: 0644]
LayoutTests/editing/selection/selectAllChildren-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/selectAllChildren.html [new file with mode: 0644]
LayoutTests/fast/dom/Window/window-properties-expected.txt
WebCore/ChangeLog
WebCore/editing/SelectionController.cpp
WebCore/editing/SelectionController.h
WebCore/page/DOMSelection.cpp
WebCore/page/DOMSelection.h
WebCore/page/DOMSelection.idl