Commit the code change supposed to happen in r164320.
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Feb 2014 00:43:35 +0000 (00:43 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Feb 2014 00:43:35 +0000 (00:43 +0000)
* editing/Editor.cpp:
(WebCore::Editor::setIgnoreCompositionSelectionChange):
(WebCore::Editor::respondToChangedSelection):
* editing/Editor.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164331 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/Editor.h

index 282e940e53052f50fe3ecd1bd31bf5ced710c66f..745ccd23fcf70053a32d556931e2ad110edc063a 100644 (file)
@@ -1,3 +1,12 @@
+2014-02-18  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Commit the code change supposed to happen in r164320.
+
+        * editing/Editor.cpp:
+        (WebCore::Editor::setIgnoreCompositionSelectionChange):
+        (WebCore::Editor::respondToChangedSelection):
+        * editing/Editor.h:
+
 2014-02-18  Ryosuke Niwa  <rniwa@webkit.org>
 
         TextFieldInputType::handleBeforeTextInsertedEvent shouldn't use plainText
index 3e15dac45d5360a3c352c73680a1d94365cc0b05..6067b044dbe8be9737e062bd07e2b09b3cfa0764 100644 (file)
@@ -753,23 +753,6 @@ bool Editor::shouldInsertText(const String& text, Range* range, EditorInsertActi
     return client() && client()->shouldInsertText(text, range, action);
 }
 
-void Editor::notifyComponentsOnChangedSelection(const VisibleSelection& oldSelection, FrameSelection::SetSelectionOptions options)
-{
-#if PLATFORM(IOS)
-    // FIXME: Should suppress selection change notifications during a composition change <https://webkit.org/b/38830>
-    if (m_ignoreCompositionSelectionChange)
-        return;
-#endif
-
-    if (client())
-        client()->respondToChangedSelection(&m_frame);
-    setStartNewKillRingSequence(true);
-#if ENABLE(DELETION_UI)
-    m_deleteButtonController->respondToChangedSelection(oldSelection);
-#endif
-    m_alternativeTextController->respondToChangedSelection(oldSelection, options);
-}
-
 void Editor::respondToChangedContents(const VisibleSelection& endingSelection)
 {
     if (AXObjectCache::accessibilityEnabled()) {
@@ -2814,9 +2797,9 @@ void Editor::setIgnoreCompositionSelectionChange(bool ignore)
 
     m_ignoreCompositionSelectionChange = ignore;
 #if PLATFORM(IOS)
-    // FIXME: Merge this to open source https://bugs.webkit.org/show_bug.cgi?id=38830
+    // FIXME: Should suppress selection change notifications during a composition change <https://webkit.org/b/38830> 
     if (!ignore)
-        notifyComponentsOnChangedSelection(m_frame.selection().selection(), 0);
+        respondToChangedSelection(m_frame.selection().selection(), 0);
 #endif
     if (!ignore)
         revealSelectionAfterEditingOperation(ScrollAlignment::alignToEdgeIfNeeded, RevealExtent);
@@ -3313,6 +3296,12 @@ void Editor::setMarkedTextMatchesAreHighlighted(bool flag)
 
 void Editor::respondToChangedSelection(const VisibleSelection& oldSelection, FrameSelection::SetSelectionOptions options)
 {
+#if PLATFORM(IOS)
+    // FIXME: Should suppress selection change notifications during a composition change <https://webkit.org/b/38830> 
+    if (m_ignoreCompositionSelectionChange)
+        return;
+#endif
+
     m_alternativeTextController->stopPendingCorrection(oldSelection);
 
     bool closeTyping = options & FrameSelection::CloseTyping;
@@ -3376,7 +3365,13 @@ void Editor::respondToChangedSelection(const VisibleSelection& oldSelection, Fra
     if (!isContinuousGrammarCheckingEnabled)
         document().markers().removeMarkers(DocumentMarker::Grammar);
 
-    notifyComponentsOnChangedSelection(oldSelection, options);
+    if (client())
+        client()->respondToChangedSelection(&m_frame);
+    setStartNewKillRingSequence(true);
+#if ENABLE(DELETION_UI)
+    m_deleteButtonController->respondToChangedSelection(oldSelection);
+#endif
+    m_alternativeTextController->respondToChangedSelection(oldSelection, options);
 }
 
 static Node* findFirstMarkable(Node* node)
index 08ae4fd176b7b9fc9c1e15317034a492daa26781..a74ffe89f3435bd656bc0c21f6c8dd00f9a46482 100644 (file)
@@ -463,7 +463,6 @@ private:
     void setComposition(const String&, SetCompositionMode);
 
     void changeSelectionAfterCommand(const VisibleSelection& newSelection, FrameSelection::SetSelectionOptions);
-    void notifyComponentsOnChangedSelection(const VisibleSelection& oldSelection, FrameSelection::SetSelectionOptions);
 
     Node* findEventTargetFromSelection() const;