Bug 1768455 [wpt PR 33993] - Revert "Avoid unnecessary calls to paint invalidation.", a=testonly

Automatic update from web-platform-tests
Revert "Avoid unnecessary calls to paint invalidation."

This reverts commit 8bee5e4363e8cb5981d5a2a24b9533f4851a6dc0.

Reason for revert:

crbug.com/1291090
crbug.com/1323173

Original change's description:
> Avoid unnecessary calls to paint invalidation.
>
> Previously, any background color change during style resolution
> triggered paint invalidation regardless of whether the change is
> triggered by a composited animation. We now check if the color change
> has a native paint worklet before deciding if paint invalidation should
> be performed. In the event of a main thread background-color animation,
> we prevent spinning needlessly on building a native worklet paint image
> by caching whether the animation can be composited.
>
> Bug: 1301961
>
> Change-Id: I02a9b33267592590321af6d6c0e4da7cfbee2cc9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3542797
> Reviewed-by: Robert Flack <flackr@chromium.org>
> Reviewed-by: Philip Rogers <pdr@chromium.org>
> Commit-Queue: Kevin Ellis <kevers@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1000090}

Bug: 1301961
Change-Id: Idc764b461410adc655e158af499130c195dd770f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3635297
Commit-Queue: Robert Flack <flackr@chromium.org>
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Robert Flack <flackr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1001026}

--

wpt-commits: 2bc981110402ce8c1e21b6a70d7fdb00518ee748
wpt-pr: 33993
This commit is contained in:
Kevin Ellis 2022-05-16 10:06:32 +00:00 коммит произвёл moz-wptsync-bot
Родитель b68621239e
Коммит be961ec97c
4 изменённых файлов: 0 добавлений и 149 удалений

Просмотреть файл

@ -1,11 +0,0 @@
<!DOCTYPE html>
<style>
.box {
width: 600px;
height: 600px;
background-color: rgba(0, 200, 0, 1);
}
</style>
<body>
<div class='box'></div>
</body>

Просмотреть файл

@ -1,45 +0,0 @@
<!DOCTYPE html>
<html class="reftest-wait">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#background-color">
<link rel="match" href="background-color-animation-will-change-contents-ref.html">
<style>
.container {
width: 600px;
height: 600px;
will-change: contents;
/* Start with a short delay and ensure that we pick up the color change when
the animation enters the active phase. */
animation: bgcolor 10s steps(1, jump-start) backwards 0.2s;
}
@keyframes bgcolor {
0% { background-color: rgba(200, 0, 0, 1); }
100% { background-color: rgba(0, 200, 0, 1); }
}
</style>
<script src="/common/reftest-wait.js"></script>
<body>
<div class="container"></div>
<script>
function waitForActiveAnimation() {
const anim = document.getAnimations()[0];
return new Promise(resolve => {
const tick = () => {
requestAnimationFrame(() => {
if (anim.currentTime > 200)
resolve();
else
tick();
});
};
tick();
});
}
window.onload = async () => {
await waitForActiveAnimation();
takeScreenshot();
};
</script>
</body>
</html>

Просмотреть файл

@ -1,43 +0,0 @@
<!DOCTYPE html>
<html class="reftest-wait">
<style>
.container {
width: 100vw;
height: 100vh;
overflow: hidden;
position: relative;
}
.spacer {
height: 1000vh;
}
#target {
width: 50vw;
height: 50vh;
background-color: rgb(100, 100, 0);
}
</style>
<script src="/common/reftest-wait.js"></script>
<body>
<div class="container">
<div class="spacer"></div>
<div id="target"></div>
</div>
</body>
<script>
async function raf() {
return new Promise((resolve) => {
requestAnimationFrame(() => {
resolve();
});
})
}
window.onload = async () => {
await raf();
await raf();
target.scrollIntoView();
takeScreenshot();
};
</script>
</html>

Просмотреть файл

@ -1,50 +0,0 @@
<!DOCTYPE html>
<html class="reftest-wait">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#background-color">
<link rel="match" href="background-color-scroll-into-viewport-ref.html">
<style>
.container {
width: 100vw;
height: 100vh;
overflow: hidden;
position: relative;
}
.spacer {
height: 1000vh;
}
#target {
width: 50vw;
height: 50vh;
background-color: green;
animation: bgcolor 1000000s cubic-bezier(0,1,1,0) -500000s;
}
@keyframes bgcolor {
0% { background-color: rgb(0, 200, 0); }
100% { background-color: rgb(200, 0, 0); }
}
</style>
<script src="/common/reftest-wait.js"></script>
<body>
<div class="container">
<div class="spacer"></div>
<div id="target"></div>
</div>
</body>
<script>
async function raf() {
return new Promise((resolve) => {
requestAnimationFrame(() => {
resolve();
});
})
}
document.getAnimations()[0].ready.then(async () => {
await raf();
await raf();
target.scrollIntoView();
takeScreenshot();
});
</script>
</html>