Skip to content

Commit

Permalink
Bug 1738180 [wpt PR 31412] - Revert "Reland "[LCP] Add animated image…
Browse files Browse the repository at this point in the history
… support"", a=testonly

Automatic update from web-platform-tests
Revert "Reland "[LCP] Add animated image support""

This reverts commit 2ebdf0d26ea55271942e6b5ed585a08016a3e80b.

Reason for revert: Still appears to be causing flakiness on
PageLoadMetricsBrowserTestWithAnimatedLCPFlag.PageLCPNonAnimatedImage
Flakiness stopped while this was reverted and resumed when it relanded.
https://screenshot.googleplex.com/85Ucaejfj42M5ov.png
https://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=PageLoadMetricsBrowserTestWithAnimatedLCPFlag.PageLCPNonAnimatedImage&testType=browser_tests%20on%20Mac-11
https://ci.chromium.org/ui/p/chromium/builders/ci/mac11-arm64-rel-tests/1167/overview

Original change's description:
> Reland "[LCP] Add animated image support"
>
> This is a reland of b7d510c06e0436cfb4bd7260175cd460b949225c
>
> Original change's description:
> > [LCP] Add animated image support
> >
> > This CL adds support for better handling of animated images in LCP:
> > * A new attribute is exposing the first animated frame's paint time
> > (behind a flag).
> > * `startTime` is not changed.
> > * The PageLoadMetrics reported for LCP are set to that first frame paint
> > time for animated images (behind another flag).
> > * Entries are not emitted until the image is loaded.
> >
> > Relevant spec issue:
> > w3c/largest-contentful-paint#83
> >
> > Change-Id: I6bb01eacb4f200f9c032ffcfcd9a1a41126a7773
> > Bug: 1260953
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3226157
> > Commit-Queue: Yoav Weiss <[email protected]>
> > Reviewed-by: Nicolás Peña Moreno <[email protected]>
> > Cr-Commit-Position: refs/heads/main@{#935133}
>
> Bug: 1260953
> Change-Id: I5eaaf0cfd1daa7fb905e68aed4994cb931dc7750
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3247449
> Commit-Queue: Yoav Weiss <[email protected]>
> Reviewed-by: Nicolás Peña Moreno <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#935635}

Bug: 1260953
Change-Id: I07f60d8c423a3458cf7230843a8258682be134ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3249376
Commit-Queue: Glen Robertson <[email protected]>
Auto-Submit: Glen Robertson <[email protected]>
Owners-Override: Glen Robertson <[email protected]>
Reviewed-by: Alan Cutter <[email protected]>
Cr-Commit-Position: refs/heads/main@{#935767}

--

wpt-commits: 6f1e59b3d9649ea984b0e8ae6e27426d2811ae96
wpt-pr: 31412
  • Loading branch information
Glen Robertson authored and moz-wptsync-bot committed Oct 29, 2021
1 parent 35a58a3 commit 1a03d4e
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 204 deletions.
Binary file removed testing/web-platform/tests/images/anim-tao.png
Binary file not shown.
2 changes: 0 additions & 2 deletions testing/web-platform/tests/images/anim-tao.png.headers

This file was deleted.

Binary file removed testing/web-platform/tests/images/webp-animated.webp
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
const image_delay = 1000;
const delay_pipe_value = image_delay / 1000;

// Receives an image LargestContentfulPaint |entry| and checks |entry|'s attribute values.
// The |timeLowerBound| parameter is a lower bound on the loadTime value of the entry.
// The |options| parameter may contain some string values specifying the following:
Expand Down Expand Up @@ -36,33 +33,4 @@ function checkImage(entry, expectedUrl, expectedID, expectedSize, timeLowerBound
} else {
assert_equals(entry.size, expectedSize);
}
if (options.includes('animated')) {
assert_greater_than(entry.loadTime, entry.firstAnimatedFrameTime,
'firstAnimatedFrameTime should be smaller than loadTime');
assert_greater_than(entry.renderTime, entry.firstAnimatedFrameTime,
'firstAnimatedFrameTime should be smaller than renderTime');
assert_less_than(entry.firstAnimatedFrameTime, image_delay,
'firstAnimatedFrameTime should be smaller than the delay applied to the second frame');
assert_greater_than(entry.firstAnimatedFrameTime, 0,
'firstAnimatedFrameTime should be larger than 0');
}
if (options.includes('animated-zero')) {
assert_equals(entry.firstAnimatedFrameTime, 0, 'firstAnimatedFrameTime should be 0');
}
}

const load_and_observe = url => {
return new Promise(resolve => {
(new PerformanceObserver(entryList => {
for (let entry of entryList.getEntries()) {
if (entry.url == url) {
resolve(entryList.getEntries()[0]);
}
}
})).observe({type: 'largest-contentful-paint', buffered: true});
const img = new Image();
img.id = 'image_id';
img.src = url;
document.body.appendChild(img);
});
};

0 comments on commit 1a03d4e

Please sign in to comment.