OLD | NEW |
1 <!-- Based on fast/table/border-collapsing/cached-change-cell-border-width.html
--> | 1 <!-- Based on fast/table/border-collapsing/cached-change-cell-border-width.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 cell border width, expect that cache is invalidated and paint pro
duces expected image. | 4 Here we change cell border width, expect that cache is invalidated and paint pro
duces 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 id='foo'", | |
14 "LayoutTableCell TD", | |
15 "LayoutTable TABLE", | |
16 "LayoutTableSection TBODY", | |
17 "LayoutTableRow TR", | |
18 "LayoutTableCell TD id='foo'", | |
19 "LayoutTableCell TD", | |
20 ]; | |
21 function paintInvalidationTest() { | 12 function paintInvalidationTest() { |
22 document.getElementById("foo").style.borderWidth = "4px"; | 13 document.getElementById("foo").style.borderWidth = "4px"; |
23 document.getElementById("foo").style.borderColor = "lime"; | 14 document.getElementById("foo").style.borderColor = "lime"; |
24 } | 15 } |
25 </script> | 16 </script> |
26 </head> | 17 </head> |
27 <body onload="runPaintInvalidationTest()"> | 18 <body onload="runPaintInvalidationTest()"> |
28 <table style="border-collapse:collapse; border:2px solid blue"> | 19 <table style="border-collapse:collapse; border:2px solid blue"> |
29 <tr> | 20 <tr> |
30 <td style="border:1px solid lime" id="foo"/> | 21 <td style="border:1px solid lime" id="foo"/> |
31 <td style="border:1px solid black"/> | 22 <td style="border:1px solid black"/> |
32 </tr> | 23 </tr> |
33 </table> | 24 </table> |
34 </body> | 25 </body> |
35 </html> | 26 </html> |
36 | 27 |
OLD | NEW |