summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/repaint/box-sizing-border-keeping-size.html
blob: 80a7db99b1596cfb98883fd4ffbd40396acfaba6 (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
<!DOCTYPE HTML>
<script src="resources/text-based-repaint.js"></script>
<script>
function repaintTest()
{
    document.getElementById('target1').className = 'content-box';
    document.getElementById('target2').className = 'border-box';
}
window.onload = runRepaintTest;
</script>
<style>
body {
    margin: 0;
}
div {
    position: absolute;
    background-color: green;
}
.border-box {
    width: 100px;
    height: 100px;
    box-sizing: border-box;
}
.content-box {
    width: 60px;
    height: 60px;
    box-sizing: content-box;
    border: blue solid 20px;
}
</style>
<div id="target1" class="border-box" style="top: 0px"></div>
<div id="target2" class="content-box" style="top: 200px"></div>