Add width and height presentational hints for table-related elements (#33405)

We were only parsing the `width` attribute as a presentation hint for
`<table>`, `<td>` and `<th>`. This patch also handles `<colgroup>` and
`<col>`.

Also, we weren't parsing `height` at all, now we do it for `<table>`,
`<td>`, `<th>`, `<tr>`, `<tbody>`, `<thead>` and `<tfoot>`.

One test is now crashing, but this was an existing issue: #33423

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Oriol Brufau 2024-09-12 15:34:20 +02:00 committed by GitHub
parent 37ab4b9825
commit 4839cdf176
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 65 additions and 228 deletions

View file

@ -569,198 +569,6 @@
[<embed height="0px"> mapping to <embed> height property]
expected: FAIL
[<td height="200"> mapping to <td> height property]
expected: FAIL
[<td height="1007"> mapping to <td> height property]
expected: FAIL
[<td height=" 00523 "> mapping to <td> height property]
expected: FAIL
[<td height="200.25"> mapping to <td> height property]
expected: FAIL
[<td height="200.7"> mapping to <td> height property]
expected: FAIL
[<td height="200."> mapping to <td> height property]
expected: FAIL
[<td height="200in"> mapping to <td> height property]
expected: FAIL
[<td height="200.25in"> mapping to <td> height property]
expected: FAIL
[<td height="200 %"> mapping to <td> height property]
expected: FAIL
[<td height="200 abc"> mapping to <td> height property]
expected: FAIL
[<td height="200%"> mapping to <td> height property]
expected: FAIL
[<td height="200%abc"> mapping to <td> height property]
expected: FAIL
[<td height="200.25%"> mapping to <td> height property]
expected: FAIL
[<td height="200.%"> mapping to <td> height property]
expected: FAIL
[<td height="20.25e2"> mapping to <td> height property]
expected: FAIL
[<td height="20.25E2"> mapping to <td> height property]
expected: FAIL
[<table height="200"> mapping to <table> height property]
expected: FAIL
[<table height="1007"> mapping to <table> height property]
expected: FAIL
[<table height=" 00523 "> mapping to <table> height property]
expected: FAIL
[<table height="200.25"> mapping to <table> height property]
expected: FAIL
[<table height="200.7"> mapping to <table> height property]
expected: FAIL
[<table height="200."> mapping to <table> height property]
expected: FAIL
[<table height="200in"> mapping to <table> height property]
expected: FAIL
[<table height="200.25in"> mapping to <table> height property]
expected: FAIL
[<table height="200 %"> mapping to <table> height property]
expected: FAIL
[<table height="200 abc"> mapping to <table> height property]
expected: FAIL
[<table height="200%"> mapping to <table> height property]
expected: FAIL
[<table height="200%abc"> mapping to <table> height property]
expected: FAIL
[<table height="200.25%"> mapping to <table> height property]
expected: FAIL
[<table height="200.%"> mapping to <table> height property]
expected: FAIL
[<table height="20.25e2"> mapping to <table> height property]
expected: FAIL
[<table height="20.25E2"> mapping to <table> height property]
expected: FAIL
[<tr height="200"> mapping to <tr> height property]
expected: FAIL
[<tr height="1007"> mapping to <tr> height property]
expected: FAIL
[<tr height=" 00523 "> mapping to <tr> height property]
expected: FAIL
[<tr height="200.25"> mapping to <tr> height property]
expected: FAIL
[<tr height="200.7"> mapping to <tr> height property]
expected: FAIL
[<tr height="200."> mapping to <tr> height property]
expected: FAIL
[<tr height="200in"> mapping to <tr> height property]
expected: FAIL
[<tr height="200.25in"> mapping to <tr> height property]
expected: FAIL
[<tr height="200 %"> mapping to <tr> height property]
expected: FAIL
[<tr height="200 abc"> mapping to <tr> height property]
expected: FAIL
[<tr height="200%"> mapping to <tr> height property]
expected: FAIL
[<tr height="200%abc"> mapping to <tr> height property]
expected: FAIL
[<tr height="200.25%"> mapping to <tr> height property]
expected: FAIL
[<tr height="200.%"> mapping to <tr> height property]
expected: FAIL
[<tr height="20.25e2"> mapping to <tr> height property]
expected: FAIL
[<tr height="20.25E2"> mapping to <tr> height property]
expected: FAIL
[<col width="200"> mapping to <col> width property]
expected: FAIL
[<col width="1007"> mapping to <col> width property]
expected: FAIL
[<col width=" 00523 "> mapping to <col> width property]
expected: FAIL
[<col width="200.25"> mapping to <col> width property]
expected: FAIL
[<col width="200.7"> mapping to <col> width property]
expected: FAIL
[<col width="200."> mapping to <col> width property]
expected: FAIL
[<col width="200in"> mapping to <col> width property]
expected: FAIL
[<col width="200.25in"> mapping to <col> width property]
expected: FAIL
[<col width="200 %"> mapping to <col> width property]
expected: FAIL
[<col width="200 abc"> mapping to <col> width property]
expected: FAIL
[<col width="200%"> mapping to <col> width property]
expected: FAIL
[<col width="200%abc"> mapping to <col> width property]
expected: FAIL
[<col width="200.25%"> mapping to <col> width property]
expected: FAIL
[<col width="200.%"> mapping to <col> width property]
expected: FAIL
[<col width="20.25e2"> mapping to <col> width property]
expected: FAIL
[<col width="20.25E2"> mapping to <col> width property]
expected: FAIL
[<embed hspace="200"> mapping to <embed> marginLeft property]
expected: FAIL