OLD | NEW |
| 1 <!-- Based on fast/table/border-collapsing/cached-change-cell-border-width.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 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. |
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 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 document.getElementById("foo").style.borderWidth = "4px"; | 22 document.getElementById("foo").style.borderWidth = "4px"; |
13 document.getElementById("foo").style.borderColor = "lime"; | 23 document.getElementById("foo").style.borderColor = "lime"; |
14 } | 24 } |
15 </script> | 25 </script> |
16 </head> | 26 </head> |
17 <body onload="runRepaintTest()"> | 27 <body onload="runPaintInvalidationTest()"> |
18 <table style="border-collapse:collapse; border:2px solid blue"> | 28 <table style="border-collapse:collapse; border:2px solid blue"> |
19 <tr> | 29 <tr> |
20 <td style="border:1px solid lime" id="foo"/> | 30 <td style="border:1px solid lime" id="foo"/> |
21 <td style="border:1px solid black"/> | 31 <td style="border:1px solid black"/> |
22 </tr> | 32 </tr> |
23 </table> | 33 </table> |
24 </body> | 34 </body> |
25 </html> | 35 </html> |
26 | 36 |
OLD | NEW |