[wpt-sync] Sync PR 62637 - ContainerTiming: report the largest element as lastPaintedElement
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox158 fixed)
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 62637 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/62637
Details from upstream follow.
Jose Dapena Paz <jdapena@igalia.com> wrote:
ContainerTiming: report the largest element as lastPaintedElement
lastPaintedElement named whichever element happened to be the last one
whose paint grew the container's painted area. That is an artifact of the
order paints are processed in, not a useful answer to what is driving
updates on a large container root.Report the largest element painted since the previous entry instead,
selected by its own clipped area, the way largest contentful paint selects
its candidates. Ties keep the earlier element, and the running maximum
resets on emission, so every entry reports the largest element painted
since the previous one.Selecting instead by the area each element newly contributed to the
container was the other option, and is deliberately not used: the overlap
between two elements would go to whichever happened to paint first, which
varies both within a frame and across loads of the same page. An element's
own area does not.Nomination happens before the region-containment check, so content painting
entirely inside the region painted so far can still be reported: it is a
contentful paint, it just grows nothing, so on its own it emits no entry.
Nothing re-nominates on a repaint, which is what makes that safe: each
element reaches container timing only once per content it paints, images
being deduplicated per (layout object, image resource) and text per
aggregating layout object.Discussed in https://github.com/WICG/container-timing/issues/53, which asks
for exactly this and additionally suggests restricting candidates to the
elements that do grow the painted region. That restriction is deliberately
not applied, so that a single rule - largest by its own area - covers both
this per-entry maximum and the container's lifetime maximum added in a
later commit. The lifetime largest is then the maximum of the per-entry
ones, which it would not be if the two used different candidate sets.Bug: 489959278
Change-Id: I4d0e707670b6cbdb56599b51ccee2bbf0412ce34Reviewed-on: https://chromium-review.googlesource.com/8274795
WPT-Export-Revision: dcf8fd43202a6f18535b3f9a507bf32ecce82c5c
| Assignee | ||
Comment 1•2 months ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=ff5ccf469d73c8bfddeab4278d7a642f6774bb97
| Assignee | ||
Comment 2•2 months ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 40 tests and 1 subtests
Status Summary
Firefox
OK : 3[GitHub] 40[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 42
FAIL: 1[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 3[GitHub]
Chrome
OK : 3
PASS: 1
FAIL: 2
Safari
OK : 3
FAIL: 3
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /container-timing/tentative/containertiming-largest-painted-element-own-area.html [wpt.fyi]
- lastPaintedElement is the element with the largest area of its own, not the largest newly painted area.:
FAIL(Chrome:FAIL, Safari:FAIL)
- lastPaintedElement is the element with the largest area of its own, not the largest newly painted area.:
- /container-timing/tentative/containertiming-largest-painted-element.html [wpt.fyi]
- lastPaintedElement reports the largest element painted.:
FAIL[GitHub],PASS[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] (Chrome:FAIL, Safari:FAIL)
- lastPaintedElement reports the largest element painted.:
- /container-timing/tentative/containertiming-two-overlapping-imgs.html [wpt.fyi]
- Overlapping images report to containertiming.:
FAIL[GitHub],PASS[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] (Chrome:PASS, Safari:FAIL)
- Overlapping images report to containertiming.:
Comment 4•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/e4285304aaf0
https://hg.mozilla.org/mozilla-central/rev/21ff3a1cd505
Description
•