Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Side by Side Diff: LayoutTests/paint/invalidation/spv2/padding-keeping-visual-size.html

Issue 1302183007: Convert some text-based-repaint tests for spv2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!-- Based on fast/repaint/padding-keeping-visual-size.html -->
1 <!DOCTYPE HTML> 2 <!DOCTYPE HTML>
2 <script src="resources/text-based-repaint.js"></script> 3 <script src="resources/paint-invalidation-test.js"></script>
3 <script> 4 <script>
4 function repaintTest() 5 window.expectedPaintInvalidationObjects = [
6 "LayoutBlockFlow (positioned) DIV id='target2' class='outer'",
7 "LayoutBlockFlow DIV class='inner'",
8 ];
9 function paintInvalidationTest()
5 { 10 {
6 // No visual change. Optimally, there should be no repaint. 11 // No visual change. Optimally, there should be no repaint.
7 var target1 = document.getElementById('target1'); 12 var target1 = document.getElementById('target1');
8 target1.style.padding = '20px'; 13 target1.style.padding = '20px';
9 target1.style.width = '60px'; 14 target1.style.width = '60px';
10 target1.style.height = '60px'; 15 target1.style.height = '60px';
11 16
12 // Content will shrink. Should repaint at least the content. 17 // Content will shrink. Should repaint at least the content.
13 var target2 = document.getElementById('target2'); 18 var target2 = document.getElementById('target2');
14 target2.style.padding = '20px'; 19 target2.style.padding = '20px';
15 target2.style.width = '60px'; 20 target2.style.width = '60px';
16 target2.style.height = '60px'; 21 target2.style.height = '60px';
17 } 22 }
18 window.onload = runRepaintTest; 23 window.onload = runPaintInvalidationTest;
19 </script> 24 </script>
20 <style> 25 <style>
21 body { 26 body {
22 margin: 0; 27 margin: 0;
23 } 28 }
24 .outer { 29 .outer {
25 width: 100px; 30 width: 100px;
26 height: 100px; 31 height: 100px;
27 position: absolute; 32 position: absolute;
28 background-color: green; 33 background-color: green;
29 } 34 }
30 #target2 { 35 #target2 {
31 top: 200px; 36 top: 200px;
32 } 37 }
33 .inner { 38 .inner {
34 width: 100%; 39 width: 100%;
35 height: 100%; 40 height: 100%;
36 background-color: yellow; 41 background-color: yellow;
37 } 42 }
38 </style> 43 </style>
39 <div id="target1" class="outer"></div> 44 <div id="target1" class="outer"></div>
40 <div id="target2" class="outer"><div class="inner"></div></div> 45 <div id="target2" class="outer"><div class="inner"></div></div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698