#if BUILDFLAG(IS_TIZEN_TV)
void EWebView::RunPendingSetFocus(Eina_Bool focus) {
- if (!web_contents_ || !rwhva() || (HasFocus() == focus))
+ SetFocusInternal(focus);
+}
+
+void EWebView::SetFocusInternal(Eina_Bool focus) {
+ if (!rwhva() || !rwhva()->offscreen_helper() || (HasFocus() == focus))
return;
rwhva()->offscreen_helper()->Focus(focus);
}
#endif
void EWebView::SetFocus(Eina_Bool focus) {
- if (!web_contents_ || !rwhva() || (HasFocus() == focus))
+ if (!web_contents_)
return;
#if BUILDFLAG(IS_TIZEN_TV)
if (web_contents_->GetPrimaryMainFrame()->IsRenderFrameLive()) {
- rwhva()->offscreen_helper()->Focus(focus);
+ SetFocusInternal(focus);
if (pending_setfocus_closure_)
pending_setfocus_closure_.Reset();
}
Eina_Bool EWebView::HasFocus() const {
- if (!rwhva())
+ if (!rwhva() || !rwhva()->offscreen_helper())
return EINA_FALSE;
return rwhva()->offscreen_helper()->HasFocus() ? EINA_TRUE : EINA_FALSE;
void InitInspectorServer();
void RunPendingSetFocus(Eina_Bool focus);
+ void SetFocusInternal(Eina_Bool focus);
#endif
JavaScriptDialogManagerEfl* GetJavaScriptDialogManagerEfl();