Paint timing: unify image generating-node resolution via LayoutObject [chromium/src : main]

0 views
Skip to first unread message

José Dapena Paz (Gerrit)

unread,
May 25, 2026, 1:30:10 PMMay 25
to chromium...@chromium.org, kinuko...@chromium.org, blink-rev...@chromium.org, jmedle...@chromium.org, speed-metrics...@chromium.org, core-timi...@chromium.org, blink-...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, zol...@webkit.org

José Dapena Paz has uploaded the change for review

Commit message

Paint timing: unify image generating-node resolution via LayoutObject

The background-image timing path in box_painter_base.cc and the soft
navigation tracker used paint_timing::ImageGeneratingNode(Node*), a
less exhaustive helper for finding the generating node.

LayoutObject::GeneratingNode() already implements a more complete
algorithm (walks anonymous parents and recursively unwinds nested
pseudos to UltimateOriginatingElement).

Move other users to use this complete implementation (passing the
LayoutObject when needed).
Change-Id: I5766f8ff14983fb8b379274846a558940512bcb1

Change diff


Change information

Files:
  • M third_party/blink/renderer/core/paint/box_fragment_painter.h
  • M third_party/blink/renderer/core/paint/box_model_object_painter.cc
  • M third_party/blink/renderer/core/paint/box_painter_base.cc
  • M third_party/blink/renderer/core/paint/box_painter_base.h
  • M third_party/blink/renderer/core/paint/timing/container_timing_paint_attribution_tracker.cc
  • M third_party/blink/renderer/core/paint/timing/container_timing_paint_attribution_tracker_test.cc
  • M third_party/blink/renderer/core/paint/timing/paint_timing_utils.h
  • M third_party/blink/renderer/core/timing/soft_navigation_paint_attribution_tracker.cc
Change size: M
Delta: 8 files changed, 51 insertions(+), 42 deletions(-)
Open in Gerrit

Related details

Attention set is empty
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: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I5766f8ff14983fb8b379274846a558940512bcb1
Gerrit-Change-Number: 7865297
Gerrit-PatchSet: 1
Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Scott Haseley (Gerrit)

unread,
Jul 22, 2026, 12:39:17 PM (10 days ago) Jul 22
to José Dapena Paz, Michal Mocny, Philip Rogers, Chromium LUCI CQ, chromium...@chromium.org, lighthouse-eng-extern...@google.com, blink-re...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, speed-metrics...@chromium.org, zol...@webkit.org
Attention needed from José Dapena Paz, Michal Mocny and Philip Rogers

Scott Haseley voted and added 2 comments

Votes added by Scott Haseley

Code-Review+1

2 comments

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

LGTM, thanks for consolidating.

File third_party/blink/renderer/core/paint/box_painter_base.cc
Line 970, Patchset 8 (Latest): layout_object ? layout_object->GeneratingNode() : nullptr;
Scott Haseley . unresolved

Can this really be null if we're painting it?

Open in Gerrit

Related details

Attention is currently required from:
  • José Dapena Paz
  • Michal Mocny
  • Philip Rogers
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: I5766f8ff14983fb8b379274846a558940512bcb1
Gerrit-Change-Number: 7865297
Gerrit-PatchSet: 8
Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-Attention: José Dapena Paz <jda...@igalia.com>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
Gerrit-Comment-Date: Wed, 22 Jul 2026 16:39:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

José Dapena Paz (Gerrit)

unread,
Jul 22, 2026, 4:31:06 PM (9 days ago) Jul 22
to Scott Haseley, Michal Mocny, Philip Rogers, Chromium LUCI CQ, chromium...@chromium.org, lighthouse-eng-extern...@google.com, blink-re...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, speed-metrics...@chromium.org, zol...@webkit.org
Attention needed from Michal Mocny, Philip Rogers and Scott Haseley

José Dapena Paz added 1 comment

File third_party/blink/renderer/core/paint/box_painter_base.cc
Line 970, Patchset 8 (Latest): layout_object ? layout_object->GeneratingNode() : nullptr;
Scott Haseley . unresolved

