-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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}
- Loading branch information
1 parent
bec7ffa
commit cda40b6
Showing
5 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!DOCTYPE html> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/resources/check-layout-th.js"></script> | ||
<link rel="author" title="David Grogan" href="[email protected]"> | ||
<link rel="author" title="Xiaocheng Hu" href="[email protected]"> | ||
<link rel="help" href="https://drafts.csswg.org/css-tables-3/#distributing-width-to-columns"> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/94"> | ||
|
||
<style> | ||
table { | ||
width: 200px; | ||
border-collapse: collapse; | ||
table-layout: auto; | ||
height: 20px; | ||
} | ||
|
||
td { | ||
padding: 0px; | ||
background: lime; | ||
outline: 1px solid blue; | ||
} | ||
</style> | ||
|
||
<h2>Calc width on col is treated as auto in auto tables</h2> | ||
|
||
<table id=theTable> | ||
<col style="width:calc(20% + 80px)"> | ||
<tr> | ||
<td data-expected-width=100></td> | ||
<td data-expected-width=100></td> | ||
</tr> | ||
</table> | ||
|
||
<script> | ||
checkLayout('#theTable') | ||
</script> |
5 changes: 3 additions & 2 deletions
5
css/css-tables/calc-percent-plus-0px.html → ...ss-tables/calc-percent-plus-0px-auto.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>Simple calc expression in table layout</title> | ||
<table border style="table-layout: fixed; width: 200px"> | ||
<tr> | ||
<td style="width: 50%">x</td> | ||
<td>y</td> | ||
<td>z</td> | ||
</tr> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>Simple calc expression in table layout</title> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/94"> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3482"> | ||
<link rel="match" href="calc-percent-plus-0px-fixed-ref.html"> | ||
<meta name="assert" content="calc(% + 0px) should be handled as calc(%) in fixed table layout."> | ||
<table border style="table-layout: fixed; width: 200px"> | ||
<tr> | ||
<td style="width: calc(50% + 0px)">x</td> | ||
<td>y</td> | ||
<td>z</td> | ||
</tr> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
<script src="/resources/check-layout-th.js"></script> | ||
<link rel="author" title="David Grogan" href="[email protected]"> | ||
<link rel="help" href="https://drafts.csswg.org/css-tables-3/#distributing-width-to-columns"> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/94"> | ||
|
||
<style> | ||
table { | ||
|