[AF] Add and implement GetIntersectionObserverInfo in AutofillAgent [chromium/src : main]

0 views
Skip to first unread message

Fernando Ramirez (Gerrit)

unread,
May 21, 2026, 8:06:08 PM (11 days ago) May 21
to Olivia Saul, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, browser-comp...@chromium.org
Attention needed from Olivia Saul

Fernando Ramirez added 1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Fernando Ramirez . resolved

Hi Olivia, PTAL. Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Olivia Saul
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: If057764b5492f1fcaaf5ca0e1eaf41c8b72de930
Gerrit-Change-Number: 7870348
Gerrit-PatchSet: 2
Gerrit-Owner: Fernando Ramirez <fe...@google.com>
Gerrit-Reviewer: Fernando Ramirez <fe...@google.com>
Gerrit-Reviewer: Olivia Saul <os...@google.com>
Gerrit-Attention: Olivia Saul <os...@google.com>
Gerrit-Comment-Date: Fri, 22 May 2026 00:05:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Olivia Saul (Gerrit)

unread,
May 22, 2026, 7:05:07 PM (10 days ago) May 22
to Fernando Ramirez, Olivia Saul, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, browser-comp...@chromium.org
Attention needed from Fernando Ramirez

Olivia Saul added 5 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Olivia Saul . resolved

(There's also a merge conflict apparently)

File components/autofill/content/renderer/autofill_agent.cc
Line 1678, Patchset 3 (Latest): std::move(callback).Run(false);
Olivia Saul . unresolved

It makes sense that we'd want to return `false` here, but it's more of a "something went wrong" rather than a "hey the thing is not visible", right? Should the param maybe be renamed to something more along those lines? Perhaps not `success`, but do you know what I mean?

File third_party/blink/renderer/core/exported/web_form_control_element_test.cc
Line 633, Patchset 3 (Latest): FastForwardBy(base::Milliseconds(800));
Olivia Saul . unresolved

Is it possible to change all these `800`s to use `kMinimumVisibleDuration`? Otherwise, if we change `kMinimumVisibleDuration` to 801, all these tests fail, and that's probably not intended.

File third_party/blink/renderer/core/html/forms/form_controller.h
Line 162, Patchset 3 (Latest): HeapTaskRunnerTimer<FormController> visibility_timer_;
Member<IntersectionObserver> observer_;
base::OnceCallback<void(bool)> visibility_callback_;
Olivia Saul . unresolved

Please add comment lines to describe what all three of these are. They're just vague enough to not imply they're for our specific use case.

File third_party/blink/renderer/core/html/forms/form_controller.cc
Line 480, Patchset 3 (Latest):}
Olivia Saul . unresolved

nit: These appear to be out of order with the .h file...but it looks like this was already a pre-existing problem? If so, I guess disregard...

Open in Gerrit

Related details

