[M120 Migration] Fix show IME
[platform/framework/web/chromium-efl.git] / third_party / blink / renderer / core / exported / web_view_impl.cc
index 5d19945..b0e55f4 100644 (file)
@@ -2025,6 +2025,15 @@ void WebViewImpl::SetPageFocus(bool enable) {
         }
       }
 #if BUILDFLAG(IS_TIZEN_TV)
+      // Trigger auto show IME when webview focus in
+      if (IsHbbTV()) {
+        if (MainFrameImpl() && MainFrameImpl()->FrameWidgetImpl()) {
+          MainFrameImpl()
+              ->FrameWidgetImpl()
+              ->DidUpdateTextOfFocusedElementByNonUserInput();
+        }
+      }
+
       if (element) {
         // Accessibility needs to be informed that system focus has moved
         // into the web area again, even if focus did not change within
@@ -3783,6 +3792,23 @@ void WebViewImpl::RemoveObserver(WebViewObserver* observer) {
 }
 
 #if BUILDFLAG(IS_TIZEN_TV)
+bool WebViewImpl::IsHitScrollbar() {
+  const LocalFrame* frame =
+      DynamicTo<LocalFrame>(page_->GetFocusController().FocusedOrMainFrame());
+  if (!frame)
+    return false;
+  return frame->GetEventHandler().PressedScrollbar();
+}
+
+bool WebViewImpl::IsMouseDownEventSwallowed() {
+  if (!MainFrameImpl() || !MainFrameImpl()->GetFrame())
+    return false;
+  return MainFrameImpl()
+      ->GetFrame()
+      ->GetEventHandler()
+      .MousePressEventSwallowed();
+}
+
 void WebViewImpl::SetFloatVideoWindowState(bool enable) {
   if (!GetPage())
     return;