Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layout: Fix painting order of collapsed table borders #50373

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions css/css-tables/tentative/collapsed-borders-painting-order-001.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<title>Painting order of collapsed table borders</title>
<link rel="author" title="Oriol Brufau" href="[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-tables/#border-collapsing">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#painting-order">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11570">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="
The collapsed border of the table is painted in front of the border of the
block descendant.
">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<table style="border-collapse: collapse">
<td style="border: 50px solid green; padding: 0">
<div style="border: 50px solid red; margin: -50px"></div>
</td>
</table>
18 changes: 18 additions & 0 deletions css/css-tables/tentative/collapsed-borders-painting-order-002.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<title>Painting order of collapsed table borders</title>
<link rel="author" title="Oriol Brufau" href="[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-tables/#border-collapsing">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#painting-order">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11570">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="
The collapsed border of the table is painted in front of the border of the
block descendant, even if the table has `position: relative`.
Gecko disagrees with this test.
">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<table style="border-collapse: collapse; position: relative">
<td style="border: 50px solid green; padding: 0">
<div style="border: 50px solid red; margin: -50px"></div>
</td>
</table>
18 changes: 18 additions & 0 deletions css/css-tables/tentative/collapsed-borders-painting-order-003.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<title>Painting order of collapsed table borders</title>
<link rel="author" title="Oriol Brufau" href="[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-tables/#border-collapsing">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#painting-order">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11570">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="
The collapsed border of the table is painted in front of the border of the
block descendant, even if the table has `display: inline-table`.
Gecko disagrees with this test.
">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<table style="border-collapse: collapse; display: inline-table">
<td style="border: 50px solid green; padding: 0">
<div style="border: 50px solid red; margin: -50px"></div>
</td>
</table>
16 changes: 16 additions & 0 deletions css/css-tables/tentative/collapsed-borders-painting-order-004.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<title>Painting order of collapsed table borders</title>
<link rel="author" title="Oriol Brufau" href="[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-tables/#border-collapsing">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#painting-order">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11570">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="
The collapsed border of the table is painted behind the border of the
following block sibling.
">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<table style="border-collapse: collapse">
<td style="border: 50px solid red; padding: 0"></td>
</table>
<div style="border: 50px solid green; width: 0px; margin-top: -100px"></div>
16 changes: 16 additions & 0 deletions css/css-tables/tentative/collapsed-borders-painting-order-005.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<title>Painting order of collapsed table borders</title>
<link rel="author" title="Oriol Brufau" href="[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-tables/#border-collapsing">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#painting-order">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11570">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="
The collapsed border of the table is painted in front of the border of the
following block sibling, when the table has `position: relative`.
">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<table style="border-collapse: collapse; position: relative">
<td style="border: 50px solid green; padding: 0"></td>
</table>
<div style="border: 50px solid red; width: 0px; margin-top: -100px"></div>
16 changes: 16 additions & 0 deletions css/css-tables/tentative/collapsed-borders-painting-order-006.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<title>Painting order of collapsed table borders</title>
<link rel="author" title="Oriol Brufau" href="[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-tables/#border-collapsing">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#painting-order">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11570">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="
The collapsed border of the table is painted in front of the border of the
following block sibling, when the table has `display: inline-table`.
">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<table style="border-collapse: collapse; display: inline-table; vertical-align: top">
<td style="border: 50px solid green; padding: 0"></td>
</table>
<div style="border: 50px solid red; width: 0px; margin-top: -100px"></div>
19 changes: 19 additions & 0 deletions css/css-tables/tentative/collapsed-borders-painting-order-007.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<title>Painting order of collapsed table borders</title>
<link rel="author" title="Oriol Brufau" href="[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-tables/#border-collapsing">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#painting-order">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11570">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="
The collapsed border of the outer table is painted in front of the collapsed border
of the inner table.
">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<table style="border-collapse: collapse">
<td style="border: 50px solid green; padding: 0">
<table style="border-collapse: collapse; margin: -50px">
<td style="border: 50px solid red; padding: 0"></td>
</table>
</td>
</table>
20 changes: 20 additions & 0 deletions css/css-tables/tentative/collapsed-borders-painting-order-008.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<title>Painting order of collapsed table borders</title>
<link rel="author" title="Oriol Brufau" href="[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-tables/#border-collapsing">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#painting-order">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11570">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="
The collapsed border of the outer table is painted in front of the collapsed border
of the inner table, even if the outer table has `position: relative`.
Gecko disagrees with this test.
">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<table style="border-collapse: collapse; position: relative">
<td style="border: 50px solid green; padding: 0">
<table style="border-collapse: collapse; margin: -50px">
<td style="border: 50px solid red; padding: 0"></td>
</table>
</td>
</table>
19 changes: 19 additions & 0 deletions css/css-tables/tentative/collapsed-borders-painting-order-009.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<title>Painting order of collapsed table borders</title>
<link rel="author" title="Oriol Brufau" href="[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-tables/#border-collapsing">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#painting-order">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11570">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="
The collapsed border of the outer table is painted behind the collapsed border
of the inner table, when the inner table has `position: relative`.
">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<table style="border-collapse: collapse">
<td style="border: 50px solid red; padding: 0">
<table style="border-collapse: collapse; margin: -50px; position: relative">
<td style="border: 50px solid green; padding: 0"></td>
</table>
</td>
</table>
19 changes: 19 additions & 0 deletions css/css-tables/tentative/collapsed-borders-painting-order-010.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<title>Painting order of collapsed table borders</title>
<link rel="author" title="Oriol Brufau" href="[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-tables/#border-collapsing">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#painting-order">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11570">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="
The collapsed border of the outer table is painted behind the collapsed border
of the inner table, when both tables have `position: relative`.
">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<table style="border-collapse: collapse; position: relative">
<td style="border: 50px solid red; padding: 0">
<table style="border-collapse: collapse; margin: -50px; position: relative">
<td style="border: 50px solid green; padding: 0"></td>
</table>
</td>
</table>
20 changes: 20 additions & 0 deletions css/css-tables/tentative/collapsed-borders-painting-order-011.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<title>Painting order of collapsed table borders</title>
<link rel="author" title="Oriol Brufau" href="[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-tables/#border-collapsing">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#painting-order">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11570">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="
The collapsed border of the outer table is painted in front of the collapsed border
of the inner table, even if the outer table has `display: inline-table`.
Gecko disagrees with this test.
">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<table style="border-collapse: collapse; display: inline-table">
<td style="border: 50px solid green; padding: 0">
<table style="border-collapse: collapse; margin: -50px">
<td style="border: 50px solid red; padding: 0"></td>
</table>
</td>
</table>
19 changes: 19 additions & 0 deletions css/css-tables/tentative/collapsed-borders-painting-order-012.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<title>Painting order of collapsed table borders</title>
<link rel="author" title="Oriol Brufau" href="[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-tables/#border-collapsing">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#painting-order">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11570">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="
The collapsed border of the outer table is painted behind the collapsed border
of the inner table, when the inner table has `display: inline-table`.
">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<table style="border-collapse: collapse; line-height: 0">
<td style="border: 50px solid red; padding: 0">
<table style="border-collapse: collapse; margin: -50px; display: inline-table; vertical-align: top">
<td style="border: 50px solid green; padding: 0"></td>
</table>
</td>
</table>
19 changes: 19 additions & 0 deletions css/css-tables/tentative/collapsed-borders-painting-order-013.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<title>Painting order of collapsed table borders</title>
<link rel="author" title="Oriol Brufau" href="[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-tables/#border-collapsing">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#painting-order">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11570">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="
The collapsed border of the outer table is painted behind the collapsed border
of the inner table, when both tables have `display: inline-table`.
">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<table style="border-collapse: collapse; line-height: 0; display: inline-table">
<td style="border: 50px solid red; padding: 0">
<table style="border-collapse: collapse; margin: -50px; display: inline-table; vertical-align: top">
<td style="border: 50px solid green; padding: 0"></td>
</table>
</td>
</table>