Attention is currently required from:
  • Fernando Ramirez
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: If057764b5492f1fcaaf5ca0e1eaf41c8b72de930
    Gerrit-Change-Number: 7870348
    Gerrit-PatchSet: 3
    Gerrit-Owner: Fernando Ramirez <fe...@google.com>
    Gerrit-Reviewer: Fernando Ramirez <fe...@google.com>
    Gerrit-Reviewer: Olivia Saul <os...@google.com>
    Gerrit-Attention: Fernando Ramirez <fe...@google.com>
    Gerrit-Comment-Date: Fri, 22 May 2026 23:04:54 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Fernando Ramirez (Gerrit)

    unread,
    May 23, 2026, 3:20:20 AM (10 days ago) May 23
    to Olivia Saul, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, browser-comp...@chromium.org
    Attention needed from Olivia Saul

    Fernando Ramirez added 4 comments

    File components/autofill/content/renderer/autofill_agent.cc
    Line 1678, Patchset 3: std::move(callback).Run(false);
    Olivia Saul . unresolved

    It makes sense that we'd want to return `false` here, but it's more of a "something went wrong" rather than a "hey the thing is not visible", right? Should the param maybe be renamed to something more along those lines? Perhaps not `success`, but do you know what I mean?

    Fernando Ramirez

    Running the callback with `false` here means the element wasn't found. Based on [Christoph's previous comment](https://chromium-review.git.corp.google.com/c/chromium/src/+/7814161/comment/8fdc41be_6100880f/), this can happen because the element is going to be passed from the browser, which is asynchronous. By the time `AutofillAgent::GetIntersectionObserverInfo()` is called, the element may be gone which technically means it's not visible, no?

    File third_party/blink/renderer/core/exported/web_form_control_element_test.cc
    Line 633, Patchset 3: FastForwardBy(base::Milliseconds(800));
    Olivia Saul . resolved

    Is it possible to change all these `800`s to use `kMinimumVisibleDuration`? Otherwise, if we change `kMinimumVisibleDuration` to 801, all these tests fail, and that's probably not intended.

    Fernando Ramirez

    Yup good idea, instead of hard coding these to `800` I'll use `kMinimumVisibleDuration`.

    File third_party/blink/renderer/core/html/forms/form_controller.h
    Line 162, Patchset 3: HeapTaskRunnerTimer<FormController> visibility_timer_;

    Member<IntersectionObserver> observer_;
    base::OnceCallback<void(bool)> visibility_callback_;
    Olivia Saul . resolved

    Please add comment lines to describe what all three of these are. They're just vague enough to not imply they're for our specific use case.

    Fernando Ramirez

    Done. Also added a comment above `MonitorVisibility`, `VisibilityTimerFired`, and the new static variable for `kMinimumVisibleDuration`.

    File third_party/blink/renderer/core/html/forms/form_controller.cc
    Line 480, Patchset 3:}
    Olivia Saul . resolved

    nit: These appear to be out of order with the .h file...but it looks like this was already a pre-existing problem? If so, I guess disregard...

    Fernando Ramirez

    `GetDeliveryBehavior`, `Deliver`, `GetExecutionContext`, and `MonitorVisibility` are in order. But yeah I did notice the rest were out of order so I just decided to try to group all these functions together.

    Also, I added comments for what parameters we're setting for the intersection observer.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Olivia Saul
    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: If057764b5492f1fcaaf5ca0e1eaf41c8b72de930
    Gerrit-Change-Number: 7870348
    Gerrit-PatchSet: 4
    Gerrit-Owner: Fernando Ramirez <fe...@google.com>
    Gerrit-Reviewer: Fernando Ramirez <fe...@google.com>
    Gerrit-Reviewer: Olivia Saul <os...@google.com>
    Gerrit-Attention: Olivia Saul <os...@google.com>
    Gerrit-Comment-Date: Sat, 23 May 2026 07:20:10 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Olivia Saul <os...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Olivia Saul (Gerrit)

    unread,
    May 26, 2026, 6:24:02 PM (6 days ago) May 26
    to Fernando Ramirez, Olivia Saul, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, browser-comp...@chromium.org
    Attention needed from Fernando Ramirez

    Olivia Saul added 5 comments

    File components/autofill/content/common/mojom/autofill_agent.mojom
    Line 135, Patchset 4 (Latest): // intersecting the viewport and is visible.
    Olivia Saul . unresolved

    Add extra text please:

    *`is_visible` will also return `false` if the field with ID `field_id` could not be found.*

    File components/autofill/content/renderer/autofill_agent.cc
    Line 1678, Patchset 3: std::move(callback).Run(false);
    Olivia Saul . resolved

    It makes sense that we'd want to return `false` here, but it's more of a "something went wrong" rather than a "hey the thing is not visible", right? Should the param maybe be renamed to something more along those lines? Perhaps not `success`, but do you know what I mean?

    Fernando Ramirez

    Running the callback with `false` here means the element wasn't found. Based on [Christoph's previous comment](https://chromium-review.git.corp.google.com/c/chromium/src/+/7814161/comment/8fdc41be_6100880f/), this can happen because the element is going to be passed from the browser, which is asynchronous. By the time `AutofillAgent::GetIntersectionObserverInfo()` is called, the element may be gone which technically means it's not visible, no?

    Olivia Saul

    Yeah, and that's all fine, I just found myself feeling that returning "no, not visible" implicitly meant "but I did find the field", which isn't true. The more I think about it, though, the more I *don't* want to name it something like `field_found_and_visible` instead of simply `is_visible`, so I added a request to clarify this in the function header comment instead. Thanks!

    File third_party/blink/renderer/core/html/forms/form_controller.h
    Line 175, Patchset 4 (Latest): // The IntersectionObserver used to monitor the visibility of the form
    // control.
    Olivia Saul . unresolved

    nit: `the form control` -> `a form control, if desired`

    Line 125, Patchset 4 (Latest): // at least `kMinimumVisibleDuration`.
    Olivia Saul . unresolved

    Please list what conditions it could return `false`.

    Line 113, Patchset 4 (Latest): FormController(Document& document);
    ~FormController() override;
    Olivia Saul . unresolved

    **Note:** I think the auto-attached fix is wrong...please be careful.

    ~ ~ ~

    Please fix this WARNING reported by ClangTidy: check: google-explicit-constructor

    single-argument constructors must be marked ...

    check: google-explicit-constructor

    single-argument constructors must be marked explicit to avoid unintentional implicit conversions (https://clang.llvm.org/extra/clang-tidy/checks/google/explicit-constructor.html)

    (Note: You can add `Skip-Clang-Tidy-Checks: google-explicit-constructor` footer to the CL description to skip the check)

    (Lint observed on `android-clang-tidy-rel`, but not on `linux-clang-tidy-rel`)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Fernando Ramirez
    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: If057764b5492f1fcaaf5ca0e1eaf41c8b72de930
    Gerrit-Change-Number: 7870348
    Gerrit-PatchSet: 4
    Gerrit-Owner: Fernando Ramirez <fe...@google.com>
    Gerrit-Reviewer: Fernando Ramirez <fe...@google.com>
    Gerrit-Reviewer: Olivia Saul <os...@google.com>
    Gerrit-Attention: Fernando Ramirez <fe...@google.com>
    Gerrit-Comment-Date: Tue, 26 May 2026 22:23:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Fernando Ramirez <fe...@google.com>
    Comment-In-Reply-To: Olivia Saul <os...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Fernando Ramirez (Gerrit)

    unread,
    May 26, 2026, 8:24:23 PM (6 days ago) May 26
    to Olivia Saul, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, browser-comp...@chromium.org
    Attention needed from Olivia Saul

    Fernando Ramirez added 4 comments

    File components/autofill/content/common/mojom/autofill_agent.mojom
    Line 135, Patchset 4: // intersecting the viewport and is visible.
    Olivia Saul . resolved

    Add extra text please:

    *`is_visible` will also return `false` if the field with ID `field_id` could not be found.*

    Fernando Ramirez

    Done

    File third_party/blink/renderer/core/html/forms/form_controller.h
    Line 175, Patchset 4: // The IntersectionObserver used to monitor the visibility of the form
    // control.
    Olivia Saul . resolved

    nit: `the form control` -> `a form control, if desired`

    Fernando Ramirez

    Done

    Line 125, Patchset 4: // at least `kMinimumVisibleDuration`.
    Olivia Saul . unresolved

    Please list what conditions it could return `false`.

    Fernando Ramirez

    Here we wouldn't ever call `false` which reminds me that you mentioned maybe we shouldn't use a boolean callback. Should we instead use a void callback?

    I've updated the comment for now.

    Line 113, Patchset 4: FormController(Document& document);
    ~FormController() override;
    Olivia Saul . resolved

    **Note:** I think the auto-attached fix is wrong...please be careful.

    ~ ~ ~

    Please fix this WARNING reported by ClangTidy: check: google-explicit-constructor

    single-argument constructors must be marked ...

    check: google-explicit-constructor

    single-argument constructors must be marked explicit to avoid unintentional implicit conversions (https://clang.llvm.org/extra/clang-tidy/checks/google/explicit-constructor.html)

    (Note: You can add `Skip-Clang-Tidy-Checks: google-explicit-constructor` footer to the CL description to skip the check)

    (Lint observed on `android-clang-tidy-rel`, but not on `linux-clang-tidy-rel`)

    Fernando Ramirez

    Yeahh I had just ignored that for now lol

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Olivia Saul
    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: If057764b5492f1fcaaf5ca0e1eaf41c8b72de930
    Gerrit-Change-Number: 7870348
    Gerrit-PatchSet: 5
    Gerrit-Owner: Fernando Ramirez <fe...@google.com>
    Gerrit-Reviewer: Fernando Ramirez <fe...@google.com>
    Gerrit-Reviewer: Olivia Saul <os...@google.com>
    Gerrit-Attention: Olivia Saul <os...@google.com>
    Gerrit-Comment-Date: Wed, 27 May 2026 00:24:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Olivia Saul <os...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Olivia Saul (Gerrit)

    unread,
    May 26, 2026, 9:32:41 PM (6 days ago) May 26
    to Fernando Ramirez, Olivia Saul, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, browser-comp...@chromium.org
    Attention needed from Fernando Ramirez

    Olivia Saul voted and added 3 comments

    Votes added by Olivia Saul

    Code-Review+1

    3 comments

    Patchset-level comments
    File-level comment, Patchset 5 (Latest):
    Olivia Saul . resolved

    LGTM provided the last two comments are addressed (`explicit` fix and ensuring a false callback is documented).

    File third_party/blink/renderer/core/html/forms/form_controller.h
    Line 125, Patchset 4: // at least `kMinimumVisibleDuration`.
    Olivia Saul . unresolved

    Please list what conditions it could return `false`.

    Fernando Ramirez

    Here we wouldn't ever call `false` which reminds me that you mentioned maybe we shouldn't use a boolean callback. Should we instead use a void callback?

    I've updated the comment for now.

    Olivia Saul

    I'm sorry, I think I'm getting my callbacks mixed up in my head. web_document.cc's `MonitorFormFieldVisibility(~)` contains `std::move(callback).Run(false);` on line 533. That's the one I meant to leave this comment about.

    Line 113, Patchset 4: FormController(Document& document);
    ~FormController() override;
    Olivia Saul . unresolved

    **Note:** I think the auto-attached fix is wrong...please be careful.

    ~ ~ ~

    Please fix this WARNING reported by ClangTidy: check: google-explicit-constructor

    single-argument constructors must be marked ...

    check: google-explicit-constructor

    single-argument constructors must be marked explicit to avoid unintentional implicit conversions (https://clang.llvm.org/extra/clang-tidy/checks/google/explicit-constructor.html)

    (Note: You can add `Skip-Clang-Tidy-Checks: google-explicit-constructor` footer to the CL description to skip the check)

    (Lint observed on `android-clang-tidy-rel`, but not on `linux-clang-tidy-rel`)

    Fernando Ramirez

    Yeahh I had just ignored that for now lol

    Olivia Saul

    Oh it still requires a fix -- constructors with a single argument have to have `explicit` in front of them [as a Google C++ standard](https://google.github.io/styleguide/cppguide.html#Implicit_Conversions). But the auto-generated fix seems to delete that constructor and tag the destructor with `explicit` which is not the right thing at all, lol.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Fernando Ramirez
    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: If057764b5492f1fcaaf5ca0e1eaf41c8b72de930
      Gerrit-Change-Number: 7870348
      Gerrit-PatchSet: 5
      Gerrit-Owner: Fernando Ramirez <fe...@google.com>
      Gerrit-Reviewer: Fernando Ramirez <fe...@google.com>
      Gerrit-Reviewer: Olivia Saul <os...@google.com>
      Gerrit-Attention: Fernando Ramirez <fe...@google.com>
      Gerrit-Comment-Date: Wed, 27 May 2026 01:32:30 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Fernando Ramirez (Gerrit)

      unread,
      May 27, 2026, 6:24:44 PM (5 days ago) May 27
      to Olivia Saul, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, browser-comp...@chromium.org

      Fernando Ramirez added 2 comments

      File third_party/blink/renderer/core/html/forms/form_controller.h
      Line 125, Patchset 4: // at least `kMinimumVisibleDuration`.
      Olivia Saul . resolved

      Please list what conditions it could return `false`.

      Fernando Ramirez

      Here we wouldn't ever call `false` which reminds me that you mentioned maybe we shouldn't use a boolean callback. Should we instead use a void callback?

      I've updated the comment for now.

      Olivia Saul

      I'm sorry, I think I'm getting my callbacks mixed up in my head. web_document.cc's `MonitorFormFieldVisibility(~)` contains `std::move(callback).Run(false);` on line 533. That's the one I meant to leave this comment about.

      Fernando Ramirez

      No worries, I also left a comment that we return `false` if the document is null (line 528).

      Line 113, Patchset 4: FormController(Document& document);
      ~FormController() override;
      Olivia Saul . resolved

      **Note:** I think the auto-attached fix is wrong...please be careful.

      ~ ~ ~

      Please fix this WARNING reported by ClangTidy: check: google-explicit-constructor

      single-argument constructors must be marked ...

      check: google-explicit-constructor

      single-argument constructors must be marked explicit to avoid unintentional implicit conversions (https://clang.llvm.org/extra/clang-tidy/checks/google/explicit-constructor.html)

      (Note: You can add `Skip-Clang-Tidy-Checks: google-explicit-constructor` footer to the CL description to skip the check)

      (Lint observed on `android-clang-tidy-rel`, but not on `linux-clang-tidy-rel`)

      Fernando Ramirez

      Yeahh I had just ignored that for now lol

      Olivia Saul

      Oh it still requires a fix -- constructors with a single argument have to have `explicit` in front of them [as a Google C++ standard](https://google.github.io/styleguide/cppguide.html#Implicit_Conversions). But the auto-generated fix seems to delete that constructor and tag the destructor with `explicit` which is not the right thing at all, lol.

      Fernando Ramirez

      Ohh sorry I misunderstood! I've added the `explicit` keyword to the constructor.

      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not 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: If057764b5492f1fcaaf5ca0e1eaf41c8b72de930
        Gerrit-Change-Number: 7870348
        Gerrit-PatchSet: 6
        Gerrit-Owner: Fernando Ramirez <fe...@google.com>
        Gerrit-Reviewer: Fernando Ramirez <fe...@google.com>
        Gerrit-Reviewer: Olivia Saul <os...@google.com>
        Gerrit-Comment-Date: Wed, 27 May 2026 22:24:32 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Fernando Ramirez (Gerrit)

        unread,
        May 27, 2026, 6:30:10 PM (5 days ago) May 27
        to Stefan Zager, Olivia Saul, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, browser-comp...@chromium.org
        Attention needed from Stefan Zager

        Fernando Ramirez added 1 comment

        Patchset-level comments
        File-level comment, Patchset 6 (Latest):
        Fernando Ramirez . resolved

        Hi Stefan, PTAL. This is the implementation we aligned on in go/autofill-omnibox-intersection-observer-visibility-tracking. A separate CL was created since significant changes were involved to the original CL.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Stefan Zager
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not 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: If057764b5492f1fcaaf5ca0e1eaf41c8b72de930
        Gerrit-Change-Number: 7870348
        Gerrit-PatchSet: 6
        Gerrit-Owner: Fernando Ramirez <fe...@google.com>
        Gerrit-Reviewer: Fernando Ramirez <fe...@google.com>
        Gerrit-Reviewer: Olivia Saul <os...@google.com>
        Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
        Gerrit-Attention: Stefan Zager <sza...@chromium.org>
        Gerrit-Comment-Date: Wed, 27 May 2026 22:29:54 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Stefan Zager (Gerrit)

        unread,
        May 28, 2026, 1:51:00 PM (4 days ago) May 28
        to Fernando Ramirez, Olivia Saul, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, browser-comp...@chromium.org
        Attention needed from Fernando Ramirez

        Stefan Zager added 1 comment

        File third_party/blink/renderer/core/html/forms/form_controller.cc
        Line 477, Patchset 6 (Latest): visibility_callback_ = std::move(callback);
        Stefan Zager . unresolved

        Should this be:

        ```
        if (visibility_callback_) {
        std::move(visibility_callback_).Run(false);
        }
        visibility_callback_ = std::move(callback);
        ```

        ?

        And maybe `visibility_timer_.Stop();` for good measure?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Fernando Ramirez
        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: If057764b5492f1fcaaf5ca0e1eaf41c8b72de930
          Gerrit-Change-Number: 7870348
          Gerrit-PatchSet: 6
          Gerrit-Owner: Fernando Ramirez <fe...@google.com>
          Gerrit-Reviewer: Fernando Ramirez <fe...@google.com>
          Gerrit-Reviewer: Olivia Saul <os...@google.com>
          Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
          Gerrit-Attention: Fernando Ramirez <fe...@google.com>
          Gerrit-Comment-Date: Thu, 28 May 2026 17:50:42 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Fernando Ramirez (Gerrit)

          unread,
          May 29, 2026, 3:44:24 AM (3 days ago) May 29
          to Stefan Zager, Olivia Saul, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, browser-comp...@chromium.org
          Attention needed from Stefan Zager

          Fernando Ramirez added 1 comment

          File third_party/blink/renderer/core/html/forms/form_controller.cc
          Line 477, Patchset 6: visibility_callback_ = std::move(callback);
          Stefan Zager . resolved

          Should this be:

          ```
          if (visibility_callback_) {
          std::move(visibility_callback_).Run(false);
          }
          visibility_callback_ = std::move(callback);
          ```

          ?

          And maybe `visibility_timer_.Stop();` for good measure?

          Fernando Ramirez

          Good catch, without this the first callback would never be run if we begin observing a new element (which shouldn't happen for our feature but it's good to generalize for future use cases). I also added a comment above to document this.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Stefan Zager
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not 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: If057764b5492f1fcaaf5ca0e1eaf41c8b72de930
            Gerrit-Change-Number: 7870348
            Gerrit-PatchSet: 7
            Gerrit-Owner: Fernando Ramirez <fe...@google.com>
            Gerrit-Reviewer: Fernando Ramirez <fe...@google.com>
            Gerrit-Reviewer: Olivia Saul <os...@google.com>
            Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
            Gerrit-Attention: Stefan Zager <sza...@chromium.org>
            Gerrit-Comment-Date: Fri, 29 May 2026 07:44:06 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Stefan Zager <sza...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Stefan Zager (Gerrit)

            unread,
            May 29, 2026, 12:03:30 PM (3 days ago) May 29
            to Fernando Ramirez, Olivia Saul, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, browser-comp...@chromium.org
            Attention needed from Fernando Ramirez

            Stefan Zager voted and added 1 comment

            Votes added by Stefan Zager

            Code-Review+1

            1 comment

            Patchset-level comments
            File-level comment, Patchset 7 (Latest):
            Stefan Zager . resolved

            lgtm

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Fernando Ramirez
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not 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: If057764b5492f1fcaaf5ca0e1eaf41c8b72de930
            Gerrit-Change-Number: 7870348
            Gerrit-PatchSet: 7
            Gerrit-Owner: Fernando Ramirez <fe...@google.com>
            Gerrit-Reviewer: Fernando Ramirez <fe...@google.com>
            Gerrit-Reviewer: Olivia Saul <os...@google.com>
            Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
            Gerrit-Attention: Fernando Ramirez <fe...@google.com>
            Gerrit-Comment-Date: Fri, 29 May 2026 16:03:04 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Fernando Ramirez (Gerrit)

            unread,
            May 29, 2026, 1:20:54 PM (3 days ago) May 29
            to Stefan Zager, Olivia Saul, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, browser-comp...@chromium.org
            Attention needed from Christoph Schwering

            Fernando Ramirez added 1 comment

            Patchset-level comments
            Fernando Ramirez . resolved

            Hi Christoph, PTAL. Thanks!

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Christoph Schwering
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not 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: If057764b5492f1fcaaf5ca0e1eaf41c8b72de930
            Gerrit-Change-Number: 7870348
            Gerrit-PatchSet: 7
            Gerrit-Owner: Fernando Ramirez <fe...@google.com>
            Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
            Gerrit-Reviewer: Fernando Ramirez <fe...@google.com>
            Gerrit-Reviewer: Olivia Saul <os...@google.com>
            Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
            Gerrit-Attention: Christoph Schwering <schw...@google.com>
            Gerrit-Comment-Date: Fri, 29 May 2026 17:20:40 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy
            Reply all
            Reply to author
            Forward
            0 new messages