mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Auto merge of #9826 - mbrubeck:table-row-iter, r=pcwalton
Table border-collapse fixes Two related fixes for border-collapse: * Fix border collapsing across table-row-group flows This fixes the border-end calculation for table rows whose borders are collapsed with rows in different rowgroups. The border collapsing code now uses an iterator that yields all the rows as a flat sequence, regardless of how they are grouped in rowgroups. It gets rid of `TableRowGroupFlow::preliminary_collapsed_borders` which was never correct. (It was read but never written.) This may fix #8120 but I'm not 100% certain. (I haven't managed to reproduce the intermittent failure locally, and my reduced test case still fails but in a different way.) * Fix confusing `push_or_mutate` API This fixes a bug when recalculating border collapsing for an existing table row. The bug was caused by using `push_or_mutate` which has no effect if there is already a value at the specified index. The fix switches incorrect `push_or_mutate` calls to use `push_or_set` instead. It also renames `push_or_mutate` to `get_mut_or_push` which I think is a less-confusing name for this method. r? @pcwalton <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9826) <!-- Reviewable:end -->
This commit is contained in:
commit
1d6aece589
8 changed files with 192 additions and 148 deletions
|
@ -1,3 +0,0 @@
|
|||
[border-collapse-dynamic-cell-002.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
|
@ -740,6 +740,18 @@
|
|||
"url": "/_mozilla/css/border_collapse_missing_cell_a.html"
|
||||
}
|
||||
],
|
||||
"css/border_collapse_rowgroup_a.html": [
|
||||
{
|
||||
"path": "css/border_collapse_rowgroup_a.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/css/border_collapse_rowgroup_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/css/border_collapse_rowgroup_a.html"
|
||||
}
|
||||
],
|
||||
"css/border_collapse_simple_a.html": [
|
||||
{
|
||||
"path": "css/border_collapse_simple_a.html",
|
||||
|
@ -6910,6 +6922,18 @@
|
|||
"url": "/_mozilla/css/border_collapse_missing_cell_a.html"
|
||||
}
|
||||
],
|
||||
"css/border_collapse_rowgroup_a.html": [
|
||||
{
|
||||
"path": "css/border_collapse_rowgroup_a.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/css/border_collapse_rowgroup_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/css/border_collapse_rowgroup_a.html"
|
||||
}
|
||||
],
|
||||
"css/border_collapse_simple_a.html": [
|
||||
{
|
||||
"path": "css/border_collapse_simple_a.html",
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[border_collapse_simple_a.html]
|
||||
type: reftest
|
||||
disabled: https://github.com/servo/servo/issues/8120
|
28
tests/wpt/mozilla/tests/css/border_collapse_rowgroup_a.html
Normal file
28
tests/wpt/mozilla/tests/css/border_collapse_rowgroup_a.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>border collapse rowgroup test</title>
|
||||
<link rel="match" href="border_collapse_rowgroup_ref.html">
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border: 4px solid black;
|
||||
}
|
||||
td {
|
||||
border: 2px solid black;
|
||||
padding: 16px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr><td></td></tr>
|
||||
</tbody>
|
||||
<tr><td></td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>border collapse rowgroup reference</title>
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border: 4px solid black;
|
||||
}
|
||||
td {
|
||||
border: 2px solid black;
|
||||
padding: 16px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue