Skip to content

Commit 6a78bd4

Browse files
jdapenachromium-wpt-export-bot
authored andcommitted
ContainerTiming: support PaintTimingMixin
Expose paintTime and presentationTime in the container timing entries. The implementation is easy as we were obtaining already accurate PaintTimingInfo (providing this information), so it was just setting the value on the entry creation. Explainer: https://github.com/bloomberg/container-timing/blob/main/README.md Chromestatus: https://chromestatus.com/feature/5110962817073152 I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/J-WxY0w7bNk/m/VkqnomK-CAAJ Ticket for supporting the mixin in the specification: bloomberg/container-timing#25 Bug: 378827535, 382422286 Change-Id: I98fd8b6821ddff2aeda03e81915a739a88b6d098 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7150902 Reviewed-by: Michal Mocny <[email protected]> Commit-Queue: José Dapena Paz <[email protected]> Cr-Commit-Position: refs/heads/main@{#1553483}
1 parent eaafc31 commit 6a78bd4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

container-timing/resources/container-timing-helpers.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ function checkContainerEntry(entry, identifier, last_element_id, beforeRender) {
1515
'startTime greater than beforeRender');
1616
assert_greater_than_equal(
1717
performance.now(), entry.startTime, 'startTime bound by now()')
18+
19+
// PaintTimingMixin
20+
if ("presentationTime" in entry && entry.presentationTime !== null) {
21+
assert_greater_than(entry.presentationTime, entry.paintTime);
22+
assert_equals(entry.presentationTime, entry.startTime);
23+
} else {
24+
assert_equals(entry.startTime, entry.paintTime);
25+
}
1826
}
1927

2028
function checkContainerSize(entry, size) {

0 commit comments

Comments
 (0)