[M108 Migration][VD] Add Notifications for Popup Menu show and hide 98/289098/2
authorjiangyuwei <yuwei.jiang@samsung.com>
Wed, 1 Mar 2023 06:44:39 +0000 (14:44 +0800)
committerjiang yuwei <yuwei.jiang@samsung.com>
Thu, 2 Mar 2023 01:06:26 +0000 (01:06 +0000)
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 <yuwei.jiang@samsung.com>
tizen_src/ewk/efl_integration/eweb_view.cc
tizen_src/ewk/efl_integration/eweb_view_callbacks.h

index e561e8b..e5cb9c3 100644 (file)
@@ -1191,6 +1191,9 @@ void EWebView::HandlePopupMenu(std::vector<blink::mojom::MenuItemPtr> 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<EWebViewCallbacks::PopupMenuShow>().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<EWebViewCallbacks::PopupMenuHide>().call();
+#endif
   select_picker_.reset();
 }
 
index 7ab0b9d..02ec82c 100644 (file)
@@ -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);