OLD | NEW |
1 <!-- Based on fast/table/border-collapsing/cached-cell-append.html --> | 1 <!-- Based on fast/table/border-collapsing/cached-cell-append.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 append new cell, expect that cache is invalidated and paint produces exp
ected image. | 4 Here we append new cell, expect that cache is invalidated and paint produces exp
ected 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 "LayoutTable TABLE", | |
16 "LayoutTableCell TD", | |
17 ]; | |
18 function paintInvalidationTest() { | 12 function paintInvalidationTest() { |
19 newCell = document.createElement("td"); | 13 newCell = document.createElement("td"); |
20 newCell.style.borderLeftWidth = "6px"; | 14 newCell.style.borderLeftWidth = "6px"; |
21 newCell.style.borderLeftStyle = "solid"; | 15 newCell.style.borderLeftStyle = "solid"; |
22 newCell.style.borderLeftColor = "yellow"; | 16 newCell.style.borderLeftColor = "yellow"; |
23 document.getElementById("row").appendChild(newCell); | 17 document.getElementById("row").appendChild(newCell); |
24 } | 18 } |
25 </script> | 19 </script> |
26 </head> | 20 </head> |
27 <body onload="runPaintInvalidationTest()"> | 21 <body onload="runPaintInvalidationTest()"> |
28 <table style="border-collapse:collapse; border:2px solid blue"> | 22 <table style="border-collapse:collapse; border:2px solid blue"> |
29 <tr id="row"> | 23 <tr id="row"> |
30 <td style="border:4px solid lime"/> | 24 <td style="border:4px solid lime"/> |
31 </tr> | 25 </tr> |
32 </table> | 26 </table> |
33 </body> | 27 </body> |
34 </html> | 28 </html> |
35 | 29 |
OLD | NEW |