From 4b3913f313be0d6caf198eb36ea7f81611a29b2f Mon Sep 17 00:00:00 2001 From: jiangyuwei Date: Wed, 1 Mar 2023 14:44:39 +0800 Subject: [PATCH] [M108 Migration][VD] Add Notifications for Popup Menu show and hide For the requirement from Tizen TV WebBrowser team, to add notifications for Popup Menu show and hide. In WebBrowser side, need to know that there is date picker, then can have normal mouse move on it, not hybrid movement. Reference: https://review.tizen.org/gerrit/#/c/282721/ Change-Id: Iae39c8fc26db93fd497e7e4313669c3e0f16ddcf Signed-off-by: jiangyuwei --- tizen_src/ewk/efl_integration/eweb_view.cc | 6 ++++++ tizen_src/ewk/efl_integration/eweb_view_callbacks.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/tizen_src/ewk/efl_integration/eweb_view.cc b/tizen_src/ewk/efl_integration/eweb_view.cc index e561e8b..e5cb9c3 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.cc +++ b/tizen_src/ewk/efl_integration/eweb_view.cc @@ -1191,6 +1191,9 @@ void EWebView::HandlePopupMenu(std::vector items, // Picker has been shown on top of webview and the page content gets // partially overlapped. Decrease viewport while showing picker. AdjustViewPortHeightToPopupMenu(true /* is_popup_menu_visible */); +#if BUILDFLAG(IS_TIZEN_TV) + SmartCallback().call(); +#endif } else { select_picker_->UpdatePickerData(selectedIndex, std::move(items), multiple); } @@ -1203,6 +1206,9 @@ void EWebView::HidePopupMenu() { return; AdjustViewPortHeightToPopupMenu(false /* is_popup_menu_visible */); +#if BUILDFLAG(IS_TIZEN_TV) + SmartCallback().call(); +#endif select_picker_.reset(); } diff --git a/tizen_src/ewk/efl_integration/eweb_view_callbacks.h b/tizen_src/ewk/efl_integration/eweb_view_callbacks.h index 7ab0b9d..02ec82c 100644 --- a/tizen_src/ewk/efl_integration/eweb_view_callbacks.h +++ b/tizen_src/ewk/efl_integration/eweb_view_callbacks.h @@ -116,6 +116,8 @@ enum CallbackType { PlaybackFinish, PlaybackStop, UserMediaState, + PopupMenuShow, + PopupMenuHide, #endif OverscrolledLeft, OverscrolledRight, @@ -276,6 +278,8 @@ DECLARE_EWK_VIEW_CALLBACK(PlaybackFinish, "notification,playback,finish", void*); DECLARE_EWK_VIEW_CALLBACK(UserMediaState, "usermedia,state", void*); +DECLARE_EWK_VIEW_CALLBACK(PopupMenuShow, "popup,menu,show", void); +DECLARE_EWK_VIEW_CALLBACK(PopupMenuHide, "popup,menu,hide", void); #endif DECLARE_EWK_VIEW_CALLBACK(OverscrolledLeft, "overscrolled,left", void); DECLARE_EWK_VIEW_CALLBACK(OverscrolledRight, "overscrolled,right", void); -- 2.7.4