summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/animations/inline-element-animation-end-hit-test.html
blob: 52465118b4f33566a90e23165f1efe95c29e1489 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<style>

body { margin: 0 }
.margin { margin: 100px }
.grow { animation: zoom .01s }
@keyframes zoom { 0% {transform: scale(0)} 100% {transform: scale(1)} }

#box {
  will-change: transform;
  display: inline-block;
  background: #9cd;
  width: 100px;
  height: 100px;
  opacity: 0.5;
}

</style>
<script src="../resources/js-test.js"></script>
<div class="margin">
  <span class="grow">
    <div id="box"></div>
  </span>
</div>
<p id="description"></p>
<div id="console"></div>
<script>

jsTestIsAsync = true;

description("Tests that when a LayoutObject loses its PaintLayer " +
    "due to completion of an animation of an inline statically positioned " +
    "element, we correctly update the locations of descendent layers.");

var box = document.querySelector("#box");
box.parentNode.addEventListener("animationend", function() {
  shouldBeTrue("document.elementFromPoint(150, 150) === box");
  finishJSTest();
});

</script>