Commit 033488b1 authored by Adithya Srinivasan's avatar Adithya Srinivasan Committed by Chromium LUCI CQ

Fix callsite of RenderWidgetHostImpl::is_focused()

Looking at the callsites of SetPageFocus, we only set is_focused for
main frame RWHs.

Change-Id: Ib28e28ea83d4815469484c509921dcde4143135c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2611945Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
Commit-Queue: Adithya Srinivasan <adithyas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842062}
parent 10f6b9dc
......@@ -6985,7 +6985,8 @@ void RenderFrameHostImpl::InvalidateMojoConnection() {
}
bool RenderFrameHostImpl::IsFocused() {
if (!GetRenderWidgetHost()->is_focused() || !frame_tree_->GetFocusedFrame())
if (!GetMainFrame()->GetRenderWidgetHost()->is_focused() ||
!frame_tree_->GetFocusedFrame())
return false;
RenderFrameHostImpl* focused_rfh =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment