Remove Editor::setSelectionOffsets
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 May 2013 01:11:41 +0000 (01:11 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 May 2013 01:11:41 +0000 (01:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=115831

Reviewed by Andreas Kling.

Removed the function added in r120985 for Chromium Android port.

* editing/Editor.cpp:
* editing/Editor.h:

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

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

index b80b598cba533bfc39a242cc2c187b3db01dac04..82458f4ef6bad72d4cb83051de9c81354a523b9a 100644 (file)
@@ -1,3 +1,15 @@
+2013-05-08  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Remove Editor::setSelectionOffsets
+        https://bugs.webkit.org/show_bug.cgi?id=115831
+
+        Reviewed by Andreas Kling.
+
+        Removed the function added in r120985 for Chromium Android port.
+
+        * editing/Editor.cpp:
+        * editing/Editor.h:
+
 2013-05-07  Ryosuke Niwa  <rniwa@webkit.org>
 
         Potential use-after-free of Frame
index e77e104429b3ef243af7fab8698238e0128de625..aec5dadbe6e46e482193f856b1d14e5ff06d7087 100644 (file)
@@ -2524,19 +2524,6 @@ bool Editor::getCompositionSelection(unsigned& selectionStart, unsigned& selecti
     return true;
 }
 
-bool Editor::setSelectionOffsets(int selectionStart, int selectionEnd)
-{
-    Element* rootEditableElement = m_frame->selection()->rootEditableElement();
-    if (!rootEditableElement)
-        return false;
-
-    RefPtr<Range> range = TextIterator::rangeFromLocationAndLength(rootEditableElement, selectionStart, selectionEnd - selectionStart);
-    if (!range)
-        return false;
-
-    return m_frame->selection()->setSelectedRange(range.get(), VP_DEFAULT_AFFINITY, false);
-}
-
 void Editor::transpose()
 {
     if (!canEdit())
index f86c51b35e4e625136dcb0a24b73896dc2a83f37..4beb932813204bc93647d895fd9347c354036253 100644 (file)
@@ -313,7 +313,6 @@ public:
     bool cancelCompositionIfSelectionIsInvalid();
     PassRefPtr<Range> compositionRange() const;
     bool getCompositionSelection(unsigned& selectionStart, unsigned& selectionEnd) const;
-    bool setSelectionOffsets(int selectionStart, int selectionEnd);
 
     // getting international text input composition state (for use by InlineTextBox)
     Text* compositionNode() const { return m_compositionNode.get(); }