mirror of
https://github.com/servo/servo.git
synced 2025-09-30 16:49:16 +01:00
Avoid infinitely looping CSS transitions.
This commit is contained in:
parent
236762880c
commit
2bb6ab4567
6 changed files with 61 additions and 20 deletions
|
@ -0,0 +1,4 @@
|
|||
[transitionend_event.html]
|
||||
expected: TIMEOUT
|
||||
[transitionend_event]
|
||||
expected: TIMEOUT
|
|
@ -13031,6 +13031,13 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"transitionend_event.html": [
|
||||
"71b88117a0280fbffcf3ab77105c0460317c66c8",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"white-space-pre-line-long-line.html": [
|
||||
"bf0d0085fef0f1639637b2e652a7fb857cd51bf6",
|
||||
[
|
||||
|
|
27
tests/wpt/mozilla/tests/css/transitionend_event.html
Normal file
27
tests/wpt/mozilla/tests/css/transitionend_event.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
<html>
|
||||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
#test {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background: black;
|
||||
transition: 1ms linear transform;
|
||||
}
|
||||
.transform {
|
||||
transform:scale(1.2);
|
||||
}
|
||||
</style>
|
||||
<div id="test" class="transform"></div>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
let d = document.querySelector('div');
|
||||
// Verify that we only receive a single transitionend event once the transition is complete.
|
||||
d.ontransitionend = t.step_func(() => {
|
||||
d.ontransitionend = t.unreached_func();
|
||||
t.step_timeout(() => t.done(), 100);
|
||||
});
|
||||
t.step_timeout(() => d.className = "", 10);
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue