Files
sousa-gecko/testing/web-platform/tests/css/css-display/display-contents-table-003.html
T
Oriol Brufau 08d36f0768 Bug 2035672 [wpt PR 59503] - layout: Handle display: contents in all TraversalHandler, a=testonly
Automatic update from web-platform-tests
layout: Handle `display: contents` in all `TraversalHandler`

The `TraversalHandler` trait defined the methods that handle elements
with `display: contents` using a default implementation that was no-op.
Therefore, it was easy for types implementing the trait to forget to
handle `display: contents` correctly.

This patch removes the default implementation, and adds the missing
implementations for `TableRowBuilder`, `TableRowGroupBuilder`,
`TableColumnGroupBuilder` and `TableBuilderTraversal`.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

--

wpt-commits: e2581b64265ef20f0c05844748ff7112c418821f
wpt-pr: 59503
2026-05-08 08:37:10 +00:00

29 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>CSS Test: CSS display:contents in table layout</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-display-3/#valdef-display-contents">
<link rel="help" href="https://github.com/servo/servo/issues/42070">
<link rel="match" href="../reference/ref-filled-green-200px-square.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<style>
div { color: red; font: 40px / 1 Ahem; }
span { display: contents; color: green; }
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="display: table"><span>XXXXX</span></div>
<div style="display: table-caption"><span>XXXXX</span></div>
<div style="display: table-row-group"><span>XXXXX</span></div>
<div style="display: table-row"><span>XXXXX</span></div>
<div style="display: table-cell"><span>XXXXX</span></div>
<script src="/common/reftest-wait.js"></script>
<script>
document.fonts.ready.then(takeScreenshot);
</script>
</html>