1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
- From: Kyrylo Hrechykhin <[email protected]>
- Date: Thu, 6 Oct 2022 18:30:53 +0200
- Subject: fix: on-screen-keyboard hides on input blur in webview
- Changes introduced by this patch fix issue where OSK does not hide on
- input rendered inside webview is blurred. This patch should be removed
- when proper fix in chromium repo is available.
- Note: the issue still occurs if input rendered in webview blurred due
- to touch outside of webview. It is caused by webview implementation
- details. Specificaly due to webview has its own tree nodes and focused
- node does not change in this case.
- chromium-bug: https://crbug.com/1369605
- diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
- index c4312c899d5293eeb59d679dfa81a8f005f30940..906b47e935bdc3d37cf8313e5938bf79da335517 100644
- --- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc
- +++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
- @@ -1039,6 +1039,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties(
- return viz::ScopedSurfaceIdAllocator(std::move(allocation_task));
- }
-
- +void RenderWidgetHostViewChildFrame::FocusedNodeChanged(
- + bool is_editable_node,
- + const gfx::Rect& node_bounds_in_screen) {
- + NOTREACHED();
- +}
- +
- ui::TextInputType RenderWidgetHostViewChildFrame::GetTextInputType() const {
- if (!text_input_manager_)
- return ui::TEXT_INPUT_TYPE_NONE;
- diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.h b/content/browser/renderer_host/render_widget_host_view_child_frame.h
- index e340087e3ab2f07937ed6e6bd8e0ec8aa2a76d48..2b29e246b2f6ecf5d7605abfa36028642a7850c0 100644
- --- a/content/browser/renderer_host/render_widget_host_view_child_frame.h
- +++ b/content/browser/renderer_host/render_widget_host_view_child_frame.h
- @@ -181,6 +181,8 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame
- void DisableAutoResize(const gfx::Size& new_size) override;
- viz::ScopedSurfaceIdAllocator DidUpdateVisualProperties(
- const cc::RenderFrameMetadata& metadata) override;
- + void FocusedNodeChanged(bool is_editable_node,
- + const gfx::Rect& node_bounds_in_screen) override;
-
- // RenderFrameMetadataProvider::Observer implementation.
- void OnRenderFrameMetadataChangedBeforeActivation(
- diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
- index a2e8526344318df726ea3af130aab3f72a3125e1..35b1cdcd9099bac3fd926ab6c9587dc5597c0d7d 100644
- --- a/content/browser/web_contents/web_contents_impl.cc
- +++ b/content/browser/web_contents/web_contents_impl.cc
- @@ -8645,7 +8645,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
- "WebContentsImpl::OnFocusedElementChangedInFrame",
- "render_frame_host", frame);
- RenderWidgetHostViewBase* root_view =
- - static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView());
- + static_cast<RenderWidgetHostViewBase*>(GetTopLevelRenderWidgetHostView());
- if (!root_view || !frame->GetView()) {
- return;
- }
|