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