animate-layer-scale-inherit-3.html 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!DOCTYPE HTML>
  2. <html class="reftest-wait">
  3. <title>Testcase, bug 1122526</title>
  4. <style>
  5. #outer, #inner {
  6. display: inline-block;
  7. background: white;
  8. color: black;
  9. }
  10. /*
  11. * We use step-end with reverse direction to paint the initial state
  12. * on the first frame, and step to the last state on the next frame.
  13. */
  14. #inner { animation: HoldTransform step-end 100s reverse }
  15. #inner {
  16. vertical-align: top;
  17. height: 100px;
  18. width: 100px;
  19. background: repeating-linear-gradient(to top left, yellow, blue 10px);
  20. }
  21. @keyframes HoldTransform {
  22. /* need to initially rasterize at non-identity transform to hit the
  23. * bug at all
  24. * NOTE: These keyframes will be used reverse direction.
  25. */
  26. 0% { transform: none }
  27. 100% { transform: scale(0.2) }
  28. }
  29. </style>
  30. <div id="outer">
  31. <div id="inner">
  32. </div>
  33. </div>
  34. <script>
  35. document.getElementById("inner").addEventListener("animationstart", StartListener, false);
  36. function StartListener(event) {
  37. // Animation should be zoomed to transform:none after the first frame.
  38. requestAnimationFrame(RemoveReftestWait);
  39. }
  40. function RemoveReftestWait() {
  41. document.documentElement.classList.remove("reftest-wait");
  42. }
  43. </script>