Autofill event - web exposed parts [chromium/src : main]

0 views
Skip to first unread message

Yoav Weiss (@Shopify) (Gerrit)

unread,
Dec 16, 2025, 9:07:24 AM (3 days ago) Dec 16
to AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, android-web...@chromium.org, ashleynewson+w...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org
Attention needed from Christoph Schwering

Yoav Weiss (@Shopify) added 1 comment

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Yoav Weiss (@Shopify) . resolved

Hey Christoph!

Took a stab at the Blink side of things for the autofill event, and it seems like it's working! :) I'd appreciate your review on this, to make sure there's nothing I missed.

Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
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: Id58612487008e9e7b4db7bda27262305b8fb824d
Gerrit-Change-Number: 7260442
Gerrit-PatchSet: 5
Gerrit-Owner: Yoav Weiss (@Shopify) <yoav...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Tue, 16 Dec 2025 14:07:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Christoph Schwering (Gerrit)

unread,
Dec 16, 2025, 4:18:02 PM (3 days ago) Dec 16
to Yoav Weiss (@Shopify), AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, android-web...@chromium.org, ashleynewson+w...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org
Attention needed from Yoav Weiss (@Shopify)

Christoph Schwering added 9 comments

File components/autofill/content/renderer/autofill_agent.cc
Line 1085, Patchset 5 (Latest): form_util::DispatchAutofillEvent(document, fields, *fill_id,
supports_refill);
Christoph Schwering . unresolved

IIRC we don't want to fire the event for Undo Autofill. If so, this needs to be wrapped in `if (action_type == mojom::FormActionType::kFill)`.

Line 1989, Patchset 5 (Latest): if (auto* autofill_driver = unsafe_autofill_driver()) {
autofill_driver->RequestRefill(FillId(fill_id));
}
Christoph Schwering . unresolved

Should this call `AutofillAgent::RequestRefill(FillId(fill_id), some_callback)`? Don't we need the callback in JavaScript to implement `await e.refill()`?


Imagine JavaScript code like
```
document.addEventListener('autofill', function(e) {
e.refill().then(foo).reject(bar);
};
```
would need to translate to C++ code like
```
autofill_agent.TriggerReparse(
fill_id, base::BindOnce([](bool success) {
if (success) {
foo();
} else {
bar();
}
});
```
File components/autofill/content/renderer/form_autofill_util.h
Line 187, Patchset 5 (Latest): const base::UnguessableToken& fill_id,
Christoph Schwering . unresolved

nit: `FillId`?

