зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1439279 - Drop needless requestAnimationFrame that waits for applying new transition. r=birtles
getComputedStyle() ensures triggering new transitions, so we don't need to wait for a requestAnimationFrame callback. MozReview-Commit-ID: Bes1vQeHohI --HG-- extra : rebase_source : fdb8face312a471be5f93229a9fbbfd4fc59418f
This commit is contained in:
Родитель
e9cad65dd5
Коммит
b08072ea30
|
@ -33,8 +33,7 @@ window.addEventListener("load", () => {
|
|||
// CSS animation wins over transitions, so transition won't be visible during
|
||||
// the CSS animation.
|
||||
target.style.opacity = 0;
|
||||
requestAnimationFrame(() => {
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
});
|
||||
getComputedStyle(target).opacity;
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -33,8 +33,7 @@ window.addEventListener("load", () => {
|
|||
// CSS animation wins over transition, so transition won't be visible during
|
||||
// the CSS animation.
|
||||
target.style.transform = "translateX(100px)";
|
||||
requestAnimationFrame(() => {
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
});
|
||||
getComputedStyle(target).transform;
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -38,8 +38,7 @@ window.addEventListener("load", () => {
|
|||
// specified by the important rule, but we should create a stacking
|
||||
// context for it because there are animations.
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
});
|
||||
getComputedStyle(target).opacity;
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -35,8 +35,6 @@ window.addEventListener("load", () => {
|
|||
target.style.setProperty("opacity", "0", "important");
|
||||
getComputedStyle(target).opacity;
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
});
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -38,8 +38,7 @@ window.addEventListener("load", () => {
|
|||
// specified by the important rule, but we should create a stacking
|
||||
// context for it because there are animations.
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
});
|
||||
getComputedStyle(target).transform;
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -35,8 +35,6 @@ window.addEventListener("load", () => {
|
|||
target.style.setProperty("transform", "translateX(200px)", "important");
|
||||
getComputedStyle(target).transform;
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
});
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
});
|
||||
</script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче