Skip to content

Commit

Permalink
Update navigator.Share to use GetTopLevelRenderWidgetHostView
Browse files Browse the repository at this point in the history
Future-proofing the Windows implementation of navigator.Share to fetch
the top-level RenderWidgetHostView (when attempting to find the HWND
designated for accessibility with the WebContents). This does not impact
any known scenarios today, but would if the WebContents were ever
hosted in a RenderWidgetHostViewChildFrame.

Change-Id: Ie1692498a5481a68a39f88a6d72e2fd5b8a415f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3812389
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Commit-Queue: Hoch Hochkeppel <mhochk@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1032034}
  • Loading branch information
mhochk authored and Chromium LUCI CQ committed Aug 5, 2022
1 parent 13b99fd commit a0eaf85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chrome/browser/webshare/win/share_operation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ void ShareOperation::Run(blink::mojom::ShareService::ShareCallback callback) {
// with the WebContents.
HWND hwnd = nullptr;
content::RenderWidgetHostView* host_view =
web_contents_->GetRenderWidgetHostView();
web_contents_->GetTopLevelRenderWidgetHostView();
if (host_view) {
ui::AXPlatformNode* platform_node =
ui::AXPlatformNode::FromNativeViewAccessible(
Expand Down

0 comments on commit a0eaf85

Please sign in to comment.