Can this really be null if we're painting it?

José Dapena Paz

Right, effectively non-null when painting, as layout_object will always have a value in the paths this is being called.

But I have doubts of what to do: if I remove the guard, then we assume LayoutObject is always non null. I could even change the type to be const LayoutObject& to enforce this expects a valid layout object.

But then other callers will need some check just to protect from the fact that a caller my assume layout_object_ is not null here. We could keep this as defensive code (and add a comment) or enforce this (and other callers) to use T&. But then we may need checks or similar guards somewhere else.

What would be the preferred way in Chromium for this?

I Kept it as pre-existing defensive code. And it actually still fires if the GeneratingNode() kill-switch is off, and the consumers want a non-null Node&. The layout_object ? ternary is redundant here though, can drop it.

Open in Gerrit

Related details

Attention is currently required from:
  • Michal Mocny
  • Philip Rogers
  • 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: I5766f8ff14983fb8b379274846a558940512bcb1
Gerrit-Change-Number: 7865297
Gerrit-PatchSet: 8
Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-Attention: Scott Haseley <shas...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
Gerrit-Comment-Date: Wed, 22 Jul 2026 20:30:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

José Dapena Paz (Gerrit)

unread,
Jul 22, 2026, 4:31:45 PM (9 days ago) Jul 22
to Scott Haseley, Michal Mocny, Philip Rogers, Chromium LUCI CQ, chromium...@chromium.org, lighthouse-eng-extern...@google.com, blink-re...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, speed-metrics...@chromium.org, zol...@webkit.org
Attention needed from Michal Mocny, Philip Rogers and Scott Haseley

José Dapena Paz added 1 comment

File third_party/blink/renderer/core/paint/box_painter_base.cc
Line 970, Patchset 8 (Latest): layout_object ? layout_object->GeneratingNode() : nullptr;
Scott Haseley . unresolved

Can this really be null if we're painting it?

José Dapena Paz

Right, effectively non-null when painting, as layout_object will always have a value in the paths this is being called.

But I have doubts of what to do: if I remove the guard, then we assume LayoutObject is always non null. I could even change the type to be const LayoutObject& to enforce this expects a valid layout object.

But then other callers will need some check just to protect from the fact that a caller my assume layout_object_ is not null here. We could keep this as defensive code (and add a comment) or enforce this (and other callers) to use T&. But then we may need checks or similar guards somewhere else.

What would be the preferred way in Chromium for this?

I Kept it as pre-existing defensive code. And it actually still fires if the GeneratingNode() kill-switch is off, and the consumers want a non-null Node&. The layout_object ? ternary is redundant here though, can drop it.

José Dapena Paz

The last comment paragraph is from a misunderstanding of the comment, youc an ignore it.

Gerrit-Comment-Date: Wed, 22 Jul 2026 20:31:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: José Dapena Paz <jda...@igalia.com>
Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Scott Haseley (Gerrit)

unread,
Jul 22, 2026, 4:45:16 PM (9 days ago) Jul 22
to José Dapena Paz, Michal Mocny, Philip Rogers, Chromium LUCI CQ, chromium...@chromium.org, lighthouse-eng-extern...@google.com, blink-re...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, speed-metrics...@chromium.org, zol...@webkit.org
Attention needed from José Dapena Paz, Michal Mocny and Philip Rogers

Scott Haseley added 1 comment

File third_party/blink/renderer/core/paint/box_painter_base.cc
Line 970, Patchset 8 (Latest): layout_object ? layout_object->GeneratingNode() : nullptr;
Scott Haseley . unresolved

Can this really be null if we're painting it?

José Dapena Paz

Right, effectively non-null when painting, as layout_object will always have a value in the paths this is being called.

But I have doubts of what to do: if I remove the guard, then we assume LayoutObject is always non null. I could even change the type to be const LayoutObject& to enforce this expects a valid layout object.

But then other callers will need some check just to protect from the fact that a caller my assume layout_object_ is not null here. We could keep this as defensive code (and add a comment) or enforce this (and other callers) to use T&. But then we may need checks or similar guards somewhere else.

What would be the preferred way in Chromium for this?

I Kept it as pre-existing defensive code. And it actually still fires if the GeneratingNode() kill-switch is off, and the consumers want a non-null Node&. The layout_object ? ternary is redundant here though, can drop it.

José Dapena Paz

The last comment paragraph is from a misunderstanding of the comment, youc an ignore it.

Scott Haseley

Typically I prefer a CHECK in these situations where it doesn't make sense for it to be null (for documentation, prevention of untested branches / unreachable branches, catch bugs, etc.).

@p...@chromium.org: this is in paint code, do you have a preference? I typically CHECK() layout objects during paint since it would be bad if we were painting null ones.

Open in Gerrit

Related details

Attention is currently required from:
  • José Dapena Paz
  • Michal Mocny
  • Philip Rogers
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: I5766f8ff14983fb8b379274846a558940512bcb1
Gerrit-Change-Number: 7865297
Gerrit-PatchSet: 8
Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-Attention: José Dapena Paz <jda...@igalia.com>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
Gerrit-Comment-Date: Wed, 22 Jul 2026 20:44:58 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Philip Rogers (Gerrit)

unread,
Jul 24, 2026, 6:07:34 PM (7 days ago) Jul 24
to José Dapena Paz, Scott Haseley, Michal Mocny, Chromium LUCI CQ, chromium...@chromium.org, lighthouse-eng-extern...@google.com, blink-re...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, speed-metrics...@chromium.org, zol...@webkit.org
Attention needed from José Dapena Paz and Michal Mocny

Philip Rogers added 1 comment

File third_party/blink/renderer/core/paint/box_painter_base.h
Line 42, Patchset 8 (Latest):// Base class for box painting. Has no dependencies on the layout tree and thus
Philip Rogers . unresolved

This comment describes why we don't want to add LayoutObject to this class. Basically, when there is fragmentation (e.g., multi-col), we don't want anyone to look up information (like bounds) from the layout object, which would be incorrect.

The BoxPainterBase::node_ can be null for anonymous boxes, such as the layout object created for LayoutTableSection which doesn't have a corresponding node, or for pseudo elements like the anonymous LayoutImage created from content: url('[img]'), or scrollbar parts, and maybe more.

I think we can probably just pass in the generating node instead of a node to BoxPainterBase, but that is a potentially large refactor with risks. Instead, what do you think about just adding Node* generating_node_ as a member of this class instead of a LayoutObject?

Open in Gerrit

Related details

Attention is currently required from:
  • José Dapena Paz
  • 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: I5766f8ff14983fb8b379274846a558940512bcb1
Gerrit-Change-Number: 7865297
Gerrit-PatchSet: 8
Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-Attention: José Dapena Paz <jda...@igalia.com>
Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
Gerrit-Comment-Date: Fri, 24 Jul 2026 22:07:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

José Dapena Paz (Gerrit)

unread,
Jul 31, 2026, 5:48:21 AM (21 hours ago) Jul 31
to Scott Haseley, Michal Mocny, Philip Rogers, Chromium LUCI CQ, chromium...@chromium.org, lighthouse-eng-extern...@google.com, blink-re...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, speed-metrics...@chromium.org, zol...@webkit.org
Attention needed from Michal Mocny and Philip Rogers

José Dapena Paz added 2 comments

File third_party/blink/renderer/core/paint/box_painter_base.h
Line 42, Patchset 8:// Base class for box painting. Has no dependencies on the layout tree and thus
Philip Rogers . unresolved

This comment describes why we don't want to add LayoutObject to this class. Basically, when there is fragmentation (e.g., multi-col), we don't want anyone to look up information (like bounds) from the layout object, which would be incorrect.

The BoxPainterBase::node_ can be null for anonymous boxes, such as the layout object created for LayoutTableSection which doesn't have a corresponding node, or for pseudo elements like the anonymous LayoutImage created from content: url('[img]'), or scrollbar parts, and maybe more.

I think we can probably just pass in the generating node instead of a node to BoxPainterBase, but that is a potentially large refactor with risks. Instead, what do you think about just adding Node* generating_node_ as a member of this class instead of a LayoutObject?

