mirror of
https://github.com/servo/servo
synced 2026-05-01 03:47:53 +02:00
Implement non-zero dimension attribute parsing
Fixes #8445 The only attributes I found that we have implemented that uses non-zero dimenion attributes: * `width` for `<td>` and `<th>` (table cells) * `width` for `<table>` I updated these implementations to use the new non-zero dimension attribute parsing and added associated regression tests.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<link rel="match" href="table-cell-width-ref.html">
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 400px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
th {
|
||||
font-weight: normal;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
td, th {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
td:first-child, th:first-child {
|
||||
background-color: red;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- width=0 should be treated as 'auto' -->
|
||||
<table>
|
||||
<tr>
|
||||
<th width=0>a</th>
|
||||
<th>a</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width=0>a</td>
|
||||
<td>a</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- test valid width attribute value-->
|
||||
<table>
|
||||
<tr>
|
||||
<th width=100>a</th>
|
||||
<th>a</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width=100>a</td>
|
||||
<td>a</td>
|
||||
</tr>
|
||||
</table>
|
||||
Reference in New Issue
Block a user