-
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.
[css-tables] Add some subpixel collapsed border tests
This CL contains tests only, no behavior change. Chrome passes 001. Firefox passes 001 and 002. Safari hidpi passes 001, 002, and 003. Chrome probably passes 001 but fails 002 because of LayoutUnit's 1/64 pixel precision but that's not confirmed. Note that these tests will become invalid if the proposal in w3c/csswg-drafts#606 is adopted. Bug: 377847 Change-Id: Ifc9e8f9f878f7462cb949670350eadb17c7c2940
- Loading branch information
1 parent
6e07835
commit b2cb62f
Showing
5 changed files
with
134 additions
and
0 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,30 @@ | ||
<!DOCTYPE html> | ||
<link rel="author" title="David Grogan" href="mailto:[email protected]"> | ||
<link rel="help" href="https://www.w3.org/TR/CSS22/tables.html#collapsing-borders"> | ||
<link rel="help" href="https://drafts.csswg.org/css-tables-3/#border-conflict-resolution-algorithm"> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/606"> | ||
<link rel="match" href="subpixel-collapsed-borders-ref.html"> | ||
<meta name="flags" content="" /> | ||
<meta name="assert" content="When collapsed border tables have border widths larger than cells', the table border wins." /> | ||
|
||
<style> | ||
table { | ||
border: 5px solid green; | ||
border-collapse: collapse; | ||
} | ||
|
||
td { | ||
width: 50px; | ||
height: 50px; | ||
border: 4.95px solid red; | ||
} | ||
</style> | ||
|
||
<p>There should be a square with a green border, not a red border. | ||
</p> | ||
|
||
<table> | ||
<tr> | ||
<td></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,30 @@ | ||
<!DOCTYPE html> | ||
<link rel="author" title="David Grogan" href="mailto:[email protected]"> | ||
<link rel="help" href="https://www.w3.org/TR/CSS22/tables.html#collapsing-borders"> | ||
<link rel="help" href="https://drafts.csswg.org/css-tables-3/#border-conflict-resolution-algorithm"> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/606"> | ||
<link rel="match" href="subpixel-collapsed-borders-ref.html"> | ||
<meta name="flags" content="" /> | ||
<meta name="assert" content="When collapsed border tables have border widths larger than cells', the table border wins even when the cell border is merely 0.01 pixels narrower" /> | ||
|
||
<style> | ||
table { | ||
border: 5px solid green; | ||
border-collapse: collapse; | ||
} | ||
|
||
td { | ||
width: 50px; | ||
height: 50px; | ||
border: 4.99px solid red; | ||
} | ||
</style> | ||
|
||
<p>There should be a square with a green border, not a red border. | ||
</p> | ||
|
||
<table> | ||
<tr> | ||
<td></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,22 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
table { | ||
border: 5.95px solid green; | ||
border-collapse: collapse; | ||
} | ||
|
||
td { | ||
width: 50px; | ||
height: 50px; | ||
border: 1px solid red; | ||
} | ||
</style> | ||
|
||
<p>There should be a square with a green border, not a red border. | ||
</p> | ||
|
||
<table> | ||
<tr> | ||
<td></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,30 @@ | ||
<!DOCTYPE html> | ||
<link rel="author" title="David Grogan" href="mailto:[email protected]"> | ||
<link rel="help" href="https://www.w3.org/TR/CSS22/tables.html#collapsing-borders"> | ||
<link rel="help" href="https://drafts.csswg.org/css-tables-3/#border-conflict-resolution-algorithm"> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/606"> | ||
<link rel="match" href="subpixel-collapsed-borders-003-ref.html"> | ||
<meta name="flags" content="" /> | ||
<meta name="assert" content="When collapsed border tables have border widths larger than cells', the table border wins even when the floored table border is the same size as the cell's." /> | ||
|
||
<style> | ||
table { | ||
border: 5.95px solid green; | ||
border-collapse: collapse; | ||
} | ||
|
||
td { | ||
width: 50px; | ||
height: 50px; | ||
border: 5px solid red; | ||
} | ||
</style> | ||
|
||
<p>There should be a square with a green border, not a red border. | ||
</p> | ||
|
||
<table> | ||
<tr> | ||
<td></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,22 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
table { | ||
border: 5px solid green; | ||
border-collapse: collapse; | ||
} | ||
|
||
td { | ||
width: 50px; | ||
height: 50px; | ||
border: 1px solid red; | ||
} | ||
</style> | ||
|
||
<p>There should be a square with a green border, not a red border. | ||
</p> | ||
|
||
<table> | ||
<tr> | ||
<td></td> | ||
</tr> | ||
</table> |