4 table { border-collapse: collapse; padding:
5px;}
5 td { width:
20px; height:
20px;}
6 .bordered { border-left:
2px solid orange; border-right:
2px solid blue; border-top:
2px solid green; border-bottom:
2px solid yellow;}
10 if (window
.testRunner
)
11 testRunner
.dumpAsTextWithPixelResults();
14 <!--Test for Bugzilla <a href="https://bugs.webkit.org/show_bug.cgi?id=76246">Bug 76246</a>: Incorrect rendering of borders on <col> with span > 1-->
15 <!--The following tests verify the border-collapse behavior on tables with span specified for col/colgroups.-->
17 <!-- This table has a colgroup with span. Individual borders for the spanned cells should not be painted. -->
20 <colgroup span=
3 style=
"border: 1px solid blue;"></colgroup>
23 <td></td><td></td><td></td><td></td><td></td>
26 <div id=
"space"></div>
27 <!-- This table has a col with span. As per HTML5 specifications, the col element should be treated as if it was present as many number of times as its span attribute. We should thus expect the individual borders for the spanned cells to be painted for the following table. -->
29 <colgroup style=
"border: 1px solid yellow;" >
30 <col style=
"border: 1px solid green;"></col>
31 <col span=
3 style=
"border: 1px solid orange;"></col>
33 <colgroup style=
"border: 1px solid green;">
34 <col style=
"border: 1px solid blue;"></col>
37 <td></td><td></td><td></td><td></td><td></td>
39 <!-- No red colored bored should be visible for the following table. -->
41 <div id=
"space"></div>
44 <col style=
"border-right: 1px solid red;">
45 <col span=
"3" class=
"bordered">
46 <col style=
"border-left: 2px solid red;">
63 <div id=
"space"></div>
64 <!-- For the following table, the first border displayed should be transparent or invisible, the second in semi-transparent green color, the third in full green color and the fourth in black. No red color should be visible. This verifies the scenario when col element is present inside colgroup and we need to consider the enclosing colgroup's border. -->
66 <colgroup style=
"border-right: 5px solid rgba(0, 127, 0, 0);"><col/></colgroup>
67 <colgroup style=
"border-left: 5px solid red;"><col/></colgroup>
68 <colgroup style=
"border-right: 5px solid rgba(0, 127, 0, 0.5);"><col/></colgroup>
69 <colgroup style=
"border-left: 5px solid red;"><col/></colgroup>
70 <colgroup style=
"border-right: 5px solid rgba(0, 127, 0, 1);"><col/></colgroup>
71 <colgroup style=
"border-left: 5px solid red;"><col/></colgroup>
72 <colgroup style=
"border-right: 5px solid ;"><col/></colgroup>
73 <colgroup style=
"border-left: 5px solid rgba(225, 0, 0, 1);"><col/></colgroup>
85 <div id=
"space"></div>
86 <!-- For the following table, the first border displayed should be transparent or invisible, the second in semi-transparent green color, the third in full green color and the fourth in black. No red color should be visible. This verifies the scenario when only colgroup element is present. -->
88 <colgroup style=
"border-right: 5px solid rgba(0, 127, 0, 0);" />
89 <colgroup style=
"border-left: 5px solid red;" />
90 <colgroup style=
"border-right: 5px solid rgba(0, 127, 0, 0.5);" />
91 <colgroup style=
"border-left: 5px solid red;" />
92 <colgroup style=
"border-right: 5px solid rgba(0, 127, 0, 1);" />
93 <colgroup style=
"border-left: 5px solid red;" />
94 <colgroup style=
"border-right: 5px solid ;" />
95 <colgroup style=
"border-left: 5px solid rgba(225, 0, 0, 1);" />