forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
block-shift-repaint.html
58 lines (52 loc) · 1.83 KB
/
block-shift-repaint.html
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
<html>
<head>
<title>Test for http://bugs.webkit.org/show_bug.cgi?id=12079</title>
<style type="text/css">
div.playground { position: relative; width: 90px; height: 90px; }
.red { background-color: yellow; }
.blue { background-color: blue; }
.green { background-color: green; }
.zero { height: 0; width: 60px; }
.half { height: 30px; width: 60px; }
.full { height: 60px; width: 60px; }
</style>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
var div1 = document.getElementById("div1");
div1.style.height = "0";
var div2 = document.getElementById("div2");
div2.style.height = "30px";
var top = document.getElementById("top");
top.style.height = "0";
var top = document.getElementById("innerDiv");
innerDiv.style.height = "15px";
}
</script>
</head>
<body onload="runRepaintAndPixelTest()">
<div class="playground">
<div id="div1" class="blue half"></div>
<div class="red half"></div>
<div class="green half"></div>
</div>
<div class="playground">
<div><div id="top" class="blue half"></div></div>
<div class="red half"></div>
<div class="green half"></div>
</div>
<div class="playground">
<div id="div2" class="zero"></div>
<div class="green half"></div>
<div class="red half"></div>
</div>
<div class="playground" style="margin-top: 30px;">
<div style="width: 10px; margin: auto;">
<div id="innerDiv"></div>
</div>
<div class="half"></div>
<div class="half" style="border-top: solid yellow 8px;"></div>
</div>
</body>
</html>