Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / paint / invalidation / spv2 / padding-keeping-visual-size.html
blob2fabbbfc4fe25425f520d49c97e446d2e37045bb
1 <!-- Based on fast/repaint/padding-keeping-visual-size.html -->
2 <!DOCTYPE HTML>
3 <script src="resources/paint-invalidation-test.js"></script>
4 <script>
5 window.expectedPaintInvalidationObjects = [
6 "LayoutBlockFlow (positioned) DIV id='target2' class='outer'",
7 "LayoutBlockFlow DIV class='inner'",
8 ];
9 function paintInvalidationTest()
11 // No visual change. Optimally, there should be no repaint.
12 var target1 = document.getElementById('target1');
13 target1.style.padding = '20px';
14 target1.style.width = '60px';
15 target1.style.height = '60px';
17 // Content will shrink. Should repaint at least the content.
18 var target2 = document.getElementById('target2');
19 target2.style.padding = '20px';
20 target2.style.width = '60px';
21 target2.style.height = '60px';
23 window.onload = runPaintInvalidationTest;
24 </script>
25 <style>
26 body {
27 margin: 0;
29 .outer {
30 width: 100px;
31 height: 100px;
32 position: absolute;
33 background-color: green;
35 #target2 {
36 top: 200px;
38 .inner {
39 width: 100%;
40 height: 100%;
41 background-color: yellow;
43 </style>
44 <div id="target1" class="outer"></div>
45 <div id="target2" class="outer"><div class="inner"></div></div>