summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/squashing/squash-partial-repaint-inside-squashed-layer.html
blob: 7c8e94da4aeecfa66d72cbfde9c02107adc24d1d (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
<!DOCTYPE html>
<head>
<style>
.composited {
transform: translatez(0);
}

.box {
  width: 100px;
  height: 100px;
}

.behind {
  position: absolute;
  z-index: 1;
  top: 100px;
  left: 100px;
  background-color: blue;
}

.middle {
  position: absolute;
  z-index: 1;
  top: 180px;
  left: 180px;
  background-color: lime;
}

.repaintdiv {
  position: absolute;
  z-index: 1;
  top: 260px;
  left: 260px;
  width: 182px;
  height: 29px;
  background-color:red;
}

.top {
  position: absolute;
  z-index: 1;
  top: 280px;
  left: 340px;
  background-color: cyan;
}

div:hover {
  background-color: green;
  transform:translatez(0);
}

</style>
<script src="../../fast/repaint/resources/text-based-repaint.js"></script>
<script>
    function repaintTest()
    {
        document.getElementById('repaintdiv').style.background = 'salmon';
    }
    runRepaintTest();
</script>
</head>
<body>
    <div class="composited box behind"></div>
    <div class="box middle"></div>
    <img id="repaintdiv" class="repaintdiv"></img>
    <div class="box top"></div>
</body>