ScrollFocusedNodeIntoView();
}
-#if defined(USE_AURA) && BUILDFLAG(IS_TIZEN_TV)
if (host_) {
int x, y;
evas_object_geometry_get(efl_main_layout_, &x, &y, nullptr, nullptr);
gfx::Rect bounds(x, y, width, height);
host_->SetBoundsInPixels(bounds);
+
+ if (!web_contents_->GetRenderWidgetHostView()) {
+ // Usually, the size of |WebContentsViewAura::window_| is set in
+ // |RWHVAuraOffscreenHelperEfl::OnParentViewResize|. However, if
+ // |EWebView::HandleResize| is called before attaching
+ // |RenderWidgetHostViewAura|, this operation is not executed. In order
+ // to set the size correctly, call |SetBounds| function here.
+ web_contents_->GetNativeView()->SetBounds(gfx::Rect(bounds.size()));
+ }
}
-#endif
return true;
}