Remove ununsed ContextMenuType parameter of various methods.
authorAntonio Gomes <a1.gomes@samsung.com>
Fri, 28 Aug 2015 00:25:12 +0000 (20:25 -0400)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
WebContentsViewDelegateEwk::ShowContextMenu calls
EWebView::ShowContextMenu which calls ContextMenuController
ctor. ContextMenuType is passed as a parameter through
them, but is not used.

Patch removes it.

Origin beta/m42 patch:
- http://165.213.202.130/gerrit/#/c/86027/ , reviewed by
Laszlo Gombos, Arnaud Renevier.

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

Reviewed by: Janusz Majnert

Change-Id: Idfff4e1fd961e8cfc68a478a20bbb23fed4c0c18
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
tizen_src/ewk/efl_integration/context_menu_controller_efl.h
tizen_src/ewk/efl_integration/eweb_view.cc
tizen_src/ewk/efl_integration/eweb_view.h

index 17bd67b..8ff63a9 100644 (file)
@@ -119,11 +119,6 @@ enum ContextMenuOptionType {
   MENU_ITEM_TYPE_SUBMENU
 };
 
-enum ContextMenuType {
-  MENU_TYPE_LINK,
-  MENU_TYPE_SELECTION
-};
-
 class ContextMenuItemEfl {
  public:
   ContextMenuItemEfl(ContextMenuOptionType item,
@@ -173,12 +168,11 @@ class ContextMenuControllerEfl
   static void ContextMenuItemSelectedCallback(void* data, Evas_Object* obj, void* event_info);
   static void ContextMenuHWBackKey(void* data, Evas_Object* obj, void* event_info);
 
-  ContextMenuControllerEfl(EWebView* wv, ContextMenuType type, WebContents& web_contents)
+  ContextMenuControllerEfl(EWebView* wv, WebContents& web_contents)
     : webview_(wv),
       native_view_(static_cast<Evas_Object*>(web_contents.GetNativeView())),
       popup_(NULL),
       menu_items_(NULL),
-      type_(type),
       web_contents_(web_contents),
       weak_ptr_factory_(this) {
   }
@@ -230,7 +224,6 @@ class ContextMenuControllerEfl
   Evas_Object* native_view_;
   Evas_Object* popup_;
   Eina_List* menu_items_;
-  ContextMenuType type_;
   ContextMenuParams params_;
   WebContents& web_contents_;
   base::WeakPtrFactory<ContextMenuControllerEfl> weak_ptr_factory_;
index 35749c4..0f89e96 100644 (file)
@@ -1107,20 +1107,15 @@ Eina_Bool EWebView::PopupMenuClose() {
   return true;
 }
 
-void EWebView::ShowContextMenu(
-    const content::ContextMenuParams& params,
-    content::ContextMenuType type) {
-  // fix for context menu coordinates type: MENU_TYPE_LINK (introduced by CBGRAPHICS-235),
-  // this menu is created in renderer process and it does not now anything about
-  // view scaling factor and it has another calling sequence, so coordinates is not updated
+void EWebView::ShowContextMenu(const content::ContextMenuParams& params) {
+  // This menu is created in renderer process and it does not now anything about
+  // view scaling factor and it has another calling sequence, so coordinates is not updated.
   content::ContextMenuParams convertedParams = params;
-  if (type == MENU_TYPE_LINK) {
-    gfx::Point convertedPoint = rwhv()->ConvertPointInViewPix(gfx::Point(params.x, params.y));
-    convertedParams.x = convertedPoint.x();
-    convertedParams.y = convertedPoint.y();
-  }
+  gfx::Point convertedPoint = rwhv()->ConvertPointInViewPix(gfx::Point(params.x, params.y));
+  convertedParams.x = convertedPoint.x();
+  convertedParams.y = convertedPoint.y();
 
-  context_menu_.reset(new content::ContextMenuControllerEfl(this, type, *web_contents_.get()));
+  context_menu_.reset(new content::ContextMenuControllerEfl(this, *web_contents_.get()));
 
   Evas_Coord x, y;
   evas_object_geometry_get(evas_object(), &x, &y, 0, 0);
index c9053c6..cfa52f3 100644 (file)
@@ -291,9 +291,7 @@ class EWebView {
   Eina_Bool DidSelectPopupMenuItem(int selectedIndex);
   Eina_Bool DidMultipleSelectPopupMenuItem(std::vector<int>& selectedIndices);
   Eina_Bool PopupMenuClose();
-  void ShowContextMenu(
-      const content::ContextMenuParams& params,
-      content::ContextMenuType type = content::MENU_TYPE_LINK);
+  void ShowContextMenu(const content::ContextMenuParams&);
   void CancelContextMenu(int request_id);
   void SetScale(double scale_factor, int x, int y);
   bool GetScrollPosition(int* x, int* y) const;