summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/layer-creation/remove-clipping-layer-with-no-children.html
blob: efe4337345ac6d21e24bc10d9da8863a67a8d214 (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
42
43
44
45
46
47
<!DOCTYPE html>
<style>
#parent {
  overflow:hidden;
  width: 400px;
  height: 400px;
  background-color: pink;
  transform: translateZ(0)
}

#child {
  opacity: 0.9;
  width: 200px;
  height: 200px;
  background-color: salmon;
  transition: opacity 5ms;
}

.fade #child {
  visibility: hidden;
  opacity: 0.2;
}
</style>
<div id="parent">
    <div id="child"></div>
</div>
<pre></pre>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

requestAnimationFrame(function() {
  requestAnimationFrame(function() {
    document.getElementById('parent').classList.add('fade');
    document.getElementById('child').addEventListener('transitionend', function() {
      if (window.testRunner) {
        document.getElementsByTagName('pre')[0].textContent = window.internals.layerTreeAsText(document);
        setTimeout(function() {
          testRunner.notifyDone();
        });
      }
    });
  });
});
</script>