From: SangYong Park Date: Thu, 8 Aug 2013 06:40:36 +0000 (+0900) Subject: Cancel composition when focused node was changed X-Git-Tag: 2.2_release~1 X-Git-Url: http://review.tizen.org/git/?p=framework%2Fweb%2Fwebkit-efl.git;a=commitdiff_plain;h=37760e8438d76ea4d3e501354e1bb0531ce00592 Cancel composition when focused node was changed [Title] Cancel composition when focused node was changed [Issue#] N_SE-47443 [Problem] Composition in progress, can not enter number when opening 'change page' [Cause] composition information was not cleared [Solution] Cancel composition when focused node was changed Change-Id: I73d8febc92d3c1e1bf37b50059f6bd1b979173df --- diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp index 0f3c11f..b191233 100755 --- a/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp +++ b/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp @@ -191,7 +191,12 @@ void WebEditorClient::respondToChangedSelection(Frame* frame) return; EditorState state = m_page->editorState(); -#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) + +#if ENABLE(TIZEN_ISF_PORT) || ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) + const EditorState& currentState = m_page->currentEditorState(); + if (currentState.hasComposition && currentState.inputMethodContextID != state.inputMethodContextID) + didCancelComposition(reinterpret_cast(currentState.inputMethodContextID)); + m_page->setEditorState(state); #endif diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.h b/Source/WebKit2/WebProcess/WebPage/WebPage.h index d90c3df..42bb838 100755 --- a/Source/WebKit2/WebProcess/WebPage/WebPage.h +++ b/Source/WebKit2/WebProcess/WebPage/WebPage.h @@ -444,8 +444,10 @@ public: PassRefPtr createPlugin(WebFrame*, WebCore::HTMLPlugInElement*, const Plugin::Parameters&); EditorState editorState() const; -#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) - void setEditorState(const EditorState& editorState) { m_editorState = editorState;} + +#if ENABLE(TIZEN_ISF_PORT) || ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) + const EditorState& currentEditorState() { return m_editorState; } + void setEditorState(const EditorState& editorState) { m_editorState = editorState; } #endif String renderTreeExternalRepresentation() const; @@ -1205,7 +1207,7 @@ private: WebCore::IntRect m_focusedRect; #endif -#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) +#if ENABLE(TIZEN_ISF_PORT) || ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) EditorState m_editorState; #endif