Remove unused arguments from moveTo(Range*)
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Feb 2014 03:07:14 +0000 (03:07 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Feb 2014 03:07:14 +0000 (03:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=128878

Reviewed by Antti Koivisto.

Cleanup.

* bindings/objc/DOMUIKitExtensions.mm:
(-[DOMRange move:inDirection:]):
(-[DOMRange extend:inDirection:]):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::moveTo):
* editing/FrameSelection.h:

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

Source/WebCore/ChangeLog
Source/WebCore/bindings/objc/DOMUIKitExtensions.mm
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/editing/FrameSelection.h

index 49e9781..990b9b8 100644 (file)
@@ -1,3 +1,19 @@
+2014-02-15  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Remove unused arguments from moveTo(Range*)
+        https://bugs.webkit.org/show_bug.cgi?id=128878
+
+        Reviewed by Antti Koivisto.
+
+        Cleanup.
+
+        * bindings/objc/DOMUIKitExtensions.mm:
+        (-[DOMRange move:inDirection:]):
+        (-[DOMRange extend:inDirection:]):
+        * editing/FrameSelection.cpp:
+        (WebCore::FrameSelection::moveTo):
+        * editing/FrameSelection.h:
+
 2014-02-15  Filip Pizlo  <fpizlo@apple.com>
 
         Vector with inline capacity should work with non-PODs
index 26e6c89..5d24633 100644 (file)
@@ -94,7 +94,7 @@ using WebCore::VisiblePosition;
 {
     Range *range = core(self);
     FrameSelection frameSelection;
-    frameSelection.moveTo(range, DOWNSTREAM);
+    frameSelection.moveTo(range);
     
     TextGranularity granularity = CharacterGranularity;
     // Until WebKit supports vertical layout, "down" is equivalent to "forward by a line" and
@@ -121,7 +121,7 @@ using WebCore::VisiblePosition;
 {
     Range *range = core(self);
     FrameSelection frameSelection;
-    frameSelection.moveTo(range, DOWNSTREAM);
+    frameSelection.moveTo(range);
     
     for (UInt32 i = 0; i < amount; i++)
         frameSelection.modify(FrameSelection::AlterationExtend, (SelectionDirection)direction, CharacterGranularity);    
index 362bfb4..6e4b631 100644 (file)
@@ -152,10 +152,10 @@ void FrameSelection::moveTo(const Position &pos, EAffinity affinity, EUserTrigge
     setSelection(VisibleSelection(pos, affinity, m_selection.isDirectional()), defaultSetSelectionOptions(userTriggered));
 }
 
-void FrameSelection::moveTo(const Range *r, EAffinity affinity, EUserTriggered userTriggered)
+void FrameSelection::moveTo(const Range* range)
 {
-    VisibleSelection selection = r ? VisibleSelection(r->startPosition(), r->endPosition(), affinity) : VisibleSelection(Position(), Position(), affinity);
-    setSelection(selection, defaultSetSelectionOptions(userTriggered));
+    VisibleSelection selection = range ? VisibleSelection(range->startPosition(), range->endPosition()) : VisibleSelection();
+    setSelection(selection);
 }
 
 void FrameSelection::moveTo(const Position &base, const Position &extent, EAffinity affinity, EUserTriggered userTriggered)
index f30d66e..d84b702 100644 (file)
@@ -135,7 +135,7 @@ public:
 
     Element* rootEditableElementOrDocumentElement() const;
      
-    void moveTo(const Range*, EAffinity, EUserTriggered = NotUserTriggered);
+    void moveTo(const Range*);
     void moveTo(const VisiblePosition&, EUserTriggered = NotUserTriggered, CursorAlignOnScroll = AlignCursorOnScrollIfNeeded);
     void moveTo(const VisiblePosition&, const VisiblePosition&, EUserTriggered = NotUserTriggered);
     void moveTo(const Position&, EAffinity, EUserTriggered = NotUserTriggered);