[fedcm] Extend the LocalFrame to query/notify <login>s elements [chromium/src : main]

0 views
Skip to first unread message

Sam Goto (Gerrit)

unread,
Feb 9, 2026, 8:15:31 PM (2 days ago) Feb 9
to Dominic Farolino, Chromium IPC Reviews, Christian Biesinger, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-re...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org
Attention needed from Christian Biesinger, Dominic Farolino and Nasko Oskov

Sam Goto added 8 comments

Commit Message
Line 10, Patchset 19:methods to the LocalFrame renderer mojom service, so that the browser
Dominic Farolino . resolved

```suggestion
methods to the LocalFrame renderer mojom interface, so that the browser
```

Sam Goto

Done

File third_party/blink/public/mojom/frame/frame.mojom
Line 1290, Patchset 19: GetFederations() => (array<Federation> federations);
Dominic Farolino . unresolved

Technically per https://docs.google.com/document/d/1Kw4aTuISF7csHnjOpDJGc7JYIjlvOAKRprCTBVWw_E4/edit?tab=t.0#heading=h.jv90dicow9kc, these new methods need to have at least one non-test usage, but they're only really exercised in browser tests and no production path.

https://chromium-review.googlesource.com/c/chromium/src/+/7539587 probably has some "production"-paths. Would it be possible to chain the next CL on top of this one that shows how these are really going to be used? (or point out which parts of that aforementioned CL I should look at to get a feel for how these mojo methods would be used outside of tests)?

Sam Goto

I'm working on a CL that branches of this one that can give a concrete sense of how this CL is intended to be used.

I'll report back momentarily when I set that up.

File third_party/blink/renderer/core/html/html_federation_element.h
Line 37, Patchset 19: const base::UnguessableToken id_;
File third_party/blink/renderer/core/html/html_federation_element.cc
Line 38, Patchset 19: options->config->client_id = "";
Dominic Farolino . resolved
```suggestion
options->config->client_id = g_empty_atom;
```

Maybe?

Sam Goto

Done

Line 42, Patchset 19: options->nonce = "";
Dominic Farolino . resolved

Maybe same for now.

Sam Goto

Done

Line 62, Patchset 19: options->params_json = params_attr;
Dominic Farolino . resolved

Maybe some error handling like https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/html_iframe_element.cc;l=564-576;drc=976a71ef2a509d4391d814b52b9f4700fdf35789?

Sam Goto

Ah, yes, good point, done [1].

[1] Per your guidance, I broke this CL into two and moved the dispatching here: https://chromium-review.googlesource.com/c/chromium/src/+/7552493

Line 70, Patchset 19: token_ = token;
Dominic Farolino . resolved

Can you `DCHECK(isConnected());` first?

Christian Biesinger

just curious -- what's wrong with dispatching an event on a disconnected element? (I know this can't actually happen here, because of how we find the element)

Dominic Farolino

Nothing, it's just that this event is not intended to ever be dispatched on a disconnected federation element (at least through this path), so I figured we'd "enforce" that here.

Sam Goto

SGTM. Done.

File third_party/blink/renderer/core/html/html_federation_element.idl
Line 17, Patchset 19: attribute EventHandler ontoken;
Dominic Farolino . unresolved

Per https://github.com/w3ctag/design-principles/pull/612, I think you'll want to add this to global_event_handlers.idl. I'd go with that approach in the meantime, and revert back to this one if my PR turns out to be in the wrong direction.

Sam Goto

In the process of generalizing <login> to be able to handle other <credential> types I had to use a more generic event rather than "token" (which is more federation specific) and ended up reusing "onselect" which I think is already in the global event handlers. We can choose a different event type in the future, but for now, I think this works. WDYT?

Also, addressed in this CL: https://chromium-review.googlesource.com/c/chromium/src/+/7552493

Open in Gerrit

Related details

Attention is currently required from:
  • Christian Biesinger
  • Dominic Farolino
  • Nasko Oskov
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: Ib5b22d29080de727e922392622c3b4e2a8684aae
Gerrit-Change-Number: 7543033
Gerrit-PatchSet: 22
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christian Biesinger <cbies...@chromium.org>
Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-CC: gwsq
Gerrit-Attention: Nasko Oskov <na...@chromium.org>
Gerrit-Attention: Dominic Farolino <d...@chromium.org>
Gerrit-Attention: Christian Biesinger <cbies...@chromium.org>
Gerrit-Comment-Date: Tue, 10 Feb 2026 01:15:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Dominic Farolino <d...@chromium.org>
Comment-In-Reply-To: Christian Biesinger <cbies...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages