Closed Bug 1988816 Opened 4 months ago Closed 4 months ago

[wpt-sync] Sync PR 54846 - [soft navs] Fix image pseudo element handling in pre-paint mode

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox145 fixed)

RESOLVED FIXED
145 Branch
Tracking Status
firefox145 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 54846 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/54846
Details from upstream follow.

Scott Haseley <shaseley@chromium.org> wrote:

[soft navs] Fix image pseudo element handling in pre-paint mode

NotifyBackgroundImagePaint() is called with the "generating node",
which for pseudo elements is the parent node, not the node itself, but
SoftNavigationPaintAttributionTracker was tracking the pseudo element,
which is node the image type layout object. This means unless the node
was directly added, we aren't tracking paints for it.

This CL fixes this by using the generating node during the pre-paint
walk. This also lifts the generating node function into a helper class
and uses that in both places. This also lifts the IsImageType() helper
into that utils class, resolving a TODO.

Note: node-with-image-pseudo-element-and-text.html fails with pre-paint
mode disabled because the current stable mode ignores repaints, and the
same node is considered painted for both the text and image.

Fixed: 444653105
Change-Id: Ic8d9927620b687fe57a396591bdebca27215ffdb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6944138
Reviewed-by: Jeremy Roman \<jbroman@chromium.org>
Commit-Queue: Scott Haseley \<shaseley@chromium.org>
Reviewed-by: Michal Mocny \<mmocny@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1515701}

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, and Chrome on GitHub CI

Total 6 tests

Status Summary

Firefox

OK : 2
FAIL: 2

Chrome

OK : 2
PASS: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5cc7d8538af5 https://hg.mozilla.org/integration/autoland/rev/8f9d8eb6b0af [wpt PR 54846] - [soft navs] Fix image pseudo element handling in pre-paint mode, a=testonly
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 145 Branch
You need to log in before you can comment on or make changes to this bug.