OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <style> | 2 <style> |
3 | 3 |
4 body { margin: 0 } | 4 body { margin: 0 } |
5 .margin { margin: 100px } | 5 .margin { margin: 100px } |
6 .grow { animation: zoom .01s } | 6 .grow { animation: zoom .01s } |
7 @keyframes zoom { 0% {transform: scale(0)} 100% {transform: scale(1)} } | 7 @keyframes zoom { 0% {transform: scale(0)} 100% {transform: scale(1)} } |
8 | 8 |
9 #box { | 9 #box { |
10 will-change: transform; | 10 will-change: transform; |
11 display: inline-block; | 11 display: inline-block; |
12 background: #9cd; | 12 background: #9cd; |
13 width: 100px; | 13 width: 100px; |
14 height: 100px; | 14 height: 100px; |
15 opacity: 0.5; | 15 opacity: 0.5; |
16 } | 16 } |
17 | 17 |
18 </style> | 18 </style> |
19 <script src="../resources/js-test.js"></script> | 19 <script src="../../resources/js-test.js"></script> |
20 <div class="margin"> | 20 <div class="margin"> |
21 <span class="grow"> | 21 <span class="grow"> |
22 <div id="box"></div> | 22 <div id="box"></div> |
23 </span> | 23 </span> |
24 </div> | 24 </div> |
25 <p id="description"></p> | 25 <p id="description"></p> |
26 <div id="console"></div> | 26 <div id="console"></div> |
27 <script> | 27 <script> |
28 | 28 |
29 jsTestIsAsync = true; | 29 jsTestIsAsync = true; |
30 | 30 |
31 description("Tests that when a LayoutObject loses its PaintLayer " + | 31 description("Tests that when a LayoutObject loses its PaintLayer " + |
32 "due to completion of an animation of an inline statically positioned " + | 32 "due to completion of an animation of an inline statically positioned " + |
33 "element, we correctly update the locations of descendent layers."); | 33 "element, we correctly update the locations of descendent layers."); |
34 | 34 |
35 var box = document.querySelector("#box"); | 35 var box = document.querySelector("#box"); |
36 box.parentNode.addEventListener("animationend", function() { | 36 box.parentNode.addEventListener("animationend", function() { |
37 shouldBeTrue("document.elementFromPoint(150, 150) === box"); | 37 shouldBeTrue("document.elementFromPoint(150, 150) === box"); |
38 finishJSTest(); | 38 finishJSTest(); |
39 }); | 39 }); |
40 | 40 |
41 </script> | 41 </script> |
OLD | NEW |