Unbounded Element: Support unbounded element from iframes [chromium/src : main]

0 views
Skip to first unread message

Vladimir Levin (Gerrit)

unread,
Jun 22, 2026, 11:49:51 AM (7 days ago) Jun 22
to Mason Freed, Philip Rogers, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
Attention needed from Mason Freed and Philip Rogers

Vladimir Levin added 2 comments

File third_party/blink/renderer/core/dom/document.cc
Line 8692, Patchset 9 (Latest):bool Document::HasActiveUnboundedElements() const {
Vladimir Levin . unresolved

It's a little weird to me that a document essentially says "yes" to having unbounded elements if some other document in the same local frame tree has an unbounded element.

Can you remind me where this is actually used?

File third_party/blink/renderer/core/html/html_element.cc
Line 1674, Patchset 9 (Latest): if (widget) {
Vladimir Levin . unresolved

I feel like you can just nest that in the if

Open in Gerrit

Related details

Attention is currently required from:
  • Mason Freed
  • Philip Rogers
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: Idee4df5333c7231bd651e7aba9c2499f50be53cb
Gerrit-Change-Number: 7948140
Gerrit-PatchSet: 9
Gerrit-Owner: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
Gerrit-CC: Daniel Cheng <dch...@chromium.org>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Comment-Date: Mon, 22 Jun 2026 15:49:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mason Freed (Gerrit)

unread,
Jun 22, 2026, 1:49:17 PM (7 days ago) Jun 22
to Vladimir Levin, Philip Rogers, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
Attention needed from Philip Rogers and Vladimir Levin

Mason Freed added 2 comments

File third_party/blink/renderer/core/dom/document.cc
Line 8692, Patchset 9 (Latest):bool Document::HasActiveUnboundedElements() const {
Vladimir Levin . unresolved

It's a little weird to me that a document essentially says "yes" to having unbounded elements if some other document in the same local frame tree has an unbounded element.

Can you remind me where this is actually used?

Mason Freed

Yeah, this is one area where a public API will need more thought, e.g. allowing sub-frames to have permission to do this. But currently unbounded elements are one-per-top-level-frame, and that's being more hard-coded with this patch.

`HasActiveUnboundedElements` is used roughly one place right now, here:

https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/layout_view.cc;l=181;drc=0a104dd9b84525a9fdb0423d168f1524e4c8b06d

That needs to know "is there any unbounded window right now? If so, I need to look for hit test results outside clips".

File third_party/blink/renderer/core/html/html_element.cc
Vladimir Levin . unresolved

I feel like you can just nest that in the if

Mason Freed

Before I just go do that, you mean like this?

```
if (active && widget) {
widget->IncrementActiveUnboundedElementCount();
} else if (!active && widget) {
widget->DecrementActiveUnboundedElementCount();
}
```

Because if so, I really prefer the existing thing...

Open in Gerrit

Related details

Attention is currently required from:
  • Philip Rogers
  • Vladimir Levin
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: Idee4df5333c7231bd651e7aba9c2499f50be53cb
Gerrit-Change-Number: 7948140
Gerrit-PatchSet: 9
Gerrit-Owner: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
Gerrit-CC: Daniel Cheng <dch...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
Gerrit-Comment-Date: Mon, 22 Jun 2026 17:48:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Vladimir Levin <vmp...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Mason Freed (Gerrit)

unread,
Jun 23, 2026, 12:16:49 PM (6 days ago) Jun 23
to Vladimir Levin, Philip Rogers, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
Attention needed from Philip Rogers and Vladimir Levin

Mason Freed added 1 comment

Patchset-level comments
File-level comment, Patchset 9 (Latest):
Mason Freed . resolved

Anything I can do to help with the review here?

Gerrit-Comment-Date: Tue, 23 Jun 2026 16:16:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Philip Rogers (Gerrit)

unread,
Jun 23, 2026, 9:38:03 PM (6 days ago) Jun 23
to Mason Freed, Vladimir Levin, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
Attention needed from Mason Freed and Vladimir Levin

Philip Rogers added 1 comment

File third_party/blink/renderer/core/frame/web_frame_widget_impl.cc
Line 2750, Patchset 10 (Latest): unbounded_surface_state_ =
Philip Rogers . unresolved

Are there issues with supporting multiple simultaneous unbounded elements? Here we overwrite unbounded_surface_state_, but the old one is still active. This can now happen with this patch due to unbounded elements being created from different iframes which have different execution contexts.

Open in Gerrit

Related details

Attention is currently required from:
  • Mason Freed
  • Vladimir Levin
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: Idee4df5333c7231bd651e7aba9c2499f50be53cb
Gerrit-Change-Number: 7948140
Gerrit-PatchSet: 10
Gerrit-Owner: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
Gerrit-CC: Daniel Cheng <dch...@chromium.org>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Jun 2026 01:37:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mason Freed (Gerrit)

unread,
Jun 24, 2026, 4:47:58 PM (5 days ago) Jun 24
to Vladimir Levin, Philip Rogers, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
Attention needed from Philip Rogers and Vladimir Levin

Mason Freed added 1 comment

File third_party/blink/renderer/core/frame/web_frame_widget_impl.cc
Line 2750, Patchset 10: unbounded_surface_state_ =
Philip Rogers . resolved

Are there issues with supporting multiple simultaneous unbounded elements? Here we overwrite unbounded_surface_state_, but the old one is still active. This can now happen with this patch due to unbounded elements being created from different iframes which have different execution contexts.

Mason Freed

Yeah, that's currently possible. It's been on my to-do list to lock down, but I just hadn't gotten to it yet. Because of this comment, I've implemented protections against multiple unbounded elements. See patchset 13+.

Open in Gerrit

Related details

Attention is currently required from:
  • Philip Rogers
  • Vladimir Levin
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: Idee4df5333c7231bd651e7aba9c2499f50be53cb
Gerrit-Change-Number: 7948140
Gerrit-PatchSet: 13
Gerrit-Owner: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
Gerrit-CC: Daniel Cheng <dch...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Jun 2026 20:47:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Philip Rogers <p...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Mason Freed (Gerrit)

unread,
Jun 24, 2026, 4:49:54 PM (5 days ago) Jun 24
to Rakina Zata Amni, Vladimir Levin, Philip Rogers, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
Attention needed from Philip Rogers, Rakina Zata Amni and Vladimir Levin

Mason Freed added 1 comment

Patchset-level comments
File-level comment, Patchset 13 (Latest):
Mason Freed . resolved

+rakina for content/browser/*

(I would have tagged jonross, but he's ooo for some time.)

Open in Gerrit

Related details

Attention is currently required from:
  • Philip Rogers
  • Rakina Zata Amni
  • Vladimir Levin
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: Idee4df5333c7231bd651e7aba9c2499f50be53cb
Gerrit-Change-Number: 7948140
Gerrit-PatchSet: 13
Gerrit-Owner: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
Gerrit-CC: Daniel Cheng <dch...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Jun 2026 20:49:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Philip Rogers (Gerrit)

unread,
Jun 24, 2026, 8:10:51 PM (5 days ago) Jun 24
to Mason Freed, Rakina Zata Amni, Vladimir Levin, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
Attention needed from Mason Freed, Rakina Zata Amni and Vladimir Levin

Philip Rogers voted and added 1 comment

Votes added by Philip Rogers

Code-Review+1

1 comment

Patchset-level comments
Philip Rogers . resolved

LGTM

Open in Gerrit

Related details

Attention is currently required from:
  • Mason Freed
  • Rakina Zata Amni
  • Vladimir Levin
    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: Idee4df5333c7231bd651e7aba9c2499f50be53cb
      Gerrit-Change-Number: 7948140
      Gerrit-PatchSet: 13
      Gerrit-Owner: Mason Freed <mas...@chromium.org>
      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
      Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
      Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
      Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
      Gerrit-CC: Daniel Cheng <dch...@chromium.org>
      Gerrit-Attention: Mason Freed <mas...@chromium.org>
      Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
      Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
      Gerrit-Comment-Date: Thu, 25 Jun 2026 00:10:37 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Rakina Zata Amni (Gerrit)

      unread,
      Jun 25, 2026, 11:17:26 PM (4 days ago) Jun 25
      to Mason Freed, Philip Rogers, Vladimir Levin, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
      Attention needed from Mason Freed and Vladimir Levin

      Rakina Zata Amni added 1 comment

      File content/browser/renderer_host/unbounded_surface_window_aura.cc
      Line 317, Patchset 13 (Latest): parent_view_->GetWeakPtr(), this));
      Rakina Zata Amni . unresolved

      Eventhough the RWHVB owns `UnboundedSurfaceWindowAura`, it can already be destroyed by the sync deletion from `RequestUnboundedSurface` right? Then this is unsafe. Are there IDs that you can use that are not raw ptrs? You can use WeakPtrs I guess but differentiate the case where you pass nullptr from the start vs when the intended unbounded surface is already destroyed.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Mason Freed
      • Vladimir Levin
      Gerrit-Comment-Date: Fri, 26 Jun 2026 03:16:50 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Rakina Zata Amni (Gerrit)

      unread,
      Jun 25, 2026, 11:22:00 PM (4 days ago) Jun 25
      to Mason Freed, Philip Rogers, Vladimir Levin, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
      Attention needed from Mason Freed and Vladimir Levin

      Rakina Zata Amni voted and added 1 comment

      Votes added by Rakina Zata Amni

      Code-Review+1

      1 comment

      Patchset-level comments
      Rakina Zata Amni . resolved

      (pre-LGTM assuming the comment gets addressed)

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Mason Freed
      • Vladimir Levin
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: Idee4df5333c7231bd651e7aba9c2499f50be53cb
      Gerrit-Change-Number: 7948140
      Gerrit-PatchSet: 13
      Gerrit-Owner: Mason Freed <mas...@chromium.org>
      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
      Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
      Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
      Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
      Gerrit-CC: Daniel Cheng <dch...@chromium.org>
      Gerrit-Attention: Mason Freed <mas...@chromium.org>
      Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
      Gerrit-Comment-Date: Fri, 26 Jun 2026 03:21:27 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mason Freed (Gerrit)

      unread,
      Jun 26, 2026, 1:08:56 PM (3 days ago) Jun 26
      to Rakina Zata Amni, Philip Rogers, Vladimir Levin, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
      Attention needed from Philip Rogers, Rakina Zata Amni and Vladimir Levin

      Mason Freed voted and added 2 comments

      Votes added by Mason Freed

      Auto-Submit+1

      2 comments

      Patchset-level comments
      File-level comment, Patchset 14 (Latest):
      Mason Freed . resolved

      Done, but that change cleared your +1's unfortunately.

      File content/browser/renderer_host/unbounded_surface_window_aura.cc
      Line 317, Patchset 13: parent_view_->GetWeakPtr(), this));
      Rakina Zata Amni . resolved

      Eventhough the RWHVB owns `UnboundedSurfaceWindowAura`, it can already be destroyed by the sync deletion from `RequestUnboundedSurface` right? Then this is unsafe. Are there IDs that you can use that are not raw ptrs? You can use WeakPtrs I guess but differentiate the case where you pass nullptr from the start vs when the intended unbounded surface is already destroyed.

      Mason Freed

      Done - I switched to WeakPtr. For the one sync delete path, I now just pass the active window's weak pointer, and if it's nullptr, then we just clear the pointer.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Philip Rogers
      • Rakina Zata Amni
      • Vladimir Levin
      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: Idee4df5333c7231bd651e7aba9c2499f50be53cb
      Gerrit-Change-Number: 7948140
      Gerrit-PatchSet: 14
      Gerrit-Owner: Mason Freed <mas...@chromium.org>
      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
      Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
      Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
      Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
      Gerrit-CC: Daniel Cheng <dch...@chromium.org>
      Gerrit-Attention: Philip Rogers <p...@chromium.org>
      Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
      Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
      Gerrit-Comment-Date: Fri, 26 Jun 2026 17:08:42 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Rakina Zata Amni <rak...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mason Freed (Gerrit)

      unread,
      Jun 26, 2026, 1:10:57 PM (3 days ago) Jun 26
      to Zhe Su, Rakina Zata Amni, Philip Rogers, Vladimir Levin, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, shuche...@chromium.org, creis...@chromium.org, tranbaod...@chromium.org, keithle...@chromium.org, yhanad...@chromium.org, mac-r...@chromium.org, alexmo...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
      Attention needed from Philip Rogers, Rakina Zata Amni and Vladimir Levin

      Mason Freed voted Auto-Submit+0

      Auto-Submit+0
      Gerrit-CC: Zhe Su <su...@chromium.org>
      Gerrit-Attention: Philip Rogers <p...@chromium.org>
      Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
      Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
      Gerrit-Comment-Date: Fri, 26 Jun 2026 17:10:41 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mason Freed (Gerrit)

      unread,
      Jun 26, 2026, 1:11:57 PM (3 days ago) Jun 26
      to Zhe Su, Rakina Zata Amni, Philip Rogers, Vladimir Levin, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, shuche...@chromium.org, creis...@chromium.org, tranbaod...@chromium.org, keithle...@chromium.org, yhanad...@chromium.org, mac-r...@chromium.org, alexmo...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
      Attention needed from Philip Rogers, Rakina Zata Amni and Vladimir Levin

      Mason Freed added 3 comments

      Patchset-level comments
      Mason Freed . resolved

      vmpstr@ I'm going to ack these two comments. Still happy to do something about both of them, but I'd like to get this landed, so that'd be via a followup. Hopefully ok! Just let me know.

      File third_party/blink/renderer/core/dom/document.cc
      Line 8692, Patchset 9:bool Document::HasActiveUnboundedElements() const {
      Vladimir Levin . resolved

      It's a little weird to me that a document essentially says "yes" to having unbounded elements if some other document in the same local frame tree has an unbounded element.

      Can you remind me where this is actually used?

      Mason Freed

      Yeah, this is one area where a public API will need more thought, e.g. allowing sub-frames to have permission to do this. But currently unbounded elements are one-per-top-level-frame, and that's being more hard-coded with this patch.

      `HasActiveUnboundedElements` is used roughly one place right now, here:

      https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/layout_view.cc;l=181;drc=0a104dd9b84525a9fdb0423d168f1524e4c8b06d

      That needs to know "is there any unbounded window right now? If so, I need to look for hit test results outside clips".

      Mason Freed

      Acknowledged

      File third_party/blink/renderer/core/html/html_element.cc
      Line 1674, Patchset 9: if (widget) {
      Vladimir Levin . resolved

      I feel like you can just nest that in the if

      Mason Freed

      Before I just go do that, you mean like this?

      ```
      if (active && widget) {
      widget->IncrementActiveUnboundedElementCount();
      } else if (!active && widget) {
      widget->DecrementActiveUnboundedElementCount();
      }
      ```

      Because if so, I really prefer the existing thing...

      Mason Freed

      Acknowledged

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Philip Rogers
      • Rakina Zata Amni
      • Vladimir Levin
      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: Idee4df5333c7231bd651e7aba9c2499f50be53cb
        Gerrit-Change-Number: 7948140
        Gerrit-PatchSet: 14
        Gerrit-Owner: Mason Freed <mas...@chromium.org>
        Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
        Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
        Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
        Gerrit-CC: Daniel Cheng <dch...@chromium.org>
        Gerrit-CC: Zhe Su <su...@chromium.org>
        Gerrit-Attention: Philip Rogers <p...@chromium.org>
        Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
        Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Comment-Date: Fri, 26 Jun 2026 17:11:41 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Mason Freed <mas...@chromium.org>
        Comment-In-Reply-To: Vladimir Levin <vmp...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Rakina Zata Amni (Gerrit)

        unread,
        Jun 26, 2026, 1:36:30 PM (3 days ago) Jun 26
        to Mason Freed, Zhe Su, Philip Rogers, Vladimir Levin, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, shuche...@chromium.org, creis...@chromium.org, tranbaod...@chromium.org, keithle...@chromium.org, yhanad...@chromium.org, mac-r...@chromium.org, alexmo...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
        Attention needed from Mason Freed, Philip Rogers and Vladimir Levin

        Rakina Zata Amni voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Mason Freed
        • Philip Rogers
        • Vladimir Levin
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • 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: Idee4df5333c7231bd651e7aba9c2499f50be53cb
        Gerrit-Change-Number: 7948140
        Gerrit-PatchSet: 14
        Gerrit-Owner: Mason Freed <mas...@chromium.org>
        Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
        Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
        Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
        Gerrit-CC: Daniel Cheng <dch...@chromium.org>
        Gerrit-CC: Zhe Su <su...@chromium.org>
        Gerrit-Attention: Mason Freed <mas...@chromium.org>
        Gerrit-Attention: Philip Rogers <p...@chromium.org>
        Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
        Gerrit-Comment-Date: Fri, 26 Jun 2026 17:35:51 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Jun 26, 2026, 2:22:36 PM (3 days ago) Jun 26
        to Mason Freed, Rakina Zata Amni, Zhe Su, Philip Rogers, Vladimir Levin, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Daniel Cheng, shuche...@chromium.org, creis...@chromium.org, tranbaod...@chromium.org, keithle...@chromium.org, yhanad...@chromium.org, mac-r...@chromium.org, alexmo...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org

        Chromium LUCI CQ submitted the change

        Change information

        Commit message:
        Unbounded Element: Support unbounded element from iframes

        This patch enables the Unbounded Element API to work correctly when the
        unbounded element resides inside an iframe. Active unbounded element
        tracking is moved from Document (TopDocument) to WebFrameWidgetImpl,
        ensuring correct tracking across local subframes within a local root
        frame tree. Additionally, GetOrCreateUnboundedSurfaceState is updated
        to accept and use the subframe element's execution context instead of
        assuming the local root's, and binds Mojo pipes using the subframe's
        task runner.

        To correctly position the unbounded surface relative to the top-level
        viewport, unbounded element bounds are converted to viewport
        coordinates during showUnboundedElement() and PrePaintTreeWalk.
        Finally, to avoid losing the first submitted frame (which was causing
        the newly-added web_test to fail), a forced commit and redraw via
        SetNeedsCommitWithForcedRedraw is triggered when allocating a new
        surface or updating the local surface ID on the LayerTreeHost.

        This patch also adds code to ensure only one unbounded element can
        be shown from one top level window. If `showUnboundedElement()` is called while another one is already open, it will be closed first.
        Bug: 508672616
        Change-Id: Idee4df5333c7231bd651e7aba9c2499f50be53cb
        Fixed: 524030525
        Reviewed-by: Rakina Zata Amni <rak...@chromium.org>
        Commit-Queue: Mason Freed <mas...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#1653289}
        Files:
        • M content/browser/renderer_host/render_frame_host_impl.cc
        • M content/browser/renderer_host/render_widget_host_view_base.cc
        • M content/browser/renderer_host/render_widget_host_view_base.h
        • M content/browser/renderer_host/unbounded_element_browsertest.cc
        • M content/browser/renderer_host/unbounded_surface_window.h
        • M content/browser/renderer_host/unbounded_surface_window_aura.cc
        • M content/browser/renderer_host/unbounded_surface_window_aura.h
        • M content/browser/renderer_host/unbounded_surface_window_mac.h
        • M content/browser/renderer_host/unbounded_surface_window_mac.mm
        • M third_party/blink/renderer/core/dom/document.cc
        • M third_party/blink/renderer/core/dom/document.h
        • M third_party/blink/renderer/core/frame/web_frame_widget_impl.cc
        • M third_party/blink/renderer/core/frame/web_frame_widget_impl.h
        • M third_party/blink/renderer/core/html/html_element.cc
        • M third_party/blink/renderer/core/paint/pre_paint_tree_walk.cc
        • M third_party/blink/web_tests/TestExpectations
        • A third_party/blink/web_tests/wpt_internal/html/rendering/unbounded-element/iframe-appearance-ref.html
        • A third_party/blink/web_tests/wpt_internal/html/rendering/unbounded-element/iframe-appearance.html
        Change size: L
        Delta: 18 files changed, 262 insertions(+), 48 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Rakina Zata Amni
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Idee4df5333c7231bd651e7aba9c2499f50be53cb
        Gerrit-Change-Number: 7948140
        Gerrit-PatchSet: 15
        Gerrit-Owner: Mason Freed <mas...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
        Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
        Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages