OLD | NEW |
1 <!-- | 1 <!-- |
2 Calculating collapsed borders for big tables is expensive, so we cache them and
recalculate when needed. | 2 Calculating collapsed borders for big tables is expensive, so we cache them and
recalculate when needed. |
3 Here we change tbody border width, expect that cache is invalidated and paint pr
oduces expected image. | 3 Here we change tbody border width, expect that cache is invalidated and paint pr
oduces expected image. |
4 --> | 4 --> |
5 <html> | 5 <html> |
6 <head> | 6 <head> |
7 <title></title> | 7 <title></title> |
8 <link rel="stylesheet" href="resources/cached.css"> | 8 <link rel="stylesheet" href="resources/cached.css"> |
| 9 <script src="../../../resources/run-after-display.js"></script> |
9 <script type="text/javascript"> | 10 <script type="text/javascript"> |
10 function test() { | 11 function test() { |
11 document.body.offsetTop; | |
12 if (window.testRunner) | 12 if (window.testRunner) |
13 testRunner.display(); | 13 testRunner.waitUntilDone(); |
14 document.getElementById("tbody").style.borderWidth = "4px"; | 14 runAfterDisplay(function() { |
| 15 document.getElementById("tbody").style.borderWidth = "4px"; |
| 16 if (window.testRunner) |
| 17 testRunner.notifyDone(); |
| 18 }); |
15 } | 19 } |
16 </script> | 20 </script> |
17 </head> | 21 </head> |
18 <body onload="test()"> | 22 <body onload="test()"> |
19 <table style="border-collapse:collapse; border:1px solid blue"> | 23 <table style="border-collapse:collapse; border:1px solid blue"> |
20 <tbody style="border:1px solid yellow" id="tbody"> | 24 <tbody style="border:1px solid yellow" id="tbody"> |
21 <tr> | 25 <tr> |
22 <td style="border:2px solid lime"/> | 26 <td style="border:2px solid lime"/> |
23 <td/> | 27 <td/> |
24 </tr> | 28 </tr> |
25 <tr> | 29 <tr> |
26 <td/> | 30 <td/> |
27 <td/> | 31 <td/> |
28 </tr> | 32 </tr> |
29 </tbody> | 33 </tbody> |
30 <tbody> | 34 <tbody> |
31 <tr> | 35 <tr> |
32 <td/> | 36 <td/> |
33 <td/> | 37 <td/> |
34 </tr> | 38 </tr> |
35 </tbody> | 39 </tbody> |
36 </table> | 40 </table> |
37 </body> | 41 </body> |
38 </html> | 42 </html> |
39 | 43 |
OLD | NEW |