blob: 255762484536406eb176d981aa7bbce07d17f2e6 [file] [log] [blame]
simon.fraser@apple.com6042ef42018-07-20 23:33:39 +00001<!DOCTYPE html>
2<html>
3<head>
4<style>
5 @keyframes move {
6 from { transform: translate3d(0, 0, 0); }
7 to { transform: translate3d(100px, 0, 0); }
8 }
9
10 #box {
11 position: absolute;
12 top: 1000px;
13 width: 100px;
14 height: 100px;
15 background-color: silver;
16 margin: 10px;
17 }
18
19 #box.animating {
20 animation: move linear 0.1s forwards;
21 }
22
23</style>
24<script>
25if (window.testRunner) {
26 testRunner.dumpAsText();
27 testRunner.waitUntilDone();
28}
29
30function dumpLayerTree()
31{
32 if (!window.internals)
33 return;
34
35 var out = document.getElementById('out');
36 out.innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED);
37}
38
39function dumpLayersSoon()
40{
41 setTimeout(function() {
42 dumpLayerTree();
43 if (window.testRunner)
44 testRunner.notifyDone();
45 }, 0);
46}
47
48function runTest()
49{
50 let box = document.getElementById('box');
51 box.addEventListener('animationend', dumpLayersSoon, false);
52 box.classList.add('animating');
53}
54
55window.addEventListener('load', runTest, false);
56
57</script>
58</head>
59<body>
60<p>An element with a finished fill-forwards animation should not trigger backing store outside the viewport.</p>
61<pre id="out"></pre>
62<div id="box">
63 Some text here to force backing store.
64</div>
65
66</body>
67</html>