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