[M120 Migration][VD] Don't set focus when FinishLoad 75/307075/3
authorfangfengrong <fr.fang@samsung.com>
Tue, 5 Mar 2024 03:08:55 +0000 (11:08 +0800)
committerfangfengrong <fr.fang@samsung.com>
Tue, 5 Mar 2024 23:43:34 +0000 (07:43 +0800)
For WRT type App, will set focus when app show:
WRTNativeWindow::Show()->WRTNativeWindow::Focus();
For Browser/hbbtv type App, will set focus by ewk_view_focus_set api.

Keep same with M94, don't set focus when FinishLoad, or else will cause
two focus issue: one focus on webview, another focus on app(such as on
webbrowser url).

refer:
https://review.tizen.org/gerrit/#/c/296637/

Change-Id: I61eee8952019b9cc342ad88503276bb6399a6d43
Signed-off-by: fangfengrong <fr.fang@samsung.com>
tizen_src/ewk/efl_integration/web_contents_observer_efl.cc

index e22fefa..5027c50 100644 (file)
@@ -25,6 +25,7 @@
 #include "ipc/ipc_message_macros.h"
 #include "printing/metafile_skia.h"
 #include "third_party/skia/include/core/SkBitmap.h"
+#include "tizen_src/chromium_impl/tizen/system_info.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/geometry/size.h"
 #include "url/gurl.h"
@@ -154,7 +155,8 @@ void WebContentsObserverEfl::DidFinishLoad(RenderFrameHost* render_frame_host,
 #endif
 
   TTRACE_WEB("WebContentsObserverEfl::DidFinishLoad");
-  web_contents_.Focus();
+  if (IsMobileProfile() || IsWearableProfile())
+    web_contents_.Focus();
 }
 
 void WebContentsObserverEfl::DidFailLoad(RenderFrameHost* render_frame_host,