[M120 Migration][IME][VD] Deduce focus attribute from RWHVAura in onscreen mode 86/307186/4
authorfangfengrong <fr.fang@samsung.com>
Wed, 6 Mar 2024 17:48:12 +0000 (01:48 +0800)
committerBot Blink <blinkbot@samsung.com>
Wed, 6 Mar 2024 11:10:33 +0000 (11:10 +0000)
Focus checks are done before handling text inputs. In offscreen
mode, |content_image_| is used, which is inexistant in onscreen
mode. This patch instead checks for focus from RWHVAura which
retrieves it from aura::window

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

Change-Id: Id84a2a365829f7e8533e4cc3dbad770242450e36
Signed-off-by: fangfengrong <fr.fang@samsung.com>
tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_common_helper_efl.cc

index 1f3a744..684f925 100644 (file)
@@ -360,10 +360,13 @@ void RWHVAuraCommonHelperEfl::TextInputStateChanged(
     return;
   }
 
+  bool is_not_showing = !rwhv_aura_->IsShowing();
 #if BUILDFLAG(IS_TIZEN_TV)
-  if (!rwhv_aura_->IsShowing() || !HasFocus())
+  bool is_not_focused =
+      IsOffscreenMode() ? !HasFocus() : !rwhv_aura_->HasFocus();
+  if (is_not_showing || is_not_focused)
 #else
-  if (!rwhv_aura_->IsShowing())
+  if (is_not_showing)
 #endif
     return;