Remove unused param from SelectionControllerEfl::UpdateSelectionDataAndShow
authorAntonio Gomes <a1.gomes@samsung.com>
Thu, 20 Aug 2015 16:13:04 +0000 (12:13 -0400)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
SSIA.

Patch, also removes an unneeded 'else' after a 'return'.

Original beta/m42 patch:
- http://165.213.202.130/gerrit/#/c/86030/ , reviewed by
Janusz Majnert, arno renevier.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=14304

Reviewed by: Janusz Majnert

Change-Id: Ie863b4edda43db3bcbc3256a69bd9648a2299fbf
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc
tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc
tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.h
tizen_src/ewk/efl_integration/context_menu_controller_efl.cc

index 7b351af..6bd690a 100755 (executable)
@@ -964,8 +964,7 @@ void RenderWidgetHostViewEfl::DidStopFlinging() {
   controller->UpdateSelectionDataAndShow(
       controller->GetLeftRect(),
       controller->GetRightRect(),
-      false,
-      false);
+      false /*show*/);
 }
 
 void RenderWidgetHostViewEfl::EvasToBlinkCords(int x, int y, int* view_x, int* view_y) {
index 562989a..0fade7a 100644 (file)
@@ -144,7 +144,7 @@ void SelectionControllerEfl::OnSelectionChanged(
   truncated_end = ConvertRectToPixel(device_scale_factor, truncated_end);
 
   UpdateSelectionDataAndShow(
-      truncated_start, truncated_end, false /*not used*/, false /*show*/);
+      truncated_start, truncated_end, false /*show*/);
 }
 
 void SelectionControllerEfl::UpdateSelectionData(const base::string16& text) {
@@ -164,7 +164,6 @@ bool SelectionControllerEfl::ClearSelectionViaEWebView() {
 bool SelectionControllerEfl::UpdateSelectionDataAndShow(
     const gfx::Rect& left_rect,
     const gfx::Rect& right_rect,
-    bool,
     bool show) {
   TRACE_EVENT0("selection,efl", __PRETTY_FUNCTION__);
   if (!show && !IsSelectionValid(left_rect, right_rect)) {
@@ -215,7 +214,7 @@ void SelectionControllerEfl::ShowHandleAndContextMenuIfRequired(
     }
 
     gfx::Rect left = selection_data_->GetLeftRect();
-    if(selection_data_->GetCaretSelectionStatus()) {
+    if (selection_data_->GetCaretSelectionStatus()) {
       input_handle_->SetBasePosition(gfx::Point(left.x(), left.y()));
       input_handle_->Move(left.bottom_right());
       input_handle_->Show();
@@ -229,9 +228,8 @@ void SelectionControllerEfl::ShowHandleAndContextMenuIfRequired(
       ShowContextMenu();
 
     return;
-  } else {
-    input_handle_->Hide();
   }
+  input_handle_->Hide();
 
   if (left.x() == 0 && left.y() == 0 && right.x() == 0 && right.y() == 0) {
     selection_data_->ClearRectData();
@@ -509,7 +507,6 @@ void SelectionControllerEfl::HandleGesture(blink::WebGestureEvent& event) {
       UpdateSelectionDataAndShow(
           GetLeftRect(),
           GetRightRect(),
-          false /* unused */,
           should_restore_selection_menu_);
     }
   }
@@ -650,7 +647,7 @@ void SelectionControllerEfl::PostHandleTapGesture(bool is_content_editable) {
     if (GetSelectionEditable()){
       SetCaretSelectionStatus(true);
       UpdateSelectionDataAndShow(
-          GetLeftRect(), GetRightRect(), false /* unused */, false);
+          GetLeftRect(), GetRightRect(), false);
     } else {
       SetSelectionEditable(true);
     }
index fec0376..93301d0 100644 (file)
@@ -71,7 +71,7 @@ class CONTENT_EXPORT SelectionControllerEfl {
   // To update the selection bounds
   // returns false if rects are invalid, otherwise true
   bool UpdateSelectionDataAndShow(const gfx::Rect& left_rect,
-      const gfx::Rect& right_rect, bool is_anchor_first, bool show = true);
+      const gfx::Rect& right_rect, bool show = true);
   void GetSelectionBounds(gfx::Rect* left, gfx::Rect* right);
   // Handles the mouse press,move and relase events on selection handles
   void OnMouseDown(const gfx::Point& touch_point, SelectionHandleEfl*);
index b9ed490..f15c0a1 100644 (file)
@@ -482,7 +482,6 @@ void ContextMenuControllerEfl::ShowSelectionHandleAndContextMenu() {
     controller->UpdateSelectionDataAndShow(
         controller->GetLeftRect(),
         controller->GetRightRect(),
-        false /* unused */,
         true);
   }
 }