Reland: Remove EnsureRenderFrameHostVisibilityConsistent [chromium/src : main]

0 views
Skip to first unread message

Michael Thiessen (Gerrit)

unread,
Jun 23, 2026, 4:47:31 PMJun 23
to Alex Moshchuk, Chromium UI Views Reviews, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
Attention needed from Alex Moshchuk and Chromium UI Views Reviews

Michael Thiessen voted and added 1 comment

Votes added by Michael Thiessen

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 8 (Latest):
Michael Thiessen . resolved

alexmos, please review content (hopefully for the last time xD)

chromium-ui-views-reviews, please review ui/views (and hopefully ui/aura?)

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Moshchuk
  • Chromium UI Views Reviews
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
Gerrit-Change-Number: 7959044
Gerrit-PatchSet: 8
Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
Gerrit-Reviewer: Chromium UI Views Reviews <chromium-ui-...@google.com>
Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-CC: Zhe Su <su...@chromium.org>
Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
Gerrit-Attention: Chromium UI Views Reviews <chromium-ui-...@google.com>
Gerrit-Comment-Date: Tue, 23 Jun 2026 20:47:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

gwsq (Gerrit)

unread,
Jun 23, 2026, 4:53:10 PMJun 23
to Michael Thiessen, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
Attention needed from Alex Moshchuk, Keren Zhu and Michael Thiessen

Message from gwsq

Reviewer source(s):
kere...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ui/views/config.gwsq)

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Moshchuk
  • Keren Zhu
  • Michael Thiessen
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
Gerrit-Change-Number: 7959044
Gerrit-PatchSet: 8
Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
Gerrit-CC: Chromium UI Views Reviews <chromium-ui-...@google.com>
Gerrit-CC: gwsq
Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
Gerrit-Attention: Keren Zhu <kere...@chromium.org>
Gerrit-Comment-Date: Tue, 23 Jun 2026 20:52:59 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Thiessen (Gerrit)

unread,
Jun 23, 2026, 5:12:52 PMJun 23
to Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
Attention needed from Alex Moshchuk, Colin Blundell and Keren Zhu

Michael Thiessen added 1 comment

Patchset-level comments
File-level comment, Patchset 9 (Latest):
Michael Thiessen . resolved

blundell please review ui/

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Moshchuk
  • Colin Blundell
  • Keren Zhu
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
Gerrit-Change-Number: 7959044
Gerrit-PatchSet: 9
Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
Gerrit-CC: Chromium UI Views Reviews <chromium-ui-...@google.com>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-CC: Zhe Su <su...@chromium.org>
Gerrit-CC: gwsq
Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
Gerrit-Attention: Colin Blundell <blun...@chromium.org>
Gerrit-Attention: Keren Zhu <kere...@chromium.org>
Gerrit-Comment-Date: Tue, 23 Jun 2026 21:12:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Thiessen (Gerrit)

unread,
Jun 23, 2026, 5:13:50 PMJun 23
to Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
Attention needed from Alex Moshchuk, Colin Blundell and Keren Zhu

Michael Thiessen added 1 comment

Patchset-level comments
Michael Thiessen . resolved

blundell please review ui/

Michael Thiessen

err I guess also chrome/browser and components/exo :)

Gerrit-Comment-Date: Tue, 23 Jun 2026 21:13:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Michael Thiessen <mthi...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Thiessen (Gerrit)

unread,
Jun 23, 2026, 5:16:20 PMJun 23
to Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
Attention needed from Alex Moshchuk, Colin Blundell and Keren Zhu

Michael Thiessen added 1 comment

File chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc
Line 289, Patchset 9 (Latest): WindowOpenDisposition::NEW_BACKGROUND_TAB,
Michael Thiessen . unresolved

I don't know if this was intended to be supported or not, but this change breaks because we were trying to inject input into a background tab (which now fails). Do I need to carve out an exception for devtools protocol for visibility requirements?

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Moshchuk
  • Colin Blundell
  • Keren Zhu
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
    Gerrit-Change-Number: 7959044
    Gerrit-PatchSet: 9
    Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-CC: Chromium UI Views Reviews <chromium-ui-...@google.com>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-CC: Zhe Su <su...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Attention: Colin Blundell <blun...@chromium.org>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Comment-Date: Tue, 23 Jun 2026 21:16:09 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Colin Blundell (Gerrit)

    unread,
    Jun 24, 2026, 5:41:48 AMJun 24
    to Michael Thiessen, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Keren Zhu and Michael Thiessen

    Colin Blundell added 1 comment

    Patchset-level comments
    File-level comment, Patchset 10 (Latest):
    Colin Blundell . resolved

    Thanks! I'll review for OWNERS after the others have given LGTM's on the technical changes.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Keren Zhu
    • Michael Thiessen
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
    Gerrit-Change-Number: 7959044
    Gerrit-PatchSet: 10
    Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-CC: Chromium UI Views Reviews <chromium-ui-...@google.com>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-CC: Zhe Su <su...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Comment-Date: Wed, 24 Jun 2026 09:41:28 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Alex Moshchuk (Gerrit)

    unread,
    Jun 24, 2026, 8:07:24 PMJun 24
    to Michael Thiessen, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Andrey Kosyakov, Keren Zhu and Michael Thiessen

    Alex Moshchuk added 6 comments

    Patchset-level comments
    File-level comment, Patchset 8:
    Michael Thiessen . unresolved

    alexmos, please review content (hopefully for the last time xD)

    chromium-ui-views-reviews, please review ui/views (and hopefully ui/aura?)

    Alex Moshchuk

    Thanks - admittedly the latest changes are making it more difficult for me to evaluate whether this change is ok, as I'm getting out of my depth. Hopefully other reviewers more familiar with the UI and rendering side of things can help review this as well.

    On a high level, is my understanding correct that previously EnsureRenderFrameHostVisibilityConsistent forced the RWHV to pretend it was visible before the navigation actually committed (presumably in newly opened tabs?). That allowed aura::Window to route input events to it, allowing Ctrl+Tab to work. Now, the RWHV stays hidden until it actually commits, but that implies we need to punch holes to allow input to go to hidden windows in cases that rely on it today? And we're moving that enforcement from the UI layer to WebContents?

    File chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc
    Line 289, Patchset 9: WindowOpenDisposition::NEW_BACKGROUND_TAB,
    Michael Thiessen . unresolved

    I don't know if this was intended to be supported or not, but this change breaks because we were trying to inject input into a background tab (which now fails). Do I need to carve out an exception for devtools protocol for visibility requirements?

    Alex Moshchuk

    I'm not sure - this is a question for a DevTools reviewer. @ca...@chromium.org, can you help answer this or redirect to someone who might now?

    I'd imagine DevTools probably does need to inject input into hidden tabs (e.g., for automation like ChromeDriver to drive background tabs, etc). Did this also change because the input blocking was moved from aura to WebContentsImpl::ShouldIgnoreWebInputEvents?

    File content/browser/renderer_host/render_frame_host_manager.cc
    Line 5171, Patchset 10 (Latest): // TODO(https://crbug.com/521200679): Removing this breaks keyboard tab
    // switching while a new tab is loading, despite the tab appearing to become
    // visible at the correct time.
    Alex Moshchuk . unresolved

    Does this need to be updated?

    File content/browser/renderer_host/render_widget_host_impl.cc
    Line 1833, Patchset 10 (Latest): }
    Alex Moshchuk . unresolved

    Why did you need to move this and also why skip the IsIgnoringWebInputEvents() check?

    File content/browser/web_contents/web_contents_impl.cc
    Line 10805, Patchset 10 (Latest): // WebContents that are never composited, like Extension background pages on
    // ChromeOS still need to handle input while not visible.
    Alex Moshchuk . unresolved

    Does this comment only cover the `!is_never_composited_` exception? Can the comment explain the core check as well, which is to block input going to hidden pages? Presumably, this is the replacement for the aura::Window check?

    File ui/views/widget/native_widget_aura.cc
    Line 1320, Patchset 10 (Latest): if (!window_->IsVisible()) {
    Alex Moshchuk . unresolved

    It seems pretty dangerous to me to remove the IsVisible() checks in this layer. Are we certain that the new check in WebContentsImpl is guaranteed to cover the same cases as before? I don't know much about this code, but did this cover any widgets that didn't correspond to WebContents, like hidden buttons, dialogs, etc? It seems like we should avoid regressing this check for cases like that, if any.

    Given this, I guess I wonder if your longer-term plan of decoupling whether the page is rendering vs whether the window is visible should be a prerequisite rather than a followup. I'm not really familiar with expectations at this layer, though, so happy to defer to an owner of this code.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrey Kosyakov
    • Keren Zhu
    • Michael Thiessen
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
    Gerrit-Change-Number: 7959044
    Gerrit-PatchSet: 10
    Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-CC: Chromium UI Views Reviews <chromium-ui-...@google.com>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-CC: Zhe Su <su...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Jun 2026 00:06:58 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Michael Thiessen <mthi...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Keren Zhu (Gerrit)

    unread,
    Jun 25, 2026, 12:26:06 AMJun 25
    to Michael Thiessen, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Andrey Kosyakov and Michael Thiessen

    Keren Zhu added 3 comments

    Commit Message
    Line 9, Patchset 10 (Latest):Last step of making WebContents the sole manager of whether content
    would like the RenderWidgetHostView to be visible.
    Keren Zhu . unresolved

    Does the RWHV in this context include OOPIF's RWHVs?

    Conceptually, I think the WebContent should only manage the visibility of the root frame and child frames / RWHVs should be managed by its parent frame.

    Consider an invisible OOP <iframe> due to `display: none`, the WebContents will have no idea about the `display: none`, but the parent blink::FrameView does. The visibility state is propagate from blink::FrameView -> blink::RemoteFrameHost -> RenderFrameProxyHost -> CrossProcessFrameConnector -> RWHVChildFrame. The WebContents is no involved.

    Line 12, Patchset 10 (Latest):Per the comment in the code, EnsureRenderFrameHostVisibilityConsistent
    should no longer be necessary as we unconditionally hide and show when
    committing a navigation.
    Keren Zhu . unresolved

    To help me understand, can you point me to the comment?

    File ui/views/widget/native_widget_aura.cc
    Line 1320, Patchset 10 (Latest): if (!window_->IsVisible()) {
    Alex Moshchuk . unresolved

    It seems pretty dangerous to me to remove the IsVisible() checks in this layer. Are we certain that the new check in WebContentsImpl is guaranteed to cover the same cases as before? I don't know much about this code, but did this cover any widgets that didn't correspond to WebContents, like hidden buttons, dialogs, etc? It seems like we should avoid regressing this check for cases like that, if any.

    Given this, I guess I wonder if your longer-term plan of decoupling whether the page is rendering vs whether the window is visible should be a prerequisite rather than a followup. I'm not really familiar with expectations at this layer, though, so happy to defer to an owner of this code.

    Keren Zhu

    +1. I would expect an invisible aura::Window or views::Widget to drop mouse or keyboard inputs. Note that these layers are used also in Browser UI and ChromeOS system UIs. These early returns are important to prevent users from unknowingly entering sensitive information into hidden UIs, e.g., by tricking user to press a quick succession of key combination which triggers and confirms an autofill popup. On ChromeOS I think there're apps from third parties. On Browser UI I think some Buy Now Pay Later (BNPL) UI is written in views and could be subject to this attack vector.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrey Kosyakov
    • Michael Thiessen
    Gerrit-Comment-Date: Thu, 25 Jun 2026 04:25:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Alex Moshchuk <ale...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Thiessen (Gerrit)

    unread,
    Jun 25, 2026, 11:50:52 AMJun 25
    to Robert Flack, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Andrey Kosyakov, Keren Zhu and Robert Flack

    Michael Thiessen added 8 comments

    Patchset-level comments
    Michael Thiessen . unresolved

    alexmos, please review content (hopefully for the last time xD)

    chromium-ui-views-reviews, please review ui/views (and hopefully ui/aura?)

    Alex Moshchuk

    Thanks - admittedly the latest changes are making it more difficult for me to evaluate whether this change is ok, as I'm getting out of my depth. Hopefully other reviewers more familiar with the UI and rendering side of things can help review this as well.

    On a high level, is my understanding correct that previously EnsureRenderFrameHostVisibilityConsistent forced the RWHV to pretend it was visible before the navigation actually committed (presumably in newly opened tabs?). That allowed aura::Window to route input events to it, allowing Ctrl+Tab to work. Now, the RWHV stays hidden until it actually commits, but that implies we need to punch holes to allow input to go to hidden windows in cases that rely on it today? And we're moving that enforcement from the UI layer to WebContents?

    Michael Thiessen

    Yep, that's exactly right. Hopefully this is the right long term move - surely checking for visibility for input should be a cross-platform thing and not tied to aura.

    I was discussing these changes with flackr@ maybe he can help with reviews?

    Commit Message
    Line 9, Patchset 10:Last step of making WebContents the sole manager of whether content

    would like the RenderWidgetHostView to be visible.
    Keren Zhu . resolved

    Does the RWHV in this context include OOPIF's RWHVs?

    Conceptually, I think the WebContent should only manage the visibility of the root frame and child frames / RWHVs should be managed by its parent frame.

    Consider an invisible OOP <iframe> due to `display: none`, the WebContents will have no idea about the `display: none`, but the parent blink::FrameView does. The visibility state is propagate from blink::FrameView -> blink::RemoteFrameHost -> RenderFrameProxyHost -> CrossProcessFrameConnector -> RWHVChildFrame. The WebContents is no involved.

    Michael Thiessen

    OOPIFs continue to be managed CrossProcessFrameConnector (https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/cross_process_frame_connector.cc;drc=d503f89588de845f4903558934b7513747b1be95;l=432)

    Perhaps I should clarify this comment to be about non-child RWHVs.

    Line 12, Patchset 10:Per the comment in the code, EnsureRenderFrameHostVisibilityConsistent

    should no longer be necessary as we unconditionally hide and show when
    committing a navigation.
    Keren Zhu . resolved

    To help me understand, can you point me to the comment?

    Line 289, Patchset 9: WindowOpenDisposition::NEW_BACKGROUND_TAB,
    Michael Thiessen . unresolved

    I don't know if this was intended to be supported or not, but this change breaks because we were trying to inject input into a background tab (which now fails). Do I need to carve out an exception for devtools protocol for visibility requirements?

    Alex Moshchuk

    I'm not sure - this is a question for a DevTools reviewer. @ca...@chromium.org, can you help answer this or redirect to someone who might now?

    I'd imagine DevTools probably does need to inject input into hidden tabs (e.g., for automation like ChromeDriver to drive background tabs, etc). Did this also change because the input blocking was moved from aura to WebContentsImpl::ShouldIgnoreWebInputEvents?

    Michael Thiessen

    Did this also change because the input blocking was moved from aura to WebContentsImpl::ShouldIgnoreWebInputEvents?

    Yes

    File content/browser/renderer_host/render_frame_host_manager.cc
    Line 5171, Patchset 10: // TODO(https://crbug.com/521200679): Removing this breaks keyboard tab

    // switching while a new tab is loading, despite the tab appearing to become
    // visible at the correct time.
    Alex Moshchuk . resolved

    Does this need to be updated?

    Michael Thiessen

    Done

    File content/browser/renderer_host/render_widget_host_impl.cc
    Line 1833, Patchset 10: }
    Alex Moshchuk . resolved

    Why did you need to move this and also why skip the IsIgnoringWebInputEvents() check?

    Michael Thiessen

    MayRenderWidgetForwardKeyboardEvent itself calls IsIgnoringWebInputEvents, so if I don't move it down here, the browser doesn't get a chance to handle key events (which happens in WebContentsImpl::PreHandleKeyboardEvent). I think the browser should be able to intercept key events regardless of the state of the renderer.

    IsIgnoringWebInputEvents is also called a second time by input_router()->SendKeyboardEvent, so now we're calling it twice instead of three times :)

    File content/browser/web_contents/web_contents_impl.cc
    Line 10805, Patchset 10: // WebContents that are never composited, like Extension background pages on

    // ChromeOS still need to handle input while not visible.
    Alex Moshchuk . resolved

    Does this comment only cover the `!is_never_composited_` exception? Can the comment explain the core check as well, which is to block input going to hidden pages? Presumably, this is the replacement for the aura::Window check?

    Michael Thiessen

    Yep, this is the replacement for the aura::Window check. Expanded the comment.

    File ui/views/widget/native_widget_aura.cc
    Line 1320, Patchset 10: if (!window_->IsVisible()) {
    Alex Moshchuk . resolved

    It seems pretty dangerous to me to remove the IsVisible() checks in this layer. Are we certain that the new check in WebContentsImpl is guaranteed to cover the same cases as before? I don't know much about this code, but did this cover any widgets that didn't correspond to WebContents, like hidden buttons, dialogs, etc? It seems like we should avoid regressing this check for cases like that, if any.

    Given this, I guess I wonder if your longer-term plan of decoupling whether the page is rendering vs whether the window is visible should be a prerequisite rather than a followup. I'm not really familiar with expectations at this layer, though, so happy to defer to an owner of this code.

    Keren Zhu

    +1. I would expect an invisible aura::Window or views::Widget to drop mouse or keyboard inputs. Note that these layers are used also in Browser UI and ChromeOS system UIs. These early returns are important to prevent users from unknowingly entering sensitive information into hidden UIs, e.g., by tricking user to press a quick succession of key combination which triggers and confirms an autofill popup. On ChromeOS I think there're apps from third parties. On Browser UI I think some Buy Now Pay Later (BNPL) UI is written in views and could be subject to this attack vector.

    Michael Thiessen

    Okay, reverted this change. I'm a little concerned this will lead to breakage, but the browser shortcuts like ctrl+tab continue to work so maybe it's fine.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Andrey Kosyakov
    • Keren Zhu
    • Robert Flack
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
    Gerrit-Change-Number: 7959044
    Gerrit-PatchSet: 12
    Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-CC: Chromium UI Views Reviews <chromium-ui-...@google.com>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-CC: Zhe Su <su...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Jun 2026 15:50:41 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Alex Moshchuk <ale...@chromium.org>
    Comment-In-Reply-To: Michael Thiessen <mthi...@chromium.org>
    Comment-In-Reply-To: Keren Zhu <kere...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrey Kosyakov (Gerrit)

    unread,
    Jun 25, 2026, 12:11:42 PMJun 25
    to Michael Thiessen, Robert Flack, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Keren Zhu, Michael Thiessen and Robert Flack

    Andrey Kosyakov added 1 comment

    File chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc
    Line 289, Patchset 9: WindowOpenDisposition::NEW_BACKGROUND_TAB,
    Michael Thiessen . unresolved

    I don't know if this was intended to be supported or not, but this change breaks because we were trying to inject input into a background tab (which now fails). Do I need to carve out an exception for devtools protocol for visibility requirements?

    Alex Moshchuk

    I'm not sure - this is a question for a DevTools reviewer. @ca...@chromium.org, can you help answer this or redirect to someone who might now?

    I'd imagine DevTools probably does need to inject input into hidden tabs (e.g., for automation like ChromeDriver to drive background tabs, etc). Did this also change because the input blocking was moved from aura to WebContentsImpl::ShouldIgnoreWebInputEvents?

    Michael Thiessen

    Did this also change because the input blocking was moved from aura to WebContentsImpl::ShouldIgnoreWebInputEvents?

    Yes

    Andrey Kosyakov

    Yes, we totally need input dispatched to background tabs to work, otherwise the browser automation clients would all break. FWIW, if you need a way to differentiate devtools-injected input events, this should help:

    https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/protocol/input_handler.cc;l=96

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Keren Zhu
    • Michael Thiessen
    • Robert Flack
    Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Jun 2026 16:11:18 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Keren Zhu (Gerrit)

    unread,
    Jun 25, 2026, 12:14:16 PMJun 25
    to Michael Thiessen, Robert Flack, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Michael Thiessen and Robert Flack

    Keren Zhu added 2 comments

    File ui/aura/window.cc
    Line 1723, Patchset 12 (Latest): return false;
    Keren Zhu . unresolved

    Same here, can we keep this early return?

    File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
    Line 1464, Patchset 12 (Latest): // DCHECK(content_window_->IsVisible());
    Keren Zhu . unresolved

    Can we keep the DCHECK here and in NativeWidgetAura?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Michael Thiessen
    • Robert Flack
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Jun 2026 16:14:07 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Thiessen (Gerrit)

    unread,
    Jun 25, 2026, 12:40:24 PMJun 25
    to Robert Flack, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Keren Zhu and Robert Flack

    Michael Thiessen added 2 comments

    File ui/aura/window.cc
    Keren Zhu . resolved

    Same here, can we keep this early return?

    Michael Thiessen

    We cannot, otherwise we don't deliver events to the browser (like ctrl+tab) before the page commits.

    File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
    Line 1464, Patchset 12 (Latest): // DCHECK(content_window_->IsVisible());
    Keren Zhu . unresolved

    Can we keep the DCHECK here and in NativeWidgetAura?

    Michael Thiessen

    No, tests fail on these DCHECKS because it's possible to get events before the page commits. We could turn them into early returns - I don't know if that would break anything.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Keren Zhu
    • Robert Flack
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Jun 2026 16:40:11 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Keren Zhu <kere...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Keren Zhu (Gerrit)

    unread,
    Jun 25, 2026, 12:57:45 PMJun 25
    to Michael Thiessen, Robert Flack, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Michael Thiessen and Robert Flack

    Keren Zhu added 2 comments

    File ui/aura/window.cc
    Keren Zhu . unresolved

    Same here, can we keep this early return?

    Michael Thiessen

    We cannot, otherwise we don't deliver events to the browser (like ctrl+tab) before the page commits.

    Keren Zhu

    In that case I think the tab's aura::Window shouldn't have the focus. Some other aura::Window, e.g., the browser UI's aura::Window should have focus and handle Ctrl+Tab directly.

    We have some code to prevent an invisible window from receiving focus, and hiding a window will cause a focus change, see [FocusController::OnWindowVisibilityChanged](https://source.chromium.org/chromium/chromium/src/+/main:ui/wm/core/focus_controller.cc;l=174;drc=d81edbd51ba06e32b3ecb78a6016ba7ff42f41e1) -> WindowLostFocusFromDispositionChange -> [SetFocusWindow](https://source.chromium.org/chromium/chromium/src/+/main:ui/wm/core/focus_controller.cc;l=489;drc=5650b3485eaa8443ee812a44056a1b88b4ee0ce1).

    File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
    Line 1464, Patchset 12 (Latest): // DCHECK(content_window_->IsVisible());
    Keren Zhu . unresolved

    Can we keep the DCHECK here and in NativeWidgetAura?

    Michael Thiessen

    No, tests fail on these DCHECKS because it's possible to get events before the page commits. We could turn them into early returns - I don't know if that would break anything.

    Keren Zhu

    Can you point me to the test failure? DesktopNativeWidgetAura is used by the top-level window (e.g. the browser UI window), i.e., it is not the direct container of a WebContents. Very likely we can fix the test and keep this DCHECK.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Michael Thiessen
    • Robert Flack
    Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Jun 2026 16:57:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Thiessen (Gerrit)

    unread,
    Jun 25, 2026, 1:12:38 PMJun 25
    to Robert Flack, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Keren Zhu and Robert Flack

    Michael Thiessen added 2 comments

    File ui/aura/window.cc
    Keren Zhu . unresolved

    Same here, can we keep this early return?

    Michael Thiessen

    We cannot, otherwise we don't deliver events to the browser (like ctrl+tab) before the page commits.

    Keren Zhu

    In that case I think the tab's aura::Window shouldn't have the focus. Some other aura::Window, e.g., the browser UI's aura::Window should have focus and handle Ctrl+Tab directly.

    We have some code to prevent an invisible window from receiving focus, and hiding a window will cause a focus change, see [FocusController::OnWindowVisibilityChanged](https://source.chromium.org/chromium/chromium/src/+/main:ui/wm/core/focus_controller.cc;l=174;drc=d81edbd51ba06e32b3ecb78a6016ba7ff42f41e1) -> WindowLostFocusFromDispositionChange -> [SetFocusWindow](https://source.chromium.org/chromium/chromium/src/+/main:ui/wm/core/focus_controller.cc;l=489;drc=5650b3485eaa8443ee812a44056a1b88b4ee0ce1).

    Michael Thiessen

    No, the Window is supposed to have focus, as it's visible to the user. The bug is that Window::IsVisible does *not* track visibility, it tracks whether content is rendering.

    I filed https://issues.chromium.org/issues/526983047, but that felt too big to tackle in this change and I'm probably not the person to do it.

    File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
    Line 1464, Patchset 12: // DCHECK(content_window_->IsVisible());
    Keren Zhu . unresolved

    Can we keep the DCHECK here and in NativeWidgetAura?

    Michael Thiessen

    No, tests fail on these DCHECKS because it's possible to get events before the page commits. We could turn them into early returns - I don't know if that would break anything.

    Keren Zhu

    Can you point me to the test failure? DesktopNativeWidgetAura is used by the top-level window (e.g. the browser UI window), i.e., it is not the direct container of a WebContents. Very likely we can fix the test and keep this DCHECK.

    Michael Thiessen

    Check patchset 1 of this CL - there are a ton of failing tests.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Keren Zhu
    • Robert Flack
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
    Gerrit-Change-Number: 7959044
    Gerrit-PatchSet: 13
    Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-CC: Chromium UI Views Reviews <chromium-ui-...@google.com>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-CC: Zhe Su <su...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Jun 2026 17:12:27 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Thiessen (Gerrit)

    unread,
    Jun 25, 2026, 1:12:51 PMJun 25
    to Robert Flack, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Andrey Kosyakov, Keren Zhu and Robert Flack

    Michael Thiessen added 1 comment

    File chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc
    Line 289, Patchset 9: WindowOpenDisposition::NEW_BACKGROUND_TAB,
    Michael Thiessen . resolved

    I don't know if this was intended to be supported or not, but this change breaks because we were trying to inject input into a background tab (which now fails). Do I need to carve out an exception for devtools protocol for visibility requirements?

    Alex Moshchuk

    I'm not sure - this is a question for a DevTools reviewer. @ca...@chromium.org, can you help answer this or redirect to someone who might now?

    I'd imagine DevTools probably does need to inject input into hidden tabs (e.g., for automation like ChromeDriver to drive background tabs, etc). Did this also change because the input blocking was moved from aura to WebContentsImpl::ShouldIgnoreWebInputEvents?

    Michael Thiessen

    Did this also change because the input blocking was moved from aura to WebContentsImpl::ShouldIgnoreWebInputEvents?

    Yes

    Andrey Kosyakov

    Yes, we totally need input dispatched to background tabs to work, otherwise the browser automation clients would all break. FWIW, if you need a way to differentiate devtools-injected input events, this should help:

    https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/protocol/input_handler.cc;l=96

    Michael Thiessen

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Andrey Kosyakov
    • Keren Zhu
    • Robert Flack
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Jun 2026 17:12:41 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Alex Moshchuk <ale...@chromium.org>
    Comment-In-Reply-To: Michael Thiessen <mthi...@chromium.org>
    Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Keren Zhu (Gerrit)

    unread,
    Jun 25, 2026, 3:45:56 PMJun 25
    to Michael Thiessen, Robert Flack, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Andrey Kosyakov, Michael Thiessen and Robert Flack

    Keren Zhu added 3 comments

    File ui/aura/window.cc
    Keren Zhu . unresolved

    Same here, can we keep this early return?

    Michael Thiessen

    We cannot, otherwise we don't deliver events to the browser (like ctrl+tab) before the page commits.

    Keren Zhu

    In that case I think the tab's aura::Window shouldn't have the focus. Some other aura::Window, e.g., the browser UI's aura::Window should have focus and handle Ctrl+Tab directly.

    We have some code to prevent an invisible window from receiving focus, and hiding a window will cause a focus change, see [FocusController::OnWindowVisibilityChanged](https://source.chromium.org/chromium/chromium/src/+/main:ui/wm/core/focus_controller.cc;l=174;drc=d81edbd51ba06e32b3ecb78a6016ba7ff42f41e1) -> WindowLostFocusFromDispositionChange -> [SetFocusWindow](https://source.chromium.org/chromium/chromium/src/+/main:ui/wm/core/focus_controller.cc;l=489;drc=5650b3485eaa8443ee812a44056a1b88b4ee0ce1).

    Michael Thiessen

    No, the Window is supposed to have focus, as it's visible to the user. The bug is that Window::IsVisible does *not* track visibility, it tracks whether content is rendering.

    I filed https://issues.chromium.org/issues/526983047, but that felt too big to tackle in this change and I'm probably not the person to do it.

    Keren Zhu

    It sounds wrong to me that an `IsVisble() == false` aura::Window is visible to the user. Such window should not have the focus - `aura::Window::Hide()` will ultimately call SetFocusWindow() to set focus on a different window.

    On Linux / Win, the aura::Window hierarchy is like the following:

    ```
    Each layer owns an aura::Window.
    - DesktopNativeWidgetAura (Browser UI)
    - WebContentsViewAura (Tab)
    - RenderWidgetHostViewAura (primary main frame)
    - RenderWidgetHostViewAura (optional, BFCache)
    ```

    Before navigation commit I think `WebContentsViewAura`'s aura::Window should be visible to user, but RWHV's aura::Window shouldn't.

    File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
    Line 1464, Patchset 12: // DCHECK(content_window_->IsVisible());
    Keren Zhu . unresolved

    Can we keep the DCHECK here and in NativeWidgetAura?

    Michael Thiessen

    No, tests fail on these DCHECKS because it's possible to get events before the page commits. We could turn them into early returns - I don't know if that would break anything.

    Keren Zhu

    Can you point me to the test failure? DesktopNativeWidgetAura is used by the top-level window (e.g. the browser UI window), i.e., it is not the direct container of a WebContents. Very likely we can fix the test and keep this DCHECK.

    Michael Thiessen

    Check patchset 1 of this CL - there are a ton of failing tests.

    Keren Zhu

    It seems like a [kMouseCaptureChanged](https://source.chromium.org/chromium/chromium/src/+/main:ui/aura/window_event_dispatcher.cc;l=434;drc=5650b3485eaa8443ee812a44056a1b88b4ee0ce1) event is sent to an invisible event during browser shutdown. This is probably OK.

    ```
    #13 0x5d6193622503 logging::CheckError::~CheckError()
    #14 0x5d619341317b views::DesktopNativeWidgetAura::OnMouseEvent()
    ...
    #19 0x5d6195e501fa aura::WindowEventDispatcher::UpdateCapture()
    ...
    #25 0x5d6195e3a20f aura::Window::SetVisibleInternal()
    ...
    #28 0x5d6193410622 views::DesktopNativeWidgetAura::Hide()
    #29 0x5d61933a841a views::Widget::Hide()
    ```

    There're also tests that sens `kMouseExited` to a hidden window.

    Instead of removing the CHECK entirely, can we CHECK that

    ```
    if (!IsVisible()) {
    CHECK(event->type() == ui::EventType::kMouseCaptureChanged
    || ui::EventType::kMouseExited);
    }
    ```

    here and in NativeWidgetAura::OnMouseEvent?

    Again the aura::Window / NativeWidget layers are used beyond web content so we want to be very careful here.

    File ui/views/widget/native_widget_aura.cc
    Line 1354, Patchset 13 (Latest): // DCHECK(window_->IsVisible() || event->IsEndingEvent());
    Keren Zhu . unresolved

    I couldn't find a test failure related to this. Can you point me to it?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Andrey Kosyakov
    • Michael Thiessen
    • Robert Flack
    Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Jun 2026 19:45:46 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Robert Flack (Gerrit)

    unread,
    Jun 25, 2026, 3:56:11 PMJun 25
    to Michael Thiessen, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Andrey Kosyakov and Michael Thiessen

    Robert Flack added 2 comments

    File content/browser/renderer_host/render_widget_host_impl.cc
    Line 1829, Patchset 13 (Latest):
    Robert Flack . unresolved

    Should we also be checking IsIgnoringWebInputEvents like the skipped code above used to?

    File content/browser/web_contents/web_contents_impl.cc
    Line 10806, Patchset 13 (Latest): // ChromeOS still need to handle input while not visible.
    Robert Flack . unresolved

    extension background pages handle input events? what kinds? are there some event types that should be allowed generally on hidden pages?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Andrey Kosyakov
    • Michael Thiessen
    Gerrit-Comment-Date: Thu, 25 Jun 2026 19:56:02 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Thiessen (Gerrit)

    unread,
    Jun 26, 2026, 11:08:35 AMJun 26
    to Robert Flack, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Andrey Kosyakov, Keren Zhu, Michael Thiessen and Robert Flack

    Michael Thiessen voted and added 5 comments

    Votes added by Michael Thiessen

    Commit-Queue+1

    5 comments

    File content/browser/renderer_host/render_widget_host_impl.cc
    Line 1829, Patchset 13:
    Robert Flack . resolved

    Should we also be checking IsIgnoringWebInputEvents like the skipped code above used to?

    Michael Thiessen

    We do twice still, once in MayRenderWidgetForwardKeyboardEvent and once more in input_router()->SendKeyboardEvent. I could add it back probably, but it's redundant.

    File content/browser/web_contents/web_contents_impl.cc
    Line 10806, Patchset 13: // ChromeOS still need to handle input while not visible.
    Robert Flack . unresolved

    extension background pages handle input events? what kinds? are there some event types that should be allowed generally on hidden pages?

    Michael Thiessen

    See the failing tests in Patchset 5, all of the SpokenFeedback tests are broken because they attempt to deliver input to an extension's background WebContents (this took a very long time to figure out xD).

    It's just normal key events that are supposed to navigate around OS UI as far as I can tell.

    File ui/aura/window.cc
    Keren Zhu . unresolved

    Same here, can we keep this early return?

    Michael Thiessen

    We cannot, otherwise we don't deliver events to the browser (like ctrl+tab) before the page commits.

    Keren Zhu

    In that case I think the tab's aura::Window shouldn't have the focus. Some other aura::Window, e.g., the browser UI's aura::Window should have focus and handle Ctrl+Tab directly.

    We have some code to prevent an invisible window from receiving focus, and hiding a window will cause a focus change, see [FocusController::OnWindowVisibilityChanged](https://source.chromium.org/chromium/chromium/src/+/main:ui/wm/core/focus_controller.cc;l=174;drc=d81edbd51ba06e32b3ecb78a6016ba7ff42f41e1) -> WindowLostFocusFromDispositionChange -> [SetFocusWindow](https://source.chromium.org/chromium/chromium/src/+/main:ui/wm/core/focus_controller.cc;l=489;drc=5650b3485eaa8443ee812a44056a1b88b4ee0ce1).

    Michael Thiessen

    No, the Window is supposed to have focus, as it's visible to the user. The bug is that Window::IsVisible does *not* track visibility, it tracks whether content is rendering.

    I filed https://issues.chromium.org/issues/526983047, but that felt too big to tackle in this change and I'm probably not the person to do it.

    Keren Zhu

    It sounds wrong to me that an `IsVisble() == false` aura::Window is visible to the user. Such window should not have the focus - `aura::Window::Hide()` will ultimately call SetFocusWindow() to set focus on a different window.

    On Linux / Win, the aura::Window hierarchy is like the following:

    ```
    Each layer owns an aura::Window.
    - DesktopNativeWidgetAura (Browser UI)
    - WebContentsViewAura (Tab)
    - RenderWidgetHostViewAura (primary main frame)
    - RenderWidgetHostViewAura (optional, BFCache)
    ```

    Before navigation commit I think `WebContentsViewAura`'s aura::Window should be visible to user, but RWHV's aura::Window shouldn't.

    Michael Thiessen

    It's possible there's an input routing bug, but empirically the input is getting delivered to the aura::Window that's not visible when you input keyboard events after following a link that opens in a new window (the window that becomes visible when the page in the new window commits).

    File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
    Michael Thiessen

    Tests are still failing with this revised check - I'm seeing kMouseEntered and kMouseMoved on NativeWidgetAura::OnMouseEvent

    File ui/views/widget/native_widget_aura.cc
    Line 1354, Patchset 13: // DCHECK(window_->IsVisible() || event->IsEndingEvent());
    Keren Zhu . resolved

    I couldn't find a test failure related to this. Can you point me to it?

    Michael Thiessen

    Patchset 16 has failing tests here.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Andrey Kosyakov
    • Keren Zhu
    • Michael Thiessen
    • Robert Flack
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
    Gerrit-Change-Number: 7959044
    Gerrit-PatchSet: 16
    Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-CC: Chromium UI Views Reviews <chromium-ui-...@google.com>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-CC: Zhe Su <su...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Comment-Date: Fri, 26 Jun 2026 15:08:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Michael Thiessen <mthi...@chromium.org>
    Comment-In-Reply-To: Keren Zhu <kere...@chromium.org>
    Comment-In-Reply-To: Robert Flack <fla...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Keren Zhu (Gerrit)

    unread,
    Jun 26, 2026, 2:09:56 PMJun 26
    to Michael Thiessen, Robert Flack, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Andrey Kosyakov, Michael Thiessen and Robert Flack

    Keren Zhu added 2 comments

    File ui/aura/window.cc
    Keren Zhu . unresolved

    Same here, can we keep this early return?

    Michael Thiessen

    We cannot, otherwise we don't deliver events to the browser (like ctrl+tab) before the page commits.

    Keren Zhu

    In that case I think the tab's aura::Window shouldn't have the focus. Some other aura::Window, e.g., the browser UI's aura::Window should have focus and handle Ctrl+Tab directly.

    We have some code to prevent an invisible window from receiving focus, and hiding a window will cause a focus change, see [FocusController::OnWindowVisibilityChanged](https://source.chromium.org/chromium/chromium/src/+/main:ui/wm/core/focus_controller.cc;l=174;drc=d81edbd51ba06e32b3ecb78a6016ba7ff42f41e1) -> WindowLostFocusFromDispositionChange -> [SetFocusWindow](https://source.chromium.org/chromium/chromium/src/+/main:ui/wm/core/focus_controller.cc;l=489;drc=5650b3485eaa8443ee812a44056a1b88b4ee0ce1).

    Michael Thiessen

    No, the Window is supposed to have focus, as it's visible to the user. The bug is that Window::IsVisible does *not* track visibility, it tracks whether content is rendering.

    I filed https://issues.chromium.org/issues/526983047, but that felt too big to tackle in this change and I'm probably not the person to do it.

    Keren Zhu

    It sounds wrong to me that an `IsVisble() == false` aura::Window is visible to the user. Such window should not have the focus - `aura::Window::Hide()` will ultimately call SetFocusWindow() to set focus on a different window.

    On Linux / Win, the aura::Window hierarchy is like the following:

    ```
    Each layer owns an aura::Window.
    - DesktopNativeWidgetAura (Browser UI)
    - WebContentsViewAura (Tab)
    - RenderWidgetHostViewAura (primary main frame)
    - RenderWidgetHostViewAura (optional, BFCache)
    ```

    Before navigation commit I think `WebContentsViewAura`'s aura::Window should be visible to user, but RWHV's aura::Window shouldn't.

    Michael Thiessen

    It's possible there's an input routing bug, but empirically the input is getting delivered to the aura::Window that's not visible when you input keyboard events after following a link that opens in a new window (the window that becomes visible when the page in the new window commits).

    Keren Zhu

    Do you have a reproducer or if there is a test case?

    File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
    Keren Zhu

    I see kMouseMoved on linux-chromeos-rel in PS16. I don't see kMouseEntered. A hidden window should never receive kMouseEntered. If it actually happens we should fix it.

    There are multiple callers of `PostSynthesizeMouseMove()`. Could you debug the origin of kMouseMoved event in those failing tests? I think it can be reproduced using UTR or locally with [ChromeOS on Linux](https://g3doc.corp.google.com/company/teams/unicorn/family-link/chromeos/development/workflows/chromeos/linux-chromeos.md?cl=head).

    Let me know if you have difficulties debugging this and I can help debug.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Andrey Kosyakov
    • Michael Thiessen
    • Robert Flack
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Comment-Date: Fri, 26 Jun 2026 18:09:46 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Keren Zhu (Gerrit)

    unread,
    Jun 26, 2026, 2:18:12 PMJun 26
    to Michael Thiessen, Mitsuru Oshima, Robert Flack, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Andrey Kosyakov, Michael Thiessen, Mitsuru Oshima and Robert Flack

    Keren Zhu added 1 comment

    Patchset-level comments
    File-level comment, Patchset 16 (Latest):
    Keren Zhu . resolved

    Since this change affects input stack on ChromeOS, +oshima san for review.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Andrey Kosyakov
    • Michael Thiessen
    • Mitsuru Oshima
    • Robert Flack
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
    Gerrit-Change-Number: 7959044
    Gerrit-PatchSet: 16
    Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-CC: Chromium UI Views Reviews <chromium-ui-...@google.com>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-CC: Zhe Su <su...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Comment-Date: Fri, 26 Jun 2026 18:18:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Thiessen (Gerrit)

    unread,
    Jun 26, 2026, 2:20:24 PMJun 26
    to Mitsuru Oshima, Robert Flack, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Andrey Kosyakov, Keren Zhu, Mitsuru Oshima and Robert Flack

    Michael Thiessen added 2 comments

    File ui/aura/window.cc
    Michael Thiessen

    https://issues.chromium.org/issues/521200679

    I can reproduce locally by hitting ctrl+tab shortly after following a link that opens in a new tab and is slow to commit. Links from gmail tend to work well for this.

    (In order to repro, you need to patch this CL (remove EnsureRenderFrameHostVisibilityConsistent), but revert the changes to aura::Window)

    File ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
    Michael Thiessen

    I'm heading out on vacation next week - if you have time to help debug I would love the help.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Andrey Kosyakov
    • Keren Zhu
    • Mitsuru Oshima
    • Robert Flack
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Comment-Date: Fri, 26 Jun 2026 18:20:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Robert Flack (Gerrit)

    unread,
    Jun 29, 2026, 10:27:20 AMJun 29
    to Michael Thiessen, Mitsuru Oshima, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Andrey Kosyakov, Keren Zhu, Michael Thiessen and Mitsuru Oshima

    Robert Flack added 2 comments

    File content/browser/renderer_host/render_widget_host_impl.cc
    Robert Flack . resolved

    Should we also be checking IsIgnoringWebInputEvents like the skipped code above used to?

    Michael Thiessen

    We do twice still, once in MayRenderWidgetForwardKeyboardEvent and once more in input_router()->SendKeyboardEvent. I could add it back probably, but it's redundant.

    Robert Flack

    Acknowledged, thanks!

    File content/browser/web_contents/web_contents_impl.cc
    Line 10806, Patchset 13: // ChromeOS still need to handle input while not visible.
    Robert Flack . unresolved

    extension background pages handle input events? what kinds? are there some event types that should be allowed generally on hidden pages?

    Michael Thiessen

    See the failing tests in Patchset 5, all of the SpokenFeedback tests are broken because they attempt to deliver input to an extension's background WebContents (this took a very long time to figure out xD).

    It's just normal key events that are supposed to navigate around OS UI as far as I can tell.

    Robert Flack

    Do you know where in the code we direclty dispatch events to the background page? This seems like it contradicts the idea that events are only dispatched to the visible contents, plus I don't know why a user would ever expect key input events to go to a background page or why extension background pages would ever expect to receive them - they can't be focused right? I see there's a shortcuts api https://developer.chrome.com/docs/extensions/reference/api/commands but this doesn't send the key event but just a special command event.

    Or is the background page allowed to attach event listeners to the foreground page's dom? I'm not sure if this is how content scripts work, but if so, we should probably be doing a visibility check of the contents the event was targeted at, but could treat this as a todo.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Andrey Kosyakov
    • Keren Zhu
    • Michael Thiessen
    • Mitsuru Oshima
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
    Gerrit-Change-Number: 7959044
    Gerrit-PatchSet: 18
    Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-CC: Chromium UI Views Reviews <chromium-ui-...@google.com>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-CC: Zhe Su <su...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Comment-Date: Mon, 29 Jun 2026 14:27:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Michael Thiessen <mthi...@chromium.org>
    Comment-In-Reply-To: Robert Flack <fla...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Thiessen (Gerrit)

    unread,
    Jul 15, 2026, 5:47:08 PM (11 days ago) Jul 15
    to David Tseng, Mitsuru Oshima, Robert Flack, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Andrey Kosyakov, David Tseng, Keren Zhu, Mitsuru Oshima and Robert Flack

    Michael Thiessen added 1 comment

    File content/browser/web_contents/web_contents_impl.cc
    Line 10806, Patchset 13: // ChromeOS still need to handle input while not visible.
    Robert Flack . unresolved

    extension background pages handle input events? what kinds? are there some event types that should be allowed generally on hidden pages?

    Michael Thiessen

    See the failing tests in Patchset 5, all of the SpokenFeedback tests are broken because they attempt to deliver input to an extension's background WebContents (this took a very long time to figure out xD).

    It's just normal key events that are supposed to navigate around OS UI as far as I can tell.

    Robert Flack

    Do you know where in the code we direclty dispatch events to the background page? This seems like it contradicts the idea that events are only dispatched to the visible contents, plus I don't know why a user would ever expect key input events to go to a background page or why extension background pages would ever expect to receive them - they can't be focused right? I see there's a shortcuts api https://developer.chrome.com/docs/extensions/reference/api/commands but this doesn't send the key event but just a special command event.

    Or is the background page allowed to attach event listeners to the foreground page's dom? I'm not sure if this is how content scripts work, but if so, we should probably be doing a visibility check of the contents the event was targeted at, but could treat this as a todo.

    Michael Thiessen

    The page is created here: https://source.chromium.org/chromium/chromium/src/+/main:extensions/browser/extension_host.cc;drc=54dd37fb9545f90b93fed90434ebf30cadacf65e;l=148

    I don't know how input is routed to it - the input routing code is very hard for me to follow as somebody not familiar with it.

    Maybe dtseng@ knows how this works and what the correct solution would be?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Andrey Kosyakov
    • David Tseng
    • Keren Zhu
    • Mitsuru Oshima
    • Robert Flack
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
    Gerrit-Change-Number: 7959044
    Gerrit-PatchSet: 18
    Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: David Tseng <dts...@chromium.org>
    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-CC: Chromium UI Views Reviews <chromium-ui-...@google.com>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-CC: Zhe Su <su...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Attention: David Tseng <dts...@chromium.org>
    Gerrit-Comment-Date: Wed, 15 Jul 2026 21:46:58 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Robert Flack (Gerrit)

    unread,
    Jul 16, 2026, 5:46:53 PM (10 days ago) Jul 16
    to Michael Thiessen, David Tseng, Mitsuru Oshima, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, David Tseng, Keren Zhu, Michael Thiessen and Mitsuru Oshima

    Robert Flack added 1 comment

    File content/browser/web_contents/web_contents_impl.cc
    Line 10806, Patchset 13: // ChromeOS still need to handle input while not visible.
    Robert Flack . unresolved

    extension background pages handle input events? what kinds? are there some event types that should be allowed generally on hidden pages?

    Michael Thiessen

    See the failing tests in Patchset 5, all of the SpokenFeedback tests are broken because they attempt to deliver input to an extension's background WebContents (this took a very long time to figure out xD).

    It's just normal key events that are supposed to navigate around OS UI as far as I can tell.

    Robert Flack

    Do you know where in the code we direclty dispatch events to the background page? This seems like it contradicts the idea that events are only dispatched to the visible contents, plus I don't know why a user would ever expect key input events to go to a background page or why extension background pages would ever expect to receive them - they can't be focused right? I see there's a shortcuts api https://developer.chrome.com/docs/extensions/reference/api/commands but this doesn't send the key event but just a special command event.

    Or is the background page allowed to attach event listeners to the foreground page's dom? I'm not sure if this is how content scripts work, but if so, we should probably be doing a visibility check of the contents the event was targeted at, but could treat this as a todo.

    Michael Thiessen

    The page is created here: https://source.chromium.org/chromium/chromium/src/+/main:extensions/browser/extension_host.cc;drc=54dd37fb9545f90b93fed90434ebf30cadacf65e;l=148

    I don't know how input is routed to it - the input routing code is very hard for me to follow as somebody not familiar with it.

    Maybe dtseng@ knows how this works and what the correct solution would be?

    Robert Flack

    If I understand correctly, this seems to just be a one-off for chromevox. How about we create a method on WebContentsDelegate::CanDeliverInputWhileHidden, overridden by ExtensionHost with something like this:

    ```c++
    bool ExtensionHost::CanDeliverInput() const {
    // Chromevox directly receives key events even though it is not visible
    return extension_id_ == extension_misc::kChromeVoxExtensionId;
    }
    ```

    Then we can call it here through the `delegate_` interface. This should hopefully not break anything and also ensure that we don't allow keyboard events to accidentally be sent to regular extension pages.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • David Tseng
    • Keren Zhu
    • Michael Thiessen
    • Mitsuru Oshima
    Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Attention: David Tseng <dts...@chromium.org>
    Gerrit-Comment-Date: Thu, 16 Jul 2026 21:46:42 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Tseng (Gerrit)

    unread,
    Jul 17, 2026, 2:50:31 PM (9 days ago) Jul 17
    to Michael Thiessen, Katie D, Mitsuru Oshima, Robert Flack, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Katie D, Keren Zhu, Michael Thiessen and Mitsuru Oshima

    David Tseng added 1 comment

    Patchset-level comments
    File-level comment, Patchset 18 (Latest):
    David Tseng . resolved

    +katie. IIUC, after ChromeVox MV3, we would no longer rely upon sending keys to the background page. I don't reacall if we need to send keys to other pages e.g. offscreen documents.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Katie D
    • Keren Zhu
    • Michael Thiessen
    • Mitsuru Oshima
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
    Gerrit-Change-Number: 7959044
    Gerrit-PatchSet: 18
    Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: David Tseng <dts...@chromium.org>
    Gerrit-Reviewer: Katie D <ka...@chromium.org>
    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-CC: Chromium UI Views Reviews <chromium-ui-...@google.com>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-CC: Zhe Su <su...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Attention: Katie D <ka...@chromium.org>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Comment-Date: Fri, 17 Jul 2026 18:50:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Katie D (Gerrit)

    unread,
    Jul 20, 2026, 5:47:29 PM (6 days ago) Jul 20
    to Michael Thiessen, David Tseng, Mitsuru Oshima, Robert Flack, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, Keren Zhu, Michael Thiessen and Mitsuru Oshima

    Katie D added 1 comment

    Patchset-level comments
    David Tseng . unresolved

    +katie. IIUC, after ChromeVox MV3, we would no longer rely upon sending keys to the background page. I don't reacall if we need to send keys to other pages e.g. offscreen documents.

    Katie D

    We will send keys to the background page through the new flow that's outside of extensions, the flow that was buggy during MV3 rollout.

    But I see a ['keydown registered'](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/resources/chromeos/accessibility/chromevox/mv3/offscreen/offscreen.ts;l=73?q=%27keydown%27%20-definitions%2F%20-braille%2F&ss=chromium%2Fchromium%2Fsrc:chrome%2Fbrowser%2Fresources%2Fchromeos%2Faccessibility%2F&start=11) in MV3 offscreen for learn mode. This might break?

    Otherwise I believe we only send events to foreground extension pages after that like the tutorial and the chromevox panel.

    I don't think the other extensions get keys directly at this point, except I'm not sure how braille works.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Comment-Date: Mon, 20 Jul 2026 21:47:19 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: David Tseng <dts...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Thiessen (Gerrit)

    unread,
    Jul 22, 2026, 5:44:19 PM (4 days ago) Jul 22
    to Katie D, David Tseng, Mitsuru Oshima, Robert Flack, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, chromium-a...@chromium.org, extension...@chromium.org, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, David Tseng, Katie D, Keren Zhu, Mitsuru Oshima and Robert Flack

    Michael Thiessen added 3 comments

    Patchset-level comments
    File-level comment, Patchset 18:
    David Tseng . resolved

    +katie. IIUC, after ChromeVox MV3, we would no longer rely upon sending keys to the background page. I don't reacall if we need to send keys to other pages e.g. offscreen documents.

    Katie D

    We will send keys to the background page through the new flow that's outside of extensions, the flow that was buggy during MV3 rollout.

    But I see a ['keydown registered'](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/resources/chromeos/accessibility/chromevox/mv3/offscreen/offscreen.ts;l=73?q=%27keydown%27%20-definitions%2F%20-braille%2F&ss=chromium%2Fchromium%2Fsrc:chrome%2Fbrowser%2Fresources%2Fchromeos%2Faccessibility%2F&start=11) in MV3 offscreen for learn mode. This might break?

    Otherwise I believe we only send events to foreground extension pages after that like the tutorial and the chromevox panel.

    I don't think the other extensions get keys directly at this point, except I'm not sure how braille works.

    Michael Thiessen

    Ack, I think flackr's suggestion will cover this?

    File content/browser/web_contents/web_contents_impl.cc
    Line 10806, Patchset 13: // ChromeOS still need to handle input while not visible.
    Robert Flack . resolved

    extension background pages handle input events? what kinds? are there some event types that should be allowed generally on hidden pages?

    Michael Thiessen

    See the failing tests in Patchset 5, all of the SpokenFeedback tests are broken because they attempt to deliver input to an extension's background WebContents (this took a very long time to figure out xD).

    It's just normal key events that are supposed to navigate around OS UI as far as I can tell.

    Robert Flack

    Do you know where in the code we direclty dispatch events to the background page? This seems like it contradicts the idea that events are only dispatched to the visible contents, plus I don't know why a user would ever expect key input events to go to a background page or why extension background pages would ever expect to receive them - they can't be focused right? I see there's a shortcuts api https://developer.chrome.com/docs/extensions/reference/api/commands but this doesn't send the key event but just a special command event.

    Or is the background page allowed to attach event listeners to the foreground page's dom? I'm not sure if this is how content scripts work, but if so, we should probably be doing a visibility check of the contents the event was targeted at, but could treat this as a todo.

    Michael Thiessen

    The page is created here: https://source.chromium.org/chromium/chromium/src/+/main:extensions/browser/extension_host.cc;drc=54dd37fb9545f90b93fed90434ebf30cadacf65e;l=148

    I don't know how input is routed to it - the input routing code is very hard for me to follow as somebody not familiar with it.

    Maybe dtseng@ knows how this works and what the correct solution would be?

    Robert Flack

    If I understand correctly, this seems to just be a one-off for chromevox. How about we create a method on WebContentsDelegate::CanDeliverInputWhileHidden, overridden by ExtensionHost with something like this:

    ```c++
    bool ExtensionHost::CanDeliverInput() const {
    // Chromevox directly receives key events even though it is not visible
    return extension_id_ == extension_misc::kChromeVoxExtensionId;
    }
    ```

    Then we can call it here through the `delegate_` interface. This should hopefully not break anything and also ensure that we don't allow keyboard events to accidentally be sent to regular extension pages.

    Michael Thiessen

    Done

    File ui/aura/window.cc
    Michael Thiessen

    Have you had a chance to look into this Keren? I'll re-iterate that I believe the problem is that aura::Window visibility is tied to WebContents rendering, and not whether the window is actually visible to the user (and has input focus). Because of this we end up with a period of time where a new tab has been created, has input focus, and can be seen by the user before the WebContents starts rendering and marks the Window as Visible.

    We cannot reject input during this time, or we drop inputs like ctrl+tab. If we were to keep focus on the previous tab until the new tab is rendering that would also probably not work as the previous tab would then be handling input while no longer visible.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • David Tseng
    • Katie D
    • Keren Zhu
    • Mitsuru Oshima
    • Robert Flack
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
    Gerrit-Change-Number: 7959044
    Gerrit-PatchSet: 19
    Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: David Tseng <dts...@chromium.org>
    Gerrit-Reviewer: Katie D <ka...@chromium.org>
    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-CC: Chromium UI Views Reviews <chromium-ui-...@google.com>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-CC: Zhe Su <su...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Attention: Katie D <ka...@chromium.org>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Attention: Robert Flack <fla...@chromium.org>
    Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
    Gerrit-Attention: David Tseng <dts...@chromium.org>
    Gerrit-Comment-Date: Wed, 22 Jul 2026 21:43:58 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Michael Thiessen <mthi...@chromium.org>
    Comment-In-Reply-To: Katie D <ka...@chromium.org>
    Comment-In-Reply-To: Keren Zhu <kere...@chromium.org>
    Comment-In-Reply-To: Robert Flack <fla...@chromium.org>
    Comment-In-Reply-To: David Tseng <dts...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Robert Flack (Gerrit)

    unread,
    Jul 23, 2026, 10:19:44 AM (3 days ago) Jul 23
    to Michael Thiessen, Katie D, David Tseng, Mitsuru Oshima, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Keren Zhu, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, chromium-a...@chromium.org, extension...@chromium.org, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
    Attention needed from Alex Moshchuk, David Tseng, Katie D, Keren Zhu, Michael Thiessen and Mitsuru Oshima

    Robert Flack voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • David Tseng
    • Katie D
    • Keren Zhu
    • Michael Thiessen
    • Mitsuru Oshima
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
      Gerrit-Change-Number: 7959044
      Gerrit-PatchSet: 20
      Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
      Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
      Gerrit-Reviewer: David Tseng <dts...@chromium.org>
      Gerrit-Reviewer: Katie D <ka...@chromium.org>
      Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Mitsuru Oshima <osh...@chromium.org>
      Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
      Gerrit-CC: Chromium UI Views Reviews <chromium-ui-...@google.com>
      Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
      Gerrit-CC: Zhe Su <su...@chromium.org>
      Gerrit-CC: gwsq
      Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
      Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Attention: Katie D <ka...@chromium.org>
      Gerrit-Attention: Keren Zhu <kere...@chromium.org>
      Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
      Gerrit-Attention: David Tseng <dts...@chromium.org>
      Gerrit-Comment-Date: Thu, 23 Jul 2026 14:19:26 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Keren Zhu (Gerrit)

      unread,
      Jul 23, 2026, 1:49:33 PM (3 days ago) Jul 23
      to Michael Thiessen, Robert Flack, Katie D, David Tseng, Mitsuru Oshima, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, chromium-a...@chromium.org, extension...@chromium.org, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
      Attention needed from Alex Moshchuk, David Tseng, Katie D, Michael Thiessen and Mitsuru Oshima

      Keren Zhu added 1 comment

      File ui/aura/window.cc
      Keren Zhu

      I haven't yet. Sorry I am a bit overloaded at the moment. I'll spend some time today and hopefully get back to you tomorrow.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alex Moshchuk
      • David Tseng
      • Katie D
      • Michael Thiessen
      • Mitsuru Oshima
      Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
      Gerrit-Attention: David Tseng <dts...@chromium.org>
      Gerrit-Comment-Date: Thu, 23 Jul 2026 17:49:11 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Michael Thiessen <mthi...@chromium.org>
      Comment-In-Reply-To: Keren Zhu <kere...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Keren Zhu (Gerrit)

      unread,
      Jul 24, 2026, 9:47:49 PM (2 days ago) Jul 24
      to Michael Thiessen, (Julie)Jeongeun Kim, Robert Flack, Katie D, David Tseng, Mitsuru Oshima, Andrey Kosyakov, Colin Blundell, Chromium UI Views Reviews, Alex Moshchuk, Zhe Su, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, katie...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, kyungjunle...@google.com, josiah...@chromium.org, hirokisa...@chromium.org, dtseng...@chromium.org, abigailbk...@google.com, francisjp...@google.com, chromium-a...@chromium.org, extension...@chromium.org, dtapuska+ch...@chromium.org, jbauma...@chromium.org, yhanada+...@chromium.org, devtools...@chromium.org, crostin...@chromium.org, mac-r...@chromium.org, sky+...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, yhanad...@chromium.org, roblia...@chromium.org, keithle...@chromium.org, tranbaod...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, language...@chromium.org, navigation...@chromium.org
      Attention needed from Alex Moshchuk, David Tseng, Katie D, Michael Thiessen, Mitsuru Oshima and Robert Flack
      File ui/aura/window.cc
      Keren Zhu

      I looked into how a new tab's `aura::Window` gets focused. The stack trace:

      ```
      #0 content::RenderWidgetHostViewAura::Focus()
      #1 content::WebContentsViewAura::Focus()
      #2 content::WebContentsViewAura::SetInitialFocus()
      #3 content::WebContentsViewAura::RestoreFocus()
      #4 content::WebContentsImpl::RestoreFocus()
      #5 BrowserView::OnActiveTabChanged()
      #6 BrowserView::OnTabStripModelChanged()
      #7 TabStripModel::NotifyIfActiveOrSelectionChanged()
      #8 TabStripModel::ActivateTabAt()
      #9 TabStripModel::AddTab()
      ```

      `RenderWidgetHostViewAura::Focus()` successfully focuses its owning `aura::Window` on tab switch. During this process, `Window::CanFocus()` is called and returns true. `CanFocus()` does not check if the window is visible and therefore the focus change goes through. Looks like "hidden window is not focusable" is not a strict invariant in Aura.

      I tried the idea to focus the WebContentsViewAura's `aura::Window` first, then when the page is ready, forward the focus to RWHV. The idea works and test passes, but I am not happy with the complexity it adds. https://paste.googleplex.com/5100868130177024.

      So I am inclined to +1 to your solution - that is, to allow a hidden window to accept input events. To avoid breaking other `aura::Window` usage, I think we should limit this behavior to only RWHV's window. Can we add an virtual `aura::WindowDelegate::AllowsInputsForHiddenAuraWindow()`? Then, we can return true from `RenderWidgetHostViewAura` which is a subclass `WindowDelegate`.

      Note that I am not the owner of `ui/aura`. Please ask osh...@chromium.org or zorai...@chromium.org for review. Thanks.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alex Moshchuk
      • David Tseng
      • Katie D
      • Michael Thiessen
      • Mitsuru Oshima
      • Robert Flack
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I8b82b5561821aed7c8455c8ab4e9a1db57a88633
        Gerrit-Change-Number: 7959044
        Gerrit-PatchSet: 26
        Gerrit-Owner: Michael Thiessen <mthi...@chromium.org>
        Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
        Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
        Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
        Gerrit-Reviewer: David Tseng <dts...@chromium.org>
        Gerrit-Reviewer: Katie D <ka...@chromium.org>
        Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
        Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
        Gerrit-Reviewer: Mitsuru Oshima <osh...@chromium.org>
        Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
        Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
        Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
        Gerrit-CC: Chromium UI Views Reviews <chromium-ui-...@google.com>
        Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
        Gerrit-CC: Zhe Su <su...@chromium.org>
        Gerrit-CC: gwsq
        Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
        Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
        Gerrit-Attention: Katie D <ka...@chromium.org>
        Gerrit-Attention: Robert Flack <fla...@chromium.org>
        Gerrit-Attention: Mitsuru Oshima <osh...@chromium.org>
        Gerrit-Attention: David Tseng <dts...@chromium.org>
        Gerrit-Comment-Date: Sat, 25 Jul 2026 01:47:40 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages