OLD | NEW |
| 1 <!-- Based on fast/repaint/resize-skewed.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='skewed'", |
| 7 ]; |
| 8 function paintInvalidationTest() { |
5 document.getElementById('skewed').style.width = '200px'; | 9 document.getElementById('skewed').style.width = '200px'; |
6 } | 10 } |
7 onload = runRepaintTest; | 11 onload = runPaintInvalidationTest; |
8 </script> | 12 </script> |
9 <style> | 13 <style> |
10 div { | 14 div { |
11 position: absolute; | 15 position: absolute; |
12 transform: skew(-45deg); | 16 transform: skew(-45deg); |
13 transform-origin: left top; | 17 transform-origin: left top; |
14 top: 50px; | 18 top: 50px; |
15 left: 500px; | 19 left: 500px; |
16 height: 500px; | 20 height: 500px; |
17 } | 21 } |
18 #skewed { | 22 #skewed { |
19 width: 100px; | 23 width: 100px; |
20 background-color: green; | 24 background-color: green; |
21 } | 25 } |
22 #indicator { | 26 #indicator { |
23 width: 200px; | 27 margin-left: 1px; |
| 28 width: 198px; /* Narrower than the target to avoid anti-alias effect. */ |
24 background-color: red; | 29 background-color: red; |
25 } | 30 } |
26 </style> | 31 </style> |
27 Tests paint invalidation when a skewed element is resized. Passes if there is no
red. | 32 Tests paint invalidation when a skewed element is resized. Passes if there is no
red. |
28 <div id="indicator"></div> | 33 <div id="indicator"></div> |
29 <div id="skewed"></div> | 34 <div id="skewed"></div> |
30 | 35 |
OLD | NEW |