ElementTiming: Proxy ImageElementTiming calls through PaintTimingDetector [chromium/src : main]

1 view
Skip to first unread message

Scott Haseley (Gerrit)

unread,
Jul 17, 2026, 9:18:47 PM (11 days ago) Jul 17
to Michal Mocny, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org, gavinp...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, zol...@webkit.org
Attention needed from Michal Mocny

Scott Haseley added 1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Scott Haseley . resolved

PTAL

Open in Gerrit

Related details

Attention is currently required from:
  • Michal Mocny
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: Ibe2b9ce6c7e01d82295d10c44e873c9861c736a2
Gerrit-Change-Number: 8121051
Gerrit-PatchSet: 4
Gerrit-Owner: Scott Haseley <shas...@chromium.org>
Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
Gerrit-Comment-Date: Sat, 18 Jul 2026 01:18:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Michal Mocny (Gerrit)

unread,
Jul 20, 2026, 12:15:05 PM (8 days ago) Jul 20
to Scott Haseley, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org, gavinp...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, zol...@webkit.org
Attention needed from Scott Haseley

Michal Mocny added 1 comment

Commit Message
Line 17, Patchset 4 (Latest): - NotifyBackgroundImageFinished was ElementTiming-only. This now flows
through PaintTimingDetector, and as a followup, I'll move the
background image load time tracking into ImagePaintTimingDetector.

- NotifyImageFinished (from LayoutImage) was ElementTiming-only.
This is now also routed through PaintTimingDetector. This will
lead to potentially more image load timestamps being recorded
(for pseudo elements), but that's fine since we'll also need to fix
that case for LCP and make the corresponding experimental flag work
for ElementTiming via ImagePaintTimingDetector.
Michal Mocny . unresolved

just checking-- this means that LCP will benefit from improvements that only ET had before?

I think is true for the second point here, but I think we have an alternative mechanism for the first?

Open in Gerrit

Related details

Attention is currently required from:
  • Scott Haseley
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: Ibe2b9ce6c7e01d82295d10c44e873c9861c736a2
    Gerrit-Change-Number: 8121051
    Gerrit-PatchSet: 4
    Gerrit-Owner: Scott Haseley <shas...@chromium.org>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-Attention: Scott Haseley <shas...@chromium.org>
    Gerrit-Comment-Date: Mon, 20 Jul 2026 16:14:55 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Scott Haseley (Gerrit)

    unread,
    Jul 20, 2026, 12:27:26 PM (8 days ago) Jul 20
    to Michal Mocny, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org, gavinp...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, zol...@webkit.org
    Attention needed from Michal Mocny

    Scott Haseley added 1 comment

    Commit Message
    Line 17, Patchset 4 (Latest): - NotifyBackgroundImageFinished was ElementTiming-only. This now flows
    through PaintTimingDetector, and as a followup, I'll move the
    background image load time tracking into ImagePaintTimingDetector.

    - NotifyImageFinished (from LayoutImage) was ElementTiming-only.
    This is now also routed through PaintTimingDetector. This will
    lead to potentially more image load timestamps being recorded
    (for pseudo elements), but that's fine since we'll also need to fix
    that case for LCP and make the corresponding experimental flag work
    for ElementTiming via ImagePaintTimingDetector.
    Michal Mocny . unresolved

    just checking-- this means that LCP will benefit from improvements that only ET had before?

    I think is true for the second point here, but I think we have an alternative mechanism for the first?

    Scott Haseley

    Jose added some ElementTiming-only handling for image `content:` pseudo elements, so there's an extra call for NotifyImageFinished for ET that doesn't exist for LCP. The main one [1] applies to both, but this new one [2] only applies to ET -- and only when there's no associated Node (pseudo elements). This was added in https://chromium-review.googlesource.com/c/chromium/src/+/6656960.

    We'll have to do more work to make this work for LCP and ICP, specifically change IPTD to not ignore LayoutObjects with a null Node and make the SoftNavigationPaintAttributionTracker aware of this. This change just makes it so the "loaded" timestamp gets recorded.

    [1]https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/layout_object.cc;l=4565-4567;drc=0ce06599d4f0c331bfc4018b20e0b196f375cdc2;bpv=1;bpt=1

    [2]https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/layout_image.cc;l=84-86;drc=0ce06599d4f0c331bfc4018b20e0b196f375cdc2;bpv=1;bpt=1

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michal Mocny
    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: Ibe2b9ce6c7e01d82295d10c44e873c9861c736a2
    Gerrit-Change-Number: 8121051
    Gerrit-PatchSet: 4
    Gerrit-Owner: Scott Haseley <shas...@chromium.org>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
    Gerrit-Comment-Date: Mon, 20 Jul 2026 16:27:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Michal Mocny <mmo...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michal Mocny (Gerrit)

    unread,
    Jul 21, 2026, 10:47:40 AM (7 days ago) Jul 21
    to Scott Haseley, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org, gavinp...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, zol...@webkit.org
    Attention needed from Scott Haseley

    Michal Mocny voted and added 6 comments

    Votes added by Michal Mocny

    Code-Review+1

    6 comments

    Patchset-level comments
    Michal Mocny . resolved

    Needs a rebase-- but this change is long overdue! Makes it much clearer what the diffs are, thanks!

    Added a few questions but they are not blocking.

    Commit Message
    Line 17, Patchset 4 (Latest): - NotifyBackgroundImageFinished was ElementTiming-only. This now flows
    through PaintTimingDetector, and as a followup, I'll move the
    background image load time tracking into ImagePaintTimingDetector.

    - NotifyImageFinished (from LayoutImage) was ElementTiming-only.
    This is now also routed through PaintTimingDetector. This will
    lead to potentially more image load timestamps being recorded
    (for pseudo elements), but that's fine since we'll also need to fix
    that case for LCP and make the corresponding experimental flag work
    for ElementTiming via ImagePaintTimingDetector.
    Michal Mocny . resolved

    just checking-- this means that LCP will benefit from improvements that only ET had before?

    I think is true for the second point here, but I think we have an alternative mechanism for the first?

    Scott Haseley

    Jose added some ElementTiming-only handling for image `content:` pseudo elements, so there's an extra call for NotifyImageFinished for ET that doesn't exist for LCP. The main one [1] applies to both, but this new one [2] only applies to ET -- and only when there's no associated Node (pseudo elements). This was added in https://chromium-review.googlesource.com/c/chromium/src/+/6656960.

    We'll have to do more work to make this work for LCP and ICP, specifically change IPTD to not ignore LayoutObjects with a null Node and make the SoftNavigationPaintAttributionTracker aware of this. This change just makes it so the "loaded" timestamp gets recorded.

    [1]https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/layout_object.cc;l=4565-4567;drc=0ce06599d4f0c331bfc4018b20e0b196f375cdc2;bpv=1;bpt=1

    [2]https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/layout_image.cc;l=84-86;drc=0ce06599d4f0c331bfc4018b20e0b196f375cdc2;bpv=1;bpt=1

    Michal Mocny

    Acknowledged

    File third_party/blink/renderer/core/paint/timing/image_element_timing.cc
    Line 116, Patchset 4 (Latest): // First video frame is not supported for Element Timing.
    Michal Mocny . unresolved

    Should we have an issue for this? AFAIK video is underspecified, but per spec the exact same records should be eligible for LCP and Element timing -- so this is not desired it is a historical oversight because of the fracturing of these apis?

    Line 123, Patchset 4 (Latest): if (!cached_image->IsLoaded()) {
    Michal Mocny . unresolved

    Should this be "sufficiently loaded", eventually?

    Again, this is the existing divergent behaviour between these but per spec the behaviour has to be the same, I think.

    Line 128, Patchset 4 (Latest): bool is_image_or_video_element = IsA<HTMLImageElement>(node) ||
    Michal Mocny . unresolved

    I'm confused by support for video here, when on line 115-119 we skip video frames?

    Poster images on video elements, I guess?

    Line 140, Patchset 4 (Latest): // added. See also https://crbug.com/1027948.
    Michal Mocny . resolved

    (musing)
    Do you think we are closer to being able to report an element timing entry, even if a late `elementtiming` attribute was added to an already loaded and painted element, now that we have this re-architecture?

    ---

    I figure that:

    • Paint Timing is moving toward measuring all contentful elements, always (changing recorded-set to a sufficiently-loaded-and-already-painted-set).
    • Paint Timing might be moving toward observing all size changes and all "contentfulness changes" directly (and updating caches).
    • For long-term memory, potentially we could replace "recorded-set" with a "recorded-map" to frame index/PaintTimingMixin.

    Even if we don't keep anything but recoded set, we could just report the Now() time after the attribute is added, as long as we know the content already loaded+rendered.

    (For things like `loadTime`, I think we already are considering removing this entirely...)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Scott Haseley
    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: Ibe2b9ce6c7e01d82295d10c44e873c9861c736a2
      Gerrit-Change-Number: 8121051
      Gerrit-PatchSet: 4
      Gerrit-Owner: Scott Haseley <shas...@chromium.org>
      Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
      Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-Attention: Scott Haseley <shas...@chromium.org>
      Gerrit-Comment-Date: Tue, 21 Jul 2026 14:47:33 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
      Comment-In-Reply-To: Michal Mocny <mmo...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Scott Haseley (Gerrit)

      unread,
      Jul 21, 2026, 5:22:12 PM (7 days ago) Jul 21
      to Michal Mocny, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org, gavinp...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, zol...@webkit.org
      Attention needed from Michal Mocny

      Scott Haseley added 4 comments

      File third_party/blink/renderer/core/paint/timing/image_element_timing.cc
      Line 116, Patchset 4: // First video frame is not supported for Element Timing.
      Michal Mocny . resolved

      Should we have an issue for this? AFAIK video is underspecified, but per spec the exact same records should be eligible for LCP and Element timing -- so this is not desired it is a historical oversight because of the fracturing of these apis?

      Scott Haseley

      Yeah good idea. Created a bug and added a TODO.

      Line 123, Patchset 4: if (!cached_image->IsLoaded()) {
      Michal Mocny . unresolved

      Should this be "sufficiently loaded", eventually?

      Again, this is the existing divergent behaviour between these but per spec the behaviour has to be the same, I think.

      Scott Haseley

      I was going to say yes, but `IsSufficientContentLoadedForPaint()` is actually just an alias for `IsLoaded()` 😞. Not sure if this was always the case or not. I think we mean two different things by "sufficiently loaded" and "fully loaded", but the code doesn't back it up. (Note that sufficiently loaded doesn't take into account first animated frame, that's different).

      ```
      bool ImageResourceContent::IsSufficientContentLoadedForPaint() const {
      return IsLoaded();
      }
      ```

      https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/loader/resource/image_resource_content.cc;l=677-679?q=ImageResourceContent::IsLoaded&ss=chromium%2Fchromium%2Fsrc

      Line 128, Patchset 4: bool is_image_or_video_element = IsA<HTMLImageElement>(node) ||
      Michal Mocny . unresolved

      I'm confused by support for video here, when on line 115-119 we skip video frames?

      Poster images on video elements, I guess?

      Scott Haseley

      Yeah poster images. Note that I added SVGImageElement here because the original code path wasn't used for SVGs.

      Michal Mocny . resolved

      (musing)
      Do you think we are closer to being able to report an element timing entry, even if a late `elementtiming` attribute was added to an already loaded and painted element, now that we have this re-architecture?

      ---

      I figure that:

      • Paint Timing is moving toward measuring all contentful elements, always (changing recorded-set to a sufficiently-loaded-and-already-painted-set).
      • Paint Timing might be moving toward observing all size changes and all "contentfulness changes" directly (and updating caches).
      • For long-term memory, potentially we could replace "recorded-set" with a "recorded-map" to frame index/PaintTimingMixin.

      Even if we don't keep anything but recoded set, we could just report the Now() time after the attribute is added, as long as we know the content already loaded+rendered.

      (For things like `loadTime`, I think we already are considering removing this entirely...)

      Scott Haseley

      I think we're moving closer to being able to experiment with that. I've been keeping that in mind w/ the refactoring. I think we'll have a better idea once the repaint work is done, but I think the pieces will all be in place then :).

      ---

      (For things like `loadTime`, I think we already are considering removing this entirely...)

      I'd still love to get rid of this...

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Michal Mocny
      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: Ibe2b9ce6c7e01d82295d10c44e873c9861c736a2
      Gerrit-Change-Number: 8121051
      Gerrit-PatchSet: 6
      Gerrit-Owner: Scott Haseley <shas...@chromium.org>
      Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
      Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
      Gerrit-Comment-Date: Tue, 21 Jul 2026 21:22:00 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Michal Mocny (Gerrit)

      unread,
      Jul 22, 2026, 7:07:17 AM (7 days ago) Jul 22
      to Scott Haseley, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org, gavinp...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, zol...@webkit.org
      Attention needed from Scott Haseley

      Michal Mocny voted and added 2 comments

      Votes added by Michal Mocny

      Code-Review+1

      2 comments

      File third_party/blink/renderer/core/paint/timing/image_element_timing.cc
      Line 123, Patchset 4: if (!cached_image->IsLoaded()) {
      Michal Mocny . resolved

      Should this be "sufficiently loaded", eventually?

      Again, this is the existing divergent behaviour between these but per spec the behaviour has to be the same, I think.

      Scott Haseley

      I was going to say yes, but `IsSufficientContentLoadedForPaint()` is actually just an alias for `IsLoaded()` 😞. Not sure if this was always the case or not. I think we mean two different things by "sufficiently loaded" and "fully loaded", but the code doesn't back it up. (Note that sufficiently loaded doesn't take into account first animated frame, that's different).

      ```
      bool ImageResourceContent::IsSufficientContentLoadedForPaint() const {
      return IsLoaded();
      }
      ```

      https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/loader/resource/image_resource_content.cc;l=677-679?q=ImageResourceContent::IsLoaded&ss=chromium%2Fchromium%2Fsrc

      Michal Mocny

      WTF. I was convinced we shipped this change for images years ago.

      I guess we could swap for `IsSufficientContentLoadedForPaint` for consistency then without changing anything :P but also could leave this as is and wait for "full" unification.

      Line 128, Patchset 4: bool is_image_or_video_element = IsA<HTMLImageElement>(node) ||
      Michal Mocny . resolved

      I'm confused by support for video here, when on line 115-119 we skip video frames?

      Poster images on video elements, I guess?

      Scott Haseley

      Yeah poster images. Note that I added SVGImageElement here because the original code path wasn't used for SVGs.

      Michal Mocny

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Scott Haseley
      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: Ibe2b9ce6c7e01d82295d10c44e873c9861c736a2
        Gerrit-Change-Number: 8121051
        Gerrit-PatchSet: 6
        Gerrit-Owner: Scott Haseley <shas...@chromium.org>
        Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
        Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-Attention: Scott Haseley <shas...@chromium.org>
        Gerrit-Comment-Date: Wed, 22 Jul 2026 11:07:02 +0000
        satisfied_requirement
        open
        diffy

        Scott Haseley (Gerrit)

        unread,
        Jul 22, 2026, 11:27:19 AM (6 days ago) Jul 22
        to Michal Mocny, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org, gavinp...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, zol...@webkit.org

        Scott Haseley voted and added 2 comments

        Votes added by Scott Haseley

        Commit-Queue+2

        2 comments

        Patchset-level comments
        File-level comment, Patchset 6 (Latest):
        Scott Haseley . resolved

        Thank you!

        File-level comment, Patchset 6 (Latest):
        Scott Haseley . resolved

        Thanks!

        Open in Gerrit

        Related details

        Attention set is empty
        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: Ibe2b9ce6c7e01d82295d10c44e873c9861c736a2
        Gerrit-Change-Number: 8121051
        Gerrit-PatchSet: 6
        Gerrit-Owner: Scott Haseley <shas...@chromium.org>
        Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
        Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-Comment-Date: Wed, 22 Jul 2026 15:27:04 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Jul 22, 2026, 11:31:03 AM (6 days ago) Jul 22
        to Scott Haseley, Michal Mocny, Menard, Alexis, chromium...@chromium.org, Nate Chapin, apavlo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, feature-me...@chromium.org, gavinp...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, zol...@webkit.org

        Chromium LUCI CQ submitted the change

        Change information

        Commit message:
        ElementTiming: Proxy ImageElementTiming calls through PaintTimingDetector

        This is a step towards using making ImageElementTiming a client of
        PaintTiming instead of having its own image tracking. This CL moves all
        the ImageElementTiming API calls to occur from within the corresponding
        PaintTimingDetector method. The differences were:

        - NotifyImagePainted for first video frame doesn't apply to element
        timing currently, so this is filtered out by the type of MediaTiming


        - NotifyBackgroundImageFinished was ElementTiming-only. This now flows
        through PaintTimingDetector, and as a followup, I'll move the
        background image load time tracking into ImagePaintTimingDetector.

        - NotifyImageFinished (from LayoutImage) was ElementTiming-only.
        This is now also routed through PaintTimingDetector. This will
        lead to potentially more image load timestamps being recorded
        (for pseudo elements), but that's fine since we'll also need to fix
        that case for LCP and make the corresponding experimental flag work
        for ElementTiming via ImagePaintTimingDetector.

         - There were several extra checks (e.g. IsLoaded(), feature flag,
        UseCounter) before NotifyImagePainted() was called, which are moved
        into ImageElementTiming, which is a better place for them anyway.
        Bug: 535432431
        Change-Id: Ibe2b9ce6c7e01d82295d10c44e873c9861c736a2
        Commit-Queue: Scott Haseley <shas...@chromium.org>
        Reviewed-by: Michal Mocny <mmo...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#1666325}
        Files:
        • M third_party/blink/renderer/core/css/css_image_value.cc
        • M third_party/blink/renderer/core/css/css_image_value.h
        • M third_party/blink/renderer/core/layout/layout_image.cc
        • M third_party/blink/renderer/core/layout/layout_object.cc
        • M third_party/blink/renderer/core/loader/resource/image_resource_content.h
        • M third_party/blink/renderer/core/loader/resource/video_timing.h
        • M third_party/blink/renderer/core/paint/box_painter_base.cc
        • M third_party/blink/renderer/core/paint/image_painter.cc
        • M third_party/blink/renderer/core/paint/svg_image_painter.cc
        • M third_party/blink/renderer/core/paint/timing/image_element_timing.cc
        • M third_party/blink/renderer/core/paint/timing/image_element_timing.h
        • M third_party/blink/renderer/core/paint/timing/paint_timing_detector.cc
        • M third_party/blink/renderer/core/paint/timing/paint_timing_detector.h
        • M third_party/blink/renderer/core/style/style_fetched_image.cc
        • M third_party/blink/renderer/core/style/style_fetched_image.h
        • M third_party/blink/renderer/platform/loader/fetch/media_timing.h
        Change size: M
        Delta: 16 files changed, 137 insertions(+), 97 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Michal Mocny
        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: Ibe2b9ce6c7e01d82295d10c44e873c9861c736a2
        Gerrit-Change-Number: 8121051
        Gerrit-PatchSet: 7
        Gerrit-Owner: Scott Haseley <shas...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
        Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages