forked from mirrors/gecko-dev
The animation in this reftests runs on the compositor. In the mean time, reftest harness waits for the state where there is no pending paint in the initial phase (STATE_WAITING_TO_FIRE_INVALIDATE_EVENT, i.e. before sending a MozReftestInvalidate event). So if the animation starts running on the compositor before a MozReftestInvalidate event is received, it means that the reftest harness has to wait for the 'no pending paint' state until the animation finishes because the reftest harness keeps flushing styles in the initial phase which means the animation causes a paint on every flush. To avoid above situation, we start the animation in question after we get a MozReftestInvalidate event. Differential Revision: https://phabricator.services.mozilla.com/D7681 --HG-- extra : moz-landing-system : lando
26 lines
998 B
HTML
26 lines
998 B
HTML
<!DOCTYPE html>
|
|
<html class="reftest-wait reftest-no-flush">
|
|
<title>Multiline inline animated opacity test</title>
|
|
<style>
|
|
@keyframes blink {
|
|
from { opacity: 0; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
p {
|
|
max-width: 15em;
|
|
}
|
|
</style>
|
|
<p>
|
|
<blink id="target">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</blink>
|
|
</p>
|
|
<script>
|
|
document.addEventListener('MozReftestInvalidate', () => {
|
|
target.style.animation = "blink 100s step-end reverse";
|
|
requestAnimationFrame(() => {
|
|
requestAnimationFrame(() => {
|
|
document.documentElement.classList.remove('reftest-wait');
|
|
});
|
|
});
|
|
}, false);
|
|
</script>
|