Bug 1561225 - Add a reftest a transform aniamtion which is runnin on the compositor on a path element. r=boris

This reftest is based on a reduced test case provided by thewingthing.

Differential Revision: https://phabricator.services.mozilla.com/D75258
This commit is contained in:
Hiroyuki Ikezoe 2020-05-14 20:54:31 +00:00
Родитель 819b856572
Коммит 95d1bdc7c7
3 изменённых файлов: 27 добавлений и 0 удалений

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

@ -600,3 +600,4 @@ fails-if(Android) != mask-resource.html about:blank # The image the test uses is
== 1570363-1.html 1570363-1-ref.html
fuzzy-if(webrender,0-1,0-92) fuzzy-if(!webrender,0-2,0-7882) == mask-opacity-invalidation-1.html mask-opacity-invalidation-1-ref.html # clip-path mask/opacity optimization
== transform-animation-on-path.html transform-animation-on-path-ref.html

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

@ -0,0 +1,6 @@
<!DOCTYPE html>
<html>
<svg width="500" height="500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2">
<path id="target" d="M .1 .1 H .9 V .9 H .10 L .10 .10"/>
</svg>
</html>

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

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html class="reftest-wait reftest-no-flush">
<style>
@keyframes anim {
from { transform: scale(1); }
to { transform: scale(0); }
}
</style>
<svg width="500" height="500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2">
<path id="target" d="M .1 .1 H .9 V .9 H .10 L .10 .10"/>
</svg>
<script>
document.addEventListener("MozReftestInvalidate", () => {
target.style.animation = "anim 100s step-end reverse";
target.addEventListener("animationstart", () => {
document.documentElement.classList.remove("reftest-wait");
});
});
</script>
</html>