OLD | NEW |
| 1 <!-- Based on fast/table/border-collapsing/cached-change-col-border-color.html -
-> |
1 <!-- | 2 <!-- |
2 Calculating collapsed borders for big tables is expensive, so we cache them and
recalculate when needed. | 3 Calculating collapsed borders for big tables is expensive, so we cache them and
recalculate when needed. |
3 Here we change col border color, expect that cache is invalidated and paint prod
uces expected image. | 4 Here we change col border color, expect that cache is invalidated and paint prod
uces expected image. |
4 --> | 5 --> |
5 <html> | 6 <html> |
6 <head> | 7 <head> |
7 <title></title> | 8 <title></title> |
8 <link rel="stylesheet" href="resources/cached.css"> | 9 <link rel="stylesheet" href="../../../fast/table/border-collapsing/resou
rces/cached.css"> |
9 <script src="../../../fast/repaint/resources/text-based-repaint.js"></sc
ript> | 10 <script src="resources/paint-invalidation-test.js"></script> |
10 <script type="text/javascript"> | 11 <script type="text/javascript"> |
11 function repaintTest() { | 12 window.expectedPaintInvalidationObjects = [ |
| 13 "LayoutTableCell TD", |
| 14 "LayoutTableCell TD", |
| 15 "LayoutTableCell TD", |
| 16 "LayoutTableCell TD", |
| 17 "LayoutTableCell TD", |
| 18 "LayoutTableCell TD", |
| 19 "LayoutTableCol COL id='col'", |
| 20 ]; |
| 21 function paintInvalidationTest() { |
12 document.getElementById("col").style.borderColor = "yellow"; | 22 document.getElementById("col").style.borderColor = "yellow"; |
13 } | 23 } |
14 </script> | 24 </script> |
15 </head> | 25 </head> |
16 <body onload="runRepaintTest()"> | 26 <body onload="runPaintInvalidationTest()"> |
17 <table style="border-collapse:collapse; border:1px solid blue"> | 27 <table style="border-collapse:collapse; border:1px solid blue"> |
18 <colgroup> | 28 <colgroup> |
19 <col style="border:4px solid pink" id="col"> | 29 <col style="border:4px solid pink" id="col"> |
20 <col> | 30 <col> |
21 </colgroup> | 31 </colgroup> |
22 <tbody> | 32 <tbody> |
23 <tr> | 33 <tr> |
24 <td style="border:2px solid lime"/> | 34 <td style="border:2px solid lime"/> |
25 <td/> | 35 <td/> |
26 </tr> | 36 </tr> |
27 <tr> | 37 <tr> |
28 <td/> | 38 <td/> |
29 <td/> | 39 <td/> |
30 </tr> | 40 </tr> |
31 </tbody> | 41 </tbody> |
32 </table> | 42 </table> |
33 </body> | 43 </body> |
34 </html> | 44 </html> |
35 | 45 |
OLD | NEW |