зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1392851 - A reftest to check that we don't share styles for elements that have animations which are about to be removed. r=birtles
This was a test case for bug 1379203 (Google Inbox issue), but to pass this test also needs the fix in this series to cancel animations when changing animation-name to 'none' in the specified CSS rule. Actually the fix in this series also fixes the Google Inbox issue so that this test can pass without the fix for the Google Inbox issue. But even so without the fix for bug 1379203, the style data for the first div element in this test is cached and the second div element uses the cached data. MozReview-Commit-ID: GfKSDfTZef4 --HG-- extra : rebase_source : caad72ed69e4ebeec8b8cad25949ea69e3bb652e
This commit is contained in:
Родитель
3fc40c42f2
Коммит
ffc4667148
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<style>
|
||||
div {
|
||||
background-color: green;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
<div></div>
|
||||
<div></div>
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<style>
|
||||
.animation {
|
||||
animation: anim 100s forwards;
|
||||
}
|
||||
@keyframes anim {
|
||||
0% { background-color: red; }
|
||||
100% { background-color: red; }
|
||||
}
|
||||
div {
|
||||
background-color: green;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
<div class="animation"></div>
|
||||
<div class="animation"></div>
|
||||
<script>
|
||||
document.addEventListener('MozReftestInvalidate', () => {
|
||||
requestAnimationFrame(() => {
|
||||
document.styleSheets[0].cssRules[0].style.animationName = 'none';
|
||||
document.documentElement.classList.remove('reftest-wait');
|
||||
});
|
||||
}, false);
|
||||
</script>
|
|
@ -60,3 +60,4 @@ fails == background-position-important.html background-position-ref.html # This
|
|||
== change-animation-name-to-none-in-rule.html change-animation-name-in-rule-ref.html
|
||||
== change-animation-name-to-other-in-rule.html change-animation-name-in-rule-ref.html
|
||||
== change-animation-name-to-non-existent-in-rule.html change-animation-name-in-rule-ref.html
|
||||
== no-style-sharing-with-animations.html no-style-sharing-with-animations-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче