Skip to content

Commit caff0be

Browse files
xiaochenghmoz-wptsync-bot
authored andcommitted
Bug 1585178 [wpt PR 19424] - Add/Revise WPT to reflect resolution of calc() in table layout, a=testonly
Automatic update from web-platform-tests Add/Revise WPT to reflect resolution of calc() in table layout w3c/csswg-drafts#94 made a resolution that "Any math expression of a complex type is treated as auto. Simple typed things continue to work as today." This patch adds new tests and revises existing tests to reflect the resolution. Bug: 382725 Change-Id: I522799b51fdd4a7cfa66e137ae31c68aaf2dea73 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1832619 Commit-Queue: Xiaocheng Hu <[email protected]> Reviewed-by: Aleks Totic <[email protected]> Cr-Commit-Position: refs/heads/master@{#701597} -- wpt-commits: cda40b6ff20c841a6195e95387d09072db8fd6e3 wpt-pr: 19424
1 parent 2c76e7b commit caff0be

File tree

5 files changed

+65
-2
lines changed

5 files changed

+65
-2
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!DOCTYPE html>
2+
<script src="/resources/testharness.js"></script>
3+
<script src="/resources/testharnessreport.js"></script>
4+
<script src="/resources/check-layout-th.js"></script>
5+
<link rel="author" title="David Grogan" href="[email protected]">
6+
<link rel="author" title="Xiaocheng Hu" href="[email protected]">
7+
<link rel="help" href="https://drafts.csswg.org/css-tables-3/#distributing-width-to-columns">
8+
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/94">
9+
10+
<style>
11+
table {
12+
width: 200px;
13+
border-collapse: collapse;
14+
table-layout: auto;
15+
height: 20px;
16+
}
17+
18+
td {
19+
padding: 0px;
20+
background: lime;
21+
outline: 1px solid blue;
22+
}
23+
</style>
24+
25+
<h2>Calc width on col is treated as auto in auto tables</h2>
26+
27+
<table id=theTable>
28+
<col style="width:calc(20% + 80px)">
29+
<tr>
30+
<td data-expected-width=100></td>
31+
<td data-expected-width=100></td>
32+
</tr>
33+
</table>
34+
35+
<script>
36+
checkLayout('#theTable')
37+
</script>

testing/web-platform/tests/css/css-tables/calc-percent-plus-0px.html renamed to testing/web-platform/tests/css/css-tables/calc-percent-plus-0px-auto.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<!DOCTYPE html>
22
<meta charset="utf-8">
33
<title>Simple calc expression in table layout</title>
4+
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/94">
45
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3482">
56
<link rel="match" href="calc-percent-plus-0px-ref.html">
6-
<meta name="assert" content="calc(% + 0px) should be handled as calc(%) in table layout.">
7-
<table border>
7+
<meta name="assert" content="calc(% + 0px) should be handled as calc(%) in auto table layout.">
8+
<table border style="table-layout: auto">
89
<tr>
910
<td style="width: calc(50% + 0px)">x</td>
1011
<td style="width: 100px">y</td>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<meta charset="utf-8">
3+
<title>Simple calc expression in table layout</title>
4+
<table border style="table-layout: fixed; width: 200px">
5+
<tr>
6+
<td style="width: 50%">x</td>
7+
<td>y</td>
8+
<td>z</td>
9+
</tr>
10+
</table>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<meta charset="utf-8">
3+
<title>Simple calc expression in table layout</title>
4+
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/94">
5+
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3482">
6+
<link rel="match" href="calc-percent-plus-0px-fixed-ref.html">
7+
<meta name="assert" content="calc(% + 0px) should be handled as calc(%) in fixed table layout.">
8+
<table border style="table-layout: fixed; width: 200px">
9+
<tr>
10+
<td style="width: calc(50% + 0px)">x</td>
11+
<td>y</td>
12+
<td>z</td>
13+
</tr>
14+
</table>

testing/web-platform/tests/css/css-tables/fixed-layout-calc-width-001.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<script src="/resources/check-layout-th.js"></script>
55
<link rel="author" title="David Grogan" href="[email protected]">
66
<link rel="help" href="https://drafts.csswg.org/css-tables-3/#distributing-width-to-columns">
7+
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/94">
78

89
<style>
910
table {

0 commit comments

Comments
 (0)