José Dapena Paz

Done: BoxPainterBase now holds `Node* generating_node_` instead of the
LayoutObject. Callers resolve it
via PhysicalBoxFragment::GeneratingNode() and box.GeneratingNode(); no behaviour
change.

It's now resolved at painter construction instead of on background image processing. Problem: instead of traversing only for background images, it does it always (but only on constructor). That may have a cost.

If we want to make that be fetched lazily, I guess we would need to go back to use layout object? Not sure if we have a way to know beforehand that we are going to use the image paths.

File third_party/blink/renderer/core/paint/box_painter_base.cc
Line 970, Patchset 8: layout_object ? layout_object->GeneratingNode() : nullptr;
Scott Haseley . resolved

Can this really be null if we're painting it?

José Dapena Paz

Right, effectively non-null when painting, as layout_object will always have a value in the paths this is being called.

But I have doubts of what to do: if I remove the guard, then we assume LayoutObject is always non null. I could even change the type to be const LayoutObject& to enforce this expects a valid layout object.

But then other callers will need some check just to protect from the fact that a caller my assume layout_object_ is not null here. We could keep this as defensive code (and add a comment) or enforce this (and other callers) to use T&. But then we may need checks or similar guards somewhere else.

What would be the preferred way in Chromium for this?

I Kept it as pre-existing defensive code. And it actually still fires if the GeneratingNode() kill-switch is off, and the consumers want a non-null Node&. The layout_object ? ternary is redundant here though, can drop it.

José Dapena Paz

The last comment paragraph is from a misunderstanding of the comment, youc an ignore it.

Scott Haseley

Typically I prefer a CHECK in these situations where it doesn't make sense for it to be null (for documentation, prevention of untested branches / unreachable branches, catch bugs, etc.).

@p...@chromium.org: this is in paint code, do you have a preference? I typically CHECK() layout objects during paint since it would be bad if we were painting null ones.

José Dapena Paz

This line is gone, as we pass directly the generating node. No need for the check here anymore.

Open in Gerrit

Related details

Attention is currently required from:
  • Michal Mocny
  • Philip Rogers
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: I5766f8ff14983fb8b379274846a558940512bcb1
Gerrit-Change-Number: 7865297
Gerrit-PatchSet: 9
Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
Gerrit-Comment-Date: Fri, 31 Jul 2026 09:47:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: José Dapena Paz <jda...@igalia.com>
Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
Comment-In-Reply-To: Philip Rogers <p...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Philip Rogers (Gerrit)

unread,
Jul 31, 2026, 9:51:10 AM (17 hours ago) Jul 31
to José Dapena Paz, Scott Haseley, Michal Mocny, Chromium LUCI CQ, chromium...@chromium.org, lighthouse-eng-extern...@google.com, blink-re...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, speed-metrics...@chromium.org, zol...@webkit.org
Attention needed from José Dapena Paz and Michal Mocny

Philip Rogers voted and added 2 comments

Votes added by Philip Rogers

Code-Review+1

2 comments

Patchset-level comments
File-level comment, Patchset 9 (Latest):
Philip Rogers . resolved

LGTM

File third_party/blink/renderer/core/paint/box_painter_base.h
Line 42, Patchset 8:// Base class for box painting. Has no dependencies on the layout tree and thus
Philip Rogers . resolved

This comment describes why we don't want to add LayoutObject to this class. Basically, when there is fragmentation (e.g., multi-col), we don't want anyone to look up information (like bounds) from the layout object, which would be incorrect.

The BoxPainterBase::node_ can be null for anonymous boxes, such as the layout object created for LayoutTableSection which doesn't have a corresponding node, or for pseudo elements like the anonymous LayoutImage created from content: url('[img]'), or scrollbar parts, and maybe more.

I think we can probably just pass in the generating node instead of a node to BoxPainterBase, but that is a potentially large refactor with risks. Instead, what do you think about just adding Node* generating_node_ as a member of this class instead of a LayoutObject?

José Dapena Paz

Done: BoxPainterBase now holds `Node* generating_node_` instead of the
LayoutObject. Callers resolve it
via PhysicalBoxFragment::GeneratingNode() and box.GeneratingNode(); no behaviour
change.

It's now resolved at painter construction instead of on background image processing. Problem: instead of traversing only for background images, it does it always (but only on constructor). That may have a cost.

If we want to make that be fetched lazily, I guess we would need to go back to use layout object? Not sure if we have a way to know beforehand that we are going to use the image paths.

Philip Rogers

Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • José Dapena Paz
  • Michal Mocny
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: I5766f8ff14983fb8b379274846a558940512bcb1
    Gerrit-Change-Number: 7865297
    Gerrit-PatchSet: 9
    Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
    Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-Attention: José Dapena Paz <jda...@igalia.com>
    Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
    Gerrit-Comment-Date: Fri, 31 Jul 2026 13:50:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: José Dapena Paz <jda...@igalia.com>
    Comment-In-Reply-To: Philip Rogers <p...@chromium.org>
    satisfied_requirement
    open
    diffy

    José Dapena Paz (Gerrit)

    unread,
    Jul 31, 2026, 1:08:23 PM (13 hours ago) Jul 31
    to Philip Rogers, Scott Haseley, Michal Mocny, Chromium LUCI CQ, chromium...@chromium.org, lighthouse-eng-extern...@google.com, blink-re...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, speed-metrics...@chromium.org, zol...@webkit.org
    Attention needed from Michal Mocny

    José Dapena Paz voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michal Mocny
    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: I5766f8ff14983fb8b379274846a558940512bcb1
    Gerrit-Change-Number: 7865297
    Gerrit-PatchSet: 9
    Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
    Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
    Gerrit-Comment-Date: Fri, 31 Jul 2026 17:08:01 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Jul 31, 2026, 1:53:08 PM (13 hours ago) Jul 31
    to José Dapena Paz, Philip Rogers, Scott Haseley, Michal Mocny, chromium...@chromium.org, lighthouse-eng-extern...@google.com, blink-re...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, speed-metrics...@chromium.org, zol...@webkit.org

    Chromium LUCI CQ submitted the change

    Change information

    Commit message:
    Paint timing: unify image generating-node resolution via LayoutObject

    The background-image timing path in box_painter_base.cc and the soft
    navigation tracker used paint_timing::ImageGeneratingNode(Node*), a
    less exhaustive helper for finding the generating node.

    LayoutObject::GeneratingNode() already implements a more complete
    algorithm (walks anonymous parents and recursively unwinds nested
    pseudos to UltimateOriginatingElement).

    Move both callers to that implementation and drop the helper.

    The soft navigation tracker already has the LayoutObject at hand. In the
    paint path the generating node is resolved by BoxPainterBase's callers and
    passed in as a Node*, so BoxPainterBase keeps having no dependency on the
    layout tree.
    Change-Id: I5766f8ff14983fb8b379274846a558940512bcb1
    Reviewed-by: Philip Rogers <p...@chromium.org>
    Reviewed-by: Scott Haseley <shas...@chromium.org>
    Commit-Queue: José Dapena Paz <jda...@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#1671963}
    Files:
      • M third_party/blink/renderer/core/paint/box_fragment_painter.h
      • M third_party/blink/renderer/core/paint/box_model_object_painter.cc
      • M third_party/blink/renderer/core/paint/box_painter_base.cc
      • M third_party/blink/renderer/core/paint/box_painter_base.h
      • M third_party/blink/renderer/core/paint/timing/paint_timing_utils.h
      • M third_party/blink/renderer/core/timing/soft_navigation_paint_attribution_tracker.cc
      Change size: M
      Delta: 6 files changed, 50 insertions(+), 40 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Scott Haseley, +1 by Philip Rogers
      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: I5766f8ff14983fb8b379274846a558940512bcb1
      Gerrit-Change-Number: 7865297
      Gerrit-PatchSet: 10
      Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: José Dapena Paz <jda...@igalia.com>
      Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
      Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
      Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages