summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/visibility/visibility-composited-transforms.html
blob: 48868af7726a95e57fb872b38d204a38c077b234 (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
<!DOCTYPE html>

<html>
<head>
  <style>
    .container {
      -webkit-perspective: 500px;
    }
    .set {
      position: absolute;
      top: 8px;
    }
    .box {
      height: 100px;
      width: 100px;
    }
    
    .hidden {
      visibility: hidden;
    }

    .visible {
      visibility: visible;
    }

    .should-be-visible {
      background-color: green !important;
    }
    .composited {
      transform: rotate3d(0, 0, 1, 45deg);
    }
    
    .hidden-indicator {
      background-color: red;
    }
    
    .intermediate {
      transform: rotate3d(0, 0, 1, -45deg);
      -webkit-transform-style: preserve-3d;
      background-color: red;
    }
  </style>
</head>
<body>
  <!-- Tests that a transform on a hidden div affects its visible children. -->
  <!-- You should see a single green box, with no red. -->

  <div class="set">
    <div class="hidden-indicator box"></div>
  </div>

  <div class="set">
    <div class="container">
      <div class="hidden intermediate">
        <div class="visible composited box should-be-visible"></div>
      </div>
    </div>

  </div>
</body>
</html>