File third_party/blink/renderer/core/exported/web_document.cc
Line 421, Patchset 5 (Latest):void WebDocument::TriggerAutofillEvent(
Christoph Schwering . unresolved

nit: `Dispatch`?

File third_party/blink/renderer/core/html/forms/autofill_event.cc
Line 44, Patchset 5 (Latest): for (auto& pair : field_data) {
AutofillFieldData* data = AutofillFieldData::Create();
data->setField(pair.first.Get());
data->setValue(std::move(pair.second));
field_data_.push_back(data);
}
Line 81, Patchset 5 (Latest): return nullptr;
Christoph Schwering . unresolved

For my own education: In JavaScript, that translate to `e.refill === null`, right?

Line 86, Patchset 5 (Latest): RefillFunction* function =
MakeGarbageCollected<RefillFunction>(const_cast<AutofillEvent*>(this));
v8::Local<v8::Function> v8_function = function->ToV8Function(script_state);
refill_function_ = V8VoidFunction::Create(v8_function);
Christoph Schwering . unresolved

Related to my other comment in `AutofillAgent::RequestRefill()`: Should `refill_function_` return a `Promise<void>`? (I don't know what that looks like in C++.)

File third_party/blink/renderer/core/html/forms/autofill_event.idl
Line 7, Patchset 5 (Latest): RuntimeEnabled=AutofillEvent
Christoph Schwering . unresolved

Doy ou have thoughts on whether we should also introduce a `base::Feature` for `AutofillEvent` in `runtime_enabled_features.json5`? Would the rollout work only by origin trial or also a Finch study?

I assume OT is the way to go but I don't have first-hand experience with OTs.

If we go with OT, I'm wondering if we need an additional `base::Feature` for extra safety?

Line 7, Patchset 5 (Latest): RuntimeEnabled=AutofillEvent
Christoph Schwering . unresolved

For my education: Is that a base::Feature that must be enabled for `AutofillEvent` to be exposed?

Open in Gerrit

Related details

Attention is currently required from:
  • Yoav Weiss (@Shopify)
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: Id58612487008e9e7b4db7bda27262305b8fb824d
    Gerrit-Change-Number: 7260442
    Gerrit-PatchSet: 5
    Gerrit-Owner: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
    Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-Comment-Date: Tue, 16 Dec 2025 21:17:39 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Yoav Weiss (@Shopify) (Gerrit)

    unread,
    Dec 17, 2025, 9:34:25 AM (2 days ago) Dec 17
    to AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, android-web...@chromium.org, ashleynewson+w...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org
    Attention needed from Christoph Schwering

    Yoav Weiss (@Shopify) added 8 comments

    File components/autofill/content/renderer/autofill_agent.cc
    Line 1085, Patchset 5: form_util::DispatchAutofillEvent(document, fields, *fill_id,
    supports_refill);
    Christoph Schwering . resolved

    IIRC we don't want to fire the event for Undo Autofill. If so, this needs to be wrapped in `if (action_type == mojom::FormActionType::kFill)`.

    Yoav Weiss (@Shopify)

    Done

    Line 1989, Patchset 5: if (auto* autofill_driver = unsafe_autofill_driver()) {
    autofill_driver->RequestRefill(FillId(fill_id));
    }
    Christoph Schwering . resolved

    Should this call `AutofillAgent::RequestRefill(FillId(fill_id), some_callback)`? Don't we need the callback in JavaScript to implement `await e.refill()`?


    Imagine JavaScript code like
    ```
    document.addEventListener('autofill', function(e) {
    e.refill().then(foo).reject(bar);
    };
    ```
    would need to translate to C++ code like
    ```
    autofill_agent.TriggerReparse(
    fill_id, base::BindOnce([](bool success) {
    if (success) {
    foo();
    } else {
    bar();
    }
    });
    ```
    Yoav Weiss (@Shopify)

    Done

    File components/autofill/content/renderer/form_autofill_util.h
    Line 187, Patchset 5: const base::UnguessableToken& fill_id,
    Christoph Schwering . resolved

    nit: `FillId`?

    Yoav Weiss (@Shopify)

    The style guide suggests it should be snake_case: https://google.github.io/styleguide/cppguide.html#Variable_Names

    File third_party/blink/renderer/core/exported/web_document.cc
    Line 421, Patchset 5:void WebDocument::TriggerAutofillEvent(
    Christoph Schwering . resolved

    nit: `Dispatch`?

    Yoav Weiss (@Shopify)

    Done

    File third_party/blink/renderer/core/html/forms/autofill_event.cc
    Line 81, Patchset 5: return nullptr;
    Christoph Schwering . resolved

    For my own education: In JavaScript, that translate to `e.refill === null`, right?

    Yoav Weiss (@Shopify)

    I believe so, yeah.

    Line 86, Patchset 5: RefillFunction* function =

    MakeGarbageCollected<RefillFunction>(const_cast<AutofillEvent*>(this));
    v8::Local<v8::Function> v8_function = function->ToV8Function(script_state);
    refill_function_ = V8VoidFunction::Create(v8_function);
    Christoph Schwering . resolved

    Related to my other comment in `AutofillAgent::RequestRefill()`: Should `refill_function_` return a `Promise<void>`? (I don't know what that looks like in C++.)

    Yoav Weiss (@Shopify)

    Revamped

    File third_party/blink/renderer/core/html/forms/autofill_event.idl
    Line 7, Patchset 5: RuntimeEnabled=AutofillEvent
    Christoph Schwering . resolved

    Doy ou have thoughts on whether we should also introduce a `base::Feature` for `AutofillEvent` in `runtime_enabled_features.json5`? Would the rollout work only by origin trial or also a Finch study?

    I assume OT is the way to go but I don't have first-hand experience with OTs.

    If we go with OT, I'm wondering if we need an additional `base::Feature` for extra safety?

    For my education: Is that a base::Feature that must be enabled for `AutofillEvent` to be exposed?

    Yoav Weiss (@Shopify)

    It's a runtimeEnabledFeature (that has a base::Feature equivalent) that must be enabled for AutofillEvent to be exposed.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Christoph Schwering
    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: Id58612487008e9e7b4db7bda27262305b8fb824d
    Gerrit-Change-Number: 7260442
    Gerrit-PatchSet: 6
    Gerrit-Owner: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
    Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: Christoph Schwering <schw...@google.com>
    Gerrit-Comment-Date: Wed, 17 Dec 2025 14:34:09 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Christoph Schwering <schw...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Christoph Schwering (Gerrit)

    unread,
    Dec 17, 2025, 9:39:02 AM (2 days ago) Dec 17
    to Yoav Weiss (@Shopify), AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, android-web...@chromium.org, ashleynewson+w...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org
    Attention needed from Christoph Schwering and Yoav Weiss (@Shopify)

    Christoph Schwering added 2 comments

    Patchset-level comments
    File-level comment, Patchset 6 (Latest):
    Christoph Schwering . resolved

    I'll take a proper look later (but there's a build error at the moment anyway).

    File components/autofill/content/renderer/form_autofill_util.h
    Line 187, Patchset 5: const base::UnguessableToken& fill_id,
    Christoph Schwering . unresolved

    nit: `FillId`?

    Yoav Weiss (@Shopify)

    The style guide suggests it should be snake_case: https://google.github.io/styleguide/cppguide.html#Variable_Names

    Christoph Schwering

    I meant the type :)
    I think within Autofill land where we have the strong alias, we should use `FillId` rather than `base::UnguessableToken`

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Christoph Schwering
    • Yoav Weiss (@Shopify)
    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: Id58612487008e9e7b4db7bda27262305b8fb824d
    Gerrit-Change-Number: 7260442
    Gerrit-PatchSet: 6
    Gerrit-Owner: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
    Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-Attention: Christoph Schwering <schw...@google.com>
    Gerrit-Comment-Date: Wed, 17 Dec 2025 14:38:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Comment-In-Reply-To: Christoph Schwering <schw...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Christoph Schwering (Gerrit)

    unread,
    Dec 17, 2025, 10:58:27 AM (2 days ago) Dec 17
    to Yoav Weiss (@Shopify), AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, vasilii+watchlis...@chromium.org, gcasto+w...@chromium.org, android-web...@chromium.org, ashleynewson+w...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org
    Attention needed from Yoav Weiss (@Shopify)

    Christoph Schwering added 3 comments

    File components/autofill/content/renderer/autofill_agent.cc
    Line 1053, Patchset 7: autofill_driver->RequestRefill(fill_id, std::move(callback));
    Christoph Schwering . unresolved
    Line 1072, Patchset 7 (Parent): if (action_type == mojom::FormActionType::kFill &&
    action_persistence == mojom::ActionPersistence::kFill) {
    pending_refills_.Fulfill(fill_id);
    }
    Christoph Schwering . unresolved

    Keep this?

    File third_party/blink/renderer/core/html/forms/autofill_event.idl
    Line 7, Patchset 5: RuntimeEnabled=AutofillEvent
    Christoph Schwering . unresolved

    Doy ou have thoughts on whether we should also introduce a `base::Feature` for `AutofillEvent` in `runtime_enabled_features.json5`? Would the rollout work only by origin trial or also a Finch study?

    I assume OT is the way to go but I don't have first-hand experience with OTs.

    If we go with OT, I'm wondering if we need an additional `base::Feature` for extra safety?

    Yoav Weiss (@Shopify)

    https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/runtime_enabled_features.json5;l=667?q=AutofillEvent%20-f:test%20-f:out&ss=chromium%2Fchromium%2Fsrc generates a base feature automatically.

    e.g. https://source.chromium.org/chromium/chromium/src/+/main:out/win-Debug/gen/third_party/blink/common/features_generated.cc;l=411?q=AutofillEvent%20-f:test%20f:out%20Feature&ss=chromium%2Fchromium%2Fsrc&start=21

    Christoph Schwering

    Thanks! What do you think about Finch vs OT?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Yoav Weiss (@Shopify)
    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: Id58612487008e9e7b4db7bda27262305b8fb824d
    Gerrit-Change-Number: 7260442
    Gerrit-PatchSet: 7
    Gerrit-Owner: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
    Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-Comment-Date: Wed, 17 Dec 2025 15:58:10 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Yoav Weiss (@Shopify) (Gerrit)

    unread,
    Dec 18, 2025, 3:56:53 AM (yesterday) Dec 18
    to AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, vasilii+watchlis...@chromium.org, gcasto+w...@chromium.org, android-web...@chromium.org, ashleynewson+w...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org
    Attention needed from Christoph Schwering

    Yoav Weiss (@Shopify) added 4 comments

    File components/autofill/content/renderer/autofill_agent.cc
    Line 1053, Patchset 7: autofill_driver->RequestRefill(fill_id, std::move(callback));
    Christoph Schwering . resolved
    Yoav Weiss (@Shopify)

    Removed the spurious bits. Apologies!

    Line 1072, Patchset 7 (Parent): if (action_type == mojom::FormActionType::kFill &&
    action_persistence == mojom::ActionPersistence::kFill) {
    pending_refills_.Fulfill(fill_id);
    }
    Christoph Schwering . resolved

    Keep this?

    Yoav Weiss (@Shopify)

    Done

    File components/autofill/content/renderer/form_autofill_util.h
    Line 187, Patchset 5: const base::UnguessableToken& fill_id,
    Christoph Schwering . resolved

    nit: `FillId`?

    Yoav Weiss (@Shopify)

    The style guide suggests it should be snake_case: https://google.github.io/styleguide/cppguide.html#Variable_Names

    Christoph Schwering

    I meant the type :)
    I think within Autofill land where we have the strong alias, we should use `FillId` rather than `base::UnguessableToken`

    Yoav Weiss (@Shopify)

    Got it!

    File third_party/blink/renderer/core/html/forms/autofill_event.idl
    Line 7, Patchset 5: RuntimeEnabled=AutofillEvent
    Christoph Schwering . unresolved

    Doy ou have thoughts on whether we should also introduce a `base::Feature` for `AutofillEvent` in `runtime_enabled_features.json5`? Would the rollout work only by origin trial or also a Finch study?

    I assume OT is the way to go but I don't have first-hand experience with OTs.

    If we go with OT, I'm wondering if we need an additional `base::Feature` for extra safety?

    Yoav Weiss (@Shopify)

    https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/runtime_enabled_features.json5;l=667?q=AutofillEvent%20-f:test%20-f:out&ss=chromium%2Fchromium%2Fsrc generates a base feature automatically.

    e.g. https://source.chromium.org/chromium/chromium/src/+/main:out/win-Debug/gen/third_party/blink/common/features_generated.cc;l=411?q=AutofillEvent%20-f:test%20f:out%20Feature&ss=chromium%2Fchromium%2Fsrc&start=21

    Christoph Schwering

    Thanks! What do you think about Finch vs OT?

    Yoav Weiss (@Shopify)

    I think an OT makes more sense, given that this is an API developers need to deliberately use.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Christoph Schwering
    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: Id58612487008e9e7b4db7bda27262305b8fb824d
    Gerrit-Change-Number: 7260442
    Gerrit-PatchSet: 13
    Gerrit-Owner: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
    Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: Christoph Schwering <schw...@google.com>
    Gerrit-Comment-Date: Thu, 18 Dec 2025 08:56:40 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Yoav Weiss (@Shopify) (Gerrit)

    unread,
    Dec 18, 2025, 3:57:09 AM (yesterday) Dec 18
    to AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, vasilii+watchlis...@chromium.org, gcasto+w...@chromium.org, android-web...@chromium.org, ashleynewson+w...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org
    Attention needed from Christoph Schwering

    Yoav Weiss (@Shopify) added 1 comment

    File third_party/blink/renderer/core/html/forms/autofill_event.cc
    Line 44, Patchset 5: for (auto& pair : field_data) {

    AutofillFieldData* data = AutofillFieldData::Create();
    data->setField(pair.first.Get());
    data->setValue(std::move(pair.second));
    field_data_.push_back(data);
    }
    Christoph Schwering . resolved
    Yoav Weiss (@Shopify)

    Done

    Gerrit-Comment-Date: Thu, 18 Dec 2025 08:56:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Christoph Schwering <schw...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Christoph Schwering (Gerrit)

    unread,
    Dec 18, 2025, 5:52:35 AM (yesterday) Dec 18
    to Yoav Weiss (@Shopify), AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, vasilii+watchlis...@chromium.org, gcasto+w...@chromium.org, android-web...@chromium.org, ashleynewson+w...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org
    Attention needed from Yoav Weiss (@Shopify)

    Christoph Schwering added 6 comments

    Patchset-level comments
    File-level comment, Patchset 15 (Latest):
    Christoph Schwering . resolved

    THanks! Just a couple of nits.

    File components/autofill/content/renderer/autofill_agent.cc
    Line 1048, Patchset 15 (Latest): autofill_driver->RequestRefill(FillId(fill_id));
    Christoph Schwering . unresolved

    nit: just `fill_id`

    Line 1086, Patchset 15 (Latest): if (action_type == mojom::FormActionType::kFill) {
    Christoph Schwering . unresolved

    Should we add `&& base::FeatureList::IsEnabled(blink::features::kAutofillEvent)`?

    File components/autofill/content/renderer/form_autofill_util.cc
    Line 2720, Patchset 15 (Latest): std::vector<std::pair<WebFormControlElement, WebString>> field_data;
    Christoph Schwering . unresolved

    nit: `field_data` sounds a lot like `FormFieldData`.

    Should we rename the `field_data` to `autofill_values` here and all the way to `AutofillEvent`?

    That'd match the name `AutofillEvent::autofillValues()`.

    Line 2721, Patchset 15 (Latest): for (const auto& field : fields) {
    Christoph Schwering . unresolved

    nit: `const FormFieldData::FillData`

    File third_party/blink/renderer/core/html/forms/autofill_event.idl
    Line 7, Patchset 5: RuntimeEnabled=AutofillEvent
    Christoph Schwering . resolved

    Doy ou have thoughts on whether we should also introduce a `base::Feature` for `AutofillEvent` in `runtime_enabled_features.json5`? Would the rollout work only by origin trial or also a Finch study?

    I assume OT is the way to go but I don't have first-hand experience with OTs.

    If we go with OT, I'm wondering if we need an additional `base::Feature` for extra safety?

    Yoav Weiss (@Shopify)

    https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/runtime_enabled_features.json5;l=667?q=AutofillEvent%20-f:test%20-f:out&ss=chromium%2Fchromium%2Fsrc generates a base feature automatically.

    e.g. https://source.chromium.org/chromium/chromium/src/+/main:out/win-Debug/gen/third_party/blink/common/features_generated.cc;l=411?q=AutofillEvent%20-f:test%20f:out%20Feature&ss=chromium%2Fchromium%2Fsrc&start=21

    Christoph Schwering

    Thanks! What do you think about Finch vs OT?

    Yoav Weiss (@Shopify)

    I think an OT makes more sense, given that this is an API developers need to deliberately use.

    Christoph Schwering

    Ack, sgtm

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Yoav Weiss (@Shopify)
    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: Id58612487008e9e7b4db7bda27262305b8fb824d
    Gerrit-Change-Number: 7260442
    Gerrit-PatchSet: 15
    Gerrit-Owner: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
    Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-Comment-Date: Thu, 18 Dec 2025 10:52:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Yoav Weiss (@Shopify) (Gerrit)

    unread,
    Dec 18, 2025, 7:28:20 AM (yesterday) Dec 18
    to AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, vasilii+watchlis...@chromium.org, gcasto+w...@chromium.org, android-web...@chromium.org, ashleynewson+w...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, jmedle...@chromium.org
    Attention needed from Christoph Schwering

    Yoav Weiss (@Shopify) added 4 comments

    File components/autofill/content/renderer/autofill_agent.cc
    Line 1048, Patchset 15: autofill_driver->RequestRefill(FillId(fill_id));
    Christoph Schwering . resolved

    nit: just `fill_id`

    Yoav Weiss (@Shopify)

    Done

    Line 1086, Patchset 15: if (action_type == mojom::FormActionType::kFill) {
    Christoph Schwering . resolved

    Should we add `&& base::FeatureList::IsEnabled(blink::features::kAutofillEvent)`?

    Yoav Weiss (@Shopify)

    There's already a flag check further down, but we can add one here as well.

    File components/autofill/content/renderer/form_autofill_util.cc
    Line 2720, Patchset 15: std::vector<std::pair<WebFormControlElement, WebString>> field_data;
    Christoph Schwering . resolved

    nit: `field_data` sounds a lot like `FormFieldData`.

    Should we rename the `field_data` to `autofill_values` here and all the way to `AutofillEvent`?

    That'd match the name `AutofillEvent::autofillValues()`.

    Yoav Weiss (@Shopify)

    Done

    Line 2721, Patchset 15: for (const auto& field : fields) {
    Christoph Schwering . resolved

    nit: `const FormFieldData::FillData`

    Yoav Weiss (@Shopify)

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Christoph Schwering
    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: Id58612487008e9e7b4db7bda27262305b8fb824d
      Gerrit-Change-Number: 7260442
      Gerrit-PatchSet: 17
      Gerrit-Owner: Yoav Weiss (@Shopify) <yoav...@chromium.org>
      Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
      Gerrit-Reviewer: Yoav Weiss (@Shopify) <yoav...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
      Gerrit-Attention: Christoph Schwering <schw...@google.com>
      Gerrit-Comment-Date: Thu, 18 Dec 2025 12:28:07 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Christoph Schwering <schw...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages