OLD | NEW |
1 <!-- Based on fast/table/border-collapsing/cached-change-tbody-border-color.html
--> | 1 <!-- Based on fast/table/border-collapsing/cached-change-tbody-border-color.html
--> |
2 <!-- | 2 <!-- |
3 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. |
4 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. |
5 --> | 5 --> |
6 <html> | 6 <html> |
7 <head> | 7 <head> |
8 <title></title> | 8 <title></title> |
9 <link rel="stylesheet" href="../../../fast/table/border-collapsing/resou
rces/cached.css"> | 9 <link rel="stylesheet" href="../../../fast/table/border-collapsing/resou
rces/cached.css"> |
10 <script src="resources/paint-invalidation-test.js"></script> | 10 <script src="resources/paint-invalidation-test.js"></script> |
11 <script type="text/javascript"> | 11 <script type="text/javascript"> |
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 function paintInvalidationTest() { |
26 document.getElementById("tbody").style.borderColor = "yellow"; | 13 document.getElementById("tbody").style.borderColor = "yellow"; |
27 } | 14 } |
28 </script> | 15 </script> |
29 </head> | 16 </head> |
30 <body onload="runPaintInvalidationTest()"> | 17 <body onload="runPaintInvalidationTest()"> |
31 <table style="border-collapse:collapse; border:1px solid blue"> | 18 <table style="border-collapse:collapse; border:1px solid blue"> |
32 <tbody style="border:4px solid pink" id="tbody"> | 19 <tbody style="border:4px solid pink" id="tbody"> |
33 <tr> | 20 <tr> |
34 <td style="border:2px solid lime"/> | 21 <td style="border:2px solid lime"/> |
35 <td/> | 22 <td/> |
36 </tr> | 23 </tr> |
37 <tr> | 24 <tr> |
38 <td/> | 25 <td/> |
39 <td/> | 26 <td/> |
40 </tr> | 27 </tr> |
41 </tbody> | 28 </tbody> |
42 <tbody> | 29 <tbody> |
43 <tr> | 30 <tr> |
44 <td/> | 31 <td/> |
45 <td/> | 32 <td/> |
46 </tr> | 33 </tr> |
47 </tbody> | 34 </tbody> |
48 </table> | 35 </table> |
49 </body> | 36 </body> |
50 </html> | 37 </html> |
51 | 38 |
OLD | NEW |