OLD | NEW |
| 1 <!-- Based on fast/table/border-collapsing/cached-change-colgroup-border-width.h
tml --> |
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 colgroup border width, expect that cache is invalidated and paint
produces expected image. | 4 Here we change colgroup border width, expect that cache is invalidated and paint
produces 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 "LayoutTableCell TD", |
| 20 "LayoutTableCell TD", |
| 21 "LayoutTableCell TD", |
| 22 "LayoutTableCell TD", |
| 23 "LayoutTableCol COLGROUP id='colgroup'", |
| 24 "LayoutTableCell TD", |
| 25 "LayoutTableCell TD", |
| 26 "LayoutTableCell TD", |
| 27 "LayoutTableCell TD", |
| 28 ]; |
| 29 function paintInvalidationTest() { |
12 document.getElementById("colgroup").style.borderWidth = "4px"; | 30 document.getElementById("colgroup").style.borderWidth = "4px"; |
13 } | 31 } |
14 </script> | 32 </script> |
15 </head> | 33 </head> |
16 <body onload="runRepaintTest()"> | 34 <body onload="runPaintInvalidationTest()"> |
17 <table style="border-collapse:collapse; border:1px solid blue"> | 35 <table style="border-collapse:collapse; border:1px solid blue"> |
18 <colgroup style="border:1px solid yellow" id="colgroup"> | 36 <colgroup style="border:1px solid yellow" id="colgroup"> |
19 <col> | 37 <col> |
20 <col> | 38 <col> |
21 </colgroup> | 39 </colgroup> |
22 <colgroup> | 40 <colgroup> |
23 <col> | 41 <col> |
24 </colgroup> | 42 </colgroup> |
25 <tbody> | 43 <tbody> |
26 <tr> | 44 <tr> |
27 <td style="border:2px solid lime"/> | 45 <td style="border:2px solid lime"/> |
28 <td/> | 46 <td/> |
29 <td/> | 47 <td/> |
30 </tr> | 48 </tr> |
31 <tr> | 49 <tr> |
32 <td/> | 50 <td/> |
33 <td/> | 51 <td/> |
34 <td/> | 52 <td/> |
35 </tr> | 53 </tr> |
36 </tbody> | 54 </tbody> |
37 </table> | 55 </table> |
38 </body> | 56 </body> |
39 </html> | 57 </html> |
40 | 58 |
OLD | NEW |