Reviewed by Adele Peterson.
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Apr 2011 22:53:49 +0000 (22:53 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Apr 2011 22:53:49 +0000 (22:53 +0000)
commit12aa91fa53b9e94ef4ebab964cc99b91c7844f62
treefcdebd687db383123a8d86230b43fc27f26c4603
parent657c0c362ab2c9f4445a3bf6feb7cb1ae2408d09
    Reviewed by Adele Peterson.

        WebKit2: Merge SelectionState and TextInputState
        https://bugs.webkit.org/show_bug.cgi?id=58919

        Combined TextInputState and EditorState in one structure, which is updated whenever we get
        a chance to. There is no sense to keep possibly stale SelectionState data when we have already
        requested the most recent data synchronously.

        This also simplifies the code, as we don't need to pass the state around in a separate variable.

        * GNUmakefile.am:
        * Scripts/webkit2/messages.py:
        * Shared/EditorState.h: Copied from Source/WebKit2/Shared/SelectionState.h.
        (WebKit::EditorState::EditorState):
        * Shared/SelectionState.h: Removed.
        * Shared/mac/TextInputState.h: Removed.
        * UIProcess/API/mac/PageClientImpl.h:
        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::interpretKeyEvent):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView validRequestorForSendType:returnType:]):
        (-[WKView validateUserInterfaceItem:]):
        (-[WKView shouldDelayWindowOrderingForEvent:]):
        (-[WKView doCommandBySelector:]):
        (-[WKView insertText:replacementRange:]):
        (-[WKView _handleStyleKeyEquivalent:]):
        (-[WKView _executeSavedKeypressCommands]):
        (-[WKView inputContext]):
        (-[WKView hasMarkedText]):
        (-[WKView unmarkText]):
        (-[WKView setMarkedText:selectedRange:replacementRange:]):
        (-[WKView attributedSubstringForProposedRange:actualRange:]):
        (-[WKView _interpretKeyEvent:savingCommandsTo:WebCore::]):
        (-[WKView _updateSecureInputState]):
        * UIProcess/API/mac/WKViewInternal.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::editorStateChanged):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::editorState):
        (WebKit::WebPageProxy::hasSelectedRange):
        (WebKit::WebPageProxy::isContentEditable):
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::setComposition):
        (WebKit::WebPageProxy::confirmComposition):
        (WebKit::WebPageProxy::insertText):
        (WebKit::WebPageProxy::executeKeypressCommands):
        (WebKit::WebPageProxy::writeSelectionToPasteboard):
        (WebKit::WebPageProxy::readSelectionFromPasteboard):
        (WebKit::WebPageProxy::interpretQueuedKeyEvent):
        * UIProcess/win/WebView.cpp:
        (WebKit::WebView::compositionSelectionChanged):
        (WebKit::WebView::onIMEComposition):
        (WebKit::WebView::onIMEEndComposition):
        (WebKit::WebView::onIMERequestCharPosition):
        (WebKit::WebView::onIMERequest):
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        (WebKit::WebEditorClient::respondToChangedSelection):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::editorState):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::handleEditingKeyboardEvent):
        (WebKit::WebPage::setComposition):
        (WebKit::WebPage::confirmComposition):
        (WebKit::WebPage::insertText):
        (WebKit::WebPage::executeKeypressCommands):
        * win/WebKit2.vcproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/GNUmakefile.am
Source/WebKit2/Scripts/webkit2/messages.py
Source/WebKit2/Shared/EditorState.h [moved from Source/WebKit2/Shared/SelectionState.h with 65% similarity]
Source/WebKit2/Shared/mac/TextInputState.h [deleted file]
Source/WebKit2/UIProcess/API/mac/PageClientImpl.h
Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
Source/WebKit2/UIProcess/win/WebView.cpp
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
Source/WebKit2/win/WebKit2.vcproj