From 737a8532dee139f84bd76109f4bfb6ffeada2707 Mon Sep 17 00:00:00 2001 From: Antonio Gomes Date: Thu, 27 Aug 2015 20:25:12 -0400 Subject: [PATCH] Remove ununsed ContextMenuType parameter of various methods. 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 --- .../ewk/efl_integration/context_menu_controller_efl.h | 9 +-------- tizen_src/ewk/efl_integration/eweb_view.cc | 19 +++++++------------ tizen_src/ewk/efl_integration/eweb_view.h | 4 +--- 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/tizen_src/ewk/efl_integration/context_menu_controller_efl.h b/tizen_src/ewk/efl_integration/context_menu_controller_efl.h index 17bd67b..8ff63a9 100644 --- a/tizen_src/ewk/efl_integration/context_menu_controller_efl.h +++ b/tizen_src/ewk/efl_integration/context_menu_controller_efl.h @@ -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(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 weak_ptr_factory_; diff --git a/tizen_src/ewk/efl_integration/eweb_view.cc b/tizen_src/ewk/efl_integration/eweb_view.cc index 35749c4..0f89e96 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.cc +++ b/tizen_src/ewk/efl_integration/eweb_view.cc @@ -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); diff --git a/tizen_src/ewk/efl_integration/eweb_view.h b/tizen_src/ewk/efl_integration/eweb_view.h index c9053c6..cfa52f3 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.h +++ b/tizen_src/ewk/efl_integration/eweb_view.h @@ -291,9 +291,7 @@ class EWebView { Eina_Bool DidSelectPopupMenuItem(int selectedIndex); Eina_Bool DidMultipleSelectPopupMenuItem(std::vector& 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; -- 2.7.4