mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 90aab682c731f768872ca2b37f047752d5da2d8a
This commit is contained in:
parent
701b698999
commit
a71c7758db
139 changed files with 2383 additions and 998 deletions
|
@ -6,9 +6,6 @@
|
|||
.container {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
animation: expand 5s;
|
||||
/* TODO(crbug.com/987969): the will-change: transform should not be needed. */
|
||||
will-change: transform;
|
||||
}
|
||||
@keyframes expand {
|
||||
0% { --foo: 0; }
|
||||
|
@ -16,10 +13,13 @@
|
|||
99% { --foo: 50; }
|
||||
100% { --foo: 100; }
|
||||
}
|
||||
.animate {
|
||||
background-image: paint(geometry);
|
||||
animation: expand 5s;
|
||||
}
|
||||
|
||||
#canvas-geometry {
|
||||
background-color: blue;
|
||||
background-image: paint(geometry);
|
||||
}
|
||||
</style>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
|
@ -48,13 +48,14 @@ CSS.registerProperty({
|
|||
</script>
|
||||
|
||||
<script>
|
||||
// The test is designed to make sure that when the custom property animation is
|
||||
// running on the compositor thread, we are getting the right value.
|
||||
// The "importWorkletAndTerminateTestAfterAsyncPaint" has the logic to rAF
|
||||
// two frames before taking a screenshot. So the animation is designed to
|
||||
// be stable after two frames. That is, the 0.01% of 5s is much less than
|
||||
// two frames, and thus after two frames, the value of --foo should be stable.
|
||||
importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
|
||||
var blob = new Blob([document.getElementById('code').textContent],
|
||||
{type: 'text/javascript'});
|
||||
CSS.paintWorklet.addModule(URL.createObjectURL(blob)).then(function() {
|
||||
document.getElementById('canvas-geometry').classList.add('animate');
|
||||
requestAnimationFrame(function() {
|
||||
takeScreenshot();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue