Reviewed by Darin.
authorap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2007 06:21:57 +0000 (06:21 +0000)
committerap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2007 06:21:57 +0000 (06:21 +0000)
commit9ae20f9153fdae0b55ff11c57d5ba00dfc65ba35
treeb9b1fa307a7b9ce511f7b0ca9468f86da32275b3
parenta01d1ce10e4e82dac3836a32c216cbb0d2d0971c
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=15954
        Move DOM Selection operations out of SelectionController

        No change in functionality.

WebCore:
        * editing/SelectionController.cpp:
        (WebCore::SelectionController::setSelectedRange):
        * editing/SelectionController.h:
        * page/DOMSelection.cpp:
        (WebCore::DOMSelection::anchorNode):
        (WebCore::DOMSelection::baseNode):
        (WebCore::DOMSelection::anchorOffset):
        (WebCore::DOMSelection::baseOffset):
        (WebCore::DOMSelection::focusNode):
        (WebCore::DOMSelection::extentNode):
        (WebCore::DOMSelection::focusOffset):
        (WebCore::DOMSelection::extentOffset):
        (WebCore::DOMSelection::isCollapsed):
        (WebCore::DOMSelection::type):
        (WebCore::DOMSelection::rangeCount):
        (WebCore::DOMSelection::collapse):
        (WebCore::DOMSelection::collapseToEnd):
        (WebCore::DOMSelection::collapseToStart):
        (WebCore::DOMSelection::empty):
        (WebCore::DOMSelection::setBaseAndExtent):
        (WebCore::DOMSelection::setPosition):
        (WebCore::DOMSelection::modify):
        (WebCore::DOMSelection::extend):
        (WebCore::DOMSelection::getRangeAt):
        (WebCore::DOMSelection::removeAllRanges):
        (WebCore::DOMSelection::addRange):
        (WebCore::DOMSelection::deleteFromDocument):
        (WebCore::DOMSelection::containsNode):
        (WebCore::DOMSelection::selectAllChildren):
        (WebCore::DOMSelection::toString):
        * page/DOMSelection.h:
        Moved all DOM API methods to DOMSelection; changed SelectionController::setSelectedRange()
        to return its result directly instead of via an ExceptionCode that no caller wanted.

        * editing/Editor.cpp:
        (WebCore::Editor::deleteRange):
        (WebCore::Editor::removeFormattingAndStyle):
        (WebCore::Editor::selectComposition):
        (WebCore::Editor::setComposition):
        * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
        Adapted for SelectionController::setSelectedRange() now returning a bool.
        SelectionController::toString() is no longer avasilable, use plainText() explicitly.

        * WebCore.base.exp: Changed SelectionController::setSelectedRange() signature.

WebKit:
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _expandSelectionToGranularity:]):
        (-[WebHTMLView selectToMark:]):
        (-[WebHTMLView swapWithMark:]):
        * WebView/WebView.mm:
        (-[WebView setSelectedDOMRange:affinity:]):
        Adapted for SelectionController::setSelectedRange() now returning a bool.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/WebCore.base.exp
WebCore/editing/Editor.cpp
WebCore/editing/SelectionController.cpp
WebCore/editing/SelectionController.h
WebCore/html/HTMLInputElement.cpp
WebCore/page/DOMSelection.cpp
WebCore/page/DOMSelection.h
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebHTMLView.mm
WebKit/mac/WebView/WebView.mm