summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/visibility/visibility-image-layers.html
blob: 79a896bc5b1ab6d2fbdf7fc91de39f063c865643 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>

<html>
<head>
  <style>
    .set {
      display: inline-block;
      border: 1px solid black;
    }
    .box {
      height: 100px;
      width: 100px;
    }
    
    .hidden {
      visibility: hidden;
    }
    
    .container {
      margin: 10px;
      padding: 20px;
    }
    .container.hidden {
      outline: 4px solid red;
    }
    
    .visible {
      visibility: visible;
    }
    .should-be-hidden {
      background-color: red !important;
    }
    .should-be-visible {
      background-color: green !important;
    }
    .composited {
      transform: translateZ(1px);
    }
    
    .visible-indicator {
      background-color: green;
    }

    .hidden-indicator {
      background-color: red;
    }
  </style>
  <script>
    if (window.testRunner)
      testRunner.dumpAsTextWithPixelResults();
  </script>
</head>
<body>
  <!-- Tests visibility with directly composited images. -->
  <!-- Left and right sides should look the same -->
  <div class="set">
    <div class="container"><img src="../resources/thiswayup.png" class="hidden box"></div>
    <div class="hidden container"><img src="../resources/thiswayup.png" class="box"></div>
    <div class="hidden container"><img src="../resources/thiswayup.png" class="visible box"></div>
  </div>

  <div class="set">
    <div class="composited container"><img src="../resources/thiswayup.png" class="hidden composited box"></div>
    <div class="composited hidden container"><img src="../resources/thiswayup.png" class="composited box"></div>
    <div class="composited hidden container"><img src="../resources/thiswayup.png" class="visible composited box"></div>
  </div>
</body>
</html>