Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
<table> bordercolor attribute should not create a visible border
https://bugs.webkit.org/show_bug.cgi?id=256850 rdar://109436009 Reviewed by Tim Nguyen. A single bordercolor attribute on a table should not affect the visibility of the border, which is none by default. This is aligned with Firefox and what the HTML spec is prescribing. > treat the [bordercolor] attribute as a presentational hint setting > the element's 'border-top-color', 'border-right-color', > 'border-bottom-color', and 'border-left-color' properties to the > resulting color." > — https://html.spec.whatwg.org/multipage/rendering.html#tables-2 It imports also one knew WPT test WPT: 3d9cd84 There is a followup bug for tests failing https://bugs.webkit.org/show_bug.cgi?id=257254 This is the next step. * LayoutTests/fast/table/border-changes-expected.txt: * LayoutTests/fast/table/border-changes.html: * LayoutTests/imported/w3c/resources/import-expectations.json: * LayoutTests/imported/w3c/resources/resource-files.json: * LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/colgroup_valign_bottom-expected.xhtml: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/colgroup_valign_top-expected.xhtml: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/table-bordercolor-001-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/table-bordercolor-001-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/table-bordercolor-001.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/w3c-import.log: * LayoutTests/platform/glib/tables/mozilla/bugs/bug1163-1-expected.txt: * LayoutTests/platform/glib/tables/mozilla/bugs/bug131020_iframe-expected.txt: * LayoutTests/platform/glib/tables/mozilla/bugs/bug131020-expected.txt: * LayoutTests/platform/gtk/tables/mozilla/bugs/bug1163-1-expected.png: Removed. * LayoutTests/platform/ios-wk2/tables/mozilla/bugs/bug1163-1-expected.txt: Added. * LayoutTests/platform/ios-wk2/tables/mozilla/bugs/bug131020_iframe-expected.txt: Added. * LayoutTests/platform/ios-wk2/tables/mozilla/bugs/bug131020-expected.txt: Added. * LayoutTests/platform/mac/tables/mozilla/bugs/bug1163-1-expected.png: Removed. * LayoutTests/platform/mac/tables/mozilla/bugs/bug131020_iframe-expected.txt: Removed. * LayoutTests/platform/mac/tables/mozilla/bugs/bug131020-expected.txt: Removed. * LayoutTests/platform/wincairo/tables/mozilla/bugs/bug1163-1-expected.txt: Removed. * LayoutTests/platform/wincairo/tables/mozilla/bugs/bug131020_iframe-expected.txt: Removed. * LayoutTests/platform/wincairo/tables/mozilla/bugs/bug131020-expected.txt: Removed. * LayoutTests/platform/wpe/tables/mozilla/bugs/bug1163-1-expected.txt: Removed. * LayoutTests/platform/wpe/tables/mozilla/bugs/bug131020_iframe-expected.txt: Removed. * LayoutTests/platform/wpe/tables/mozilla/bugs/bug131020-expected.txt: Removed. * LayoutTests/tables/mozilla/bugs/bug1163-1-expected.txt: * LayoutTests/tables/mozilla/bugs/bug131020_iframe-expected.txt: * LayoutTests/tables/mozilla/bugs/bug131020-expected.txt: * LayoutTests/TestExpectations: * Source/WebCore/html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::additionalPresentationalHintStyle): (WebCore::HTMLTableElement::attributeChanged): (WebCore::HTMLTableElement::cellBorders const): * Source/WebCore/html/HTMLTableElement.h: Canonical link: https://commits.webkit.org/265670@main
- Loading branch information
Showing
27 changed files
with
365 additions
and
1,049 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
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
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
Binary file added
BIN
+588 Bytes
...m-tests/html/rendering/non-replaced-elements/tables/colgroup_valign_bottom-expected.xhtml
Binary file not shown.
Binary file added
BIN
+588 Bytes
...form-tests/html/rendering/non-replaced-elements/tables/colgroup_valign_top-expected.xhtml
Binary file not shown.
26 changes: 26 additions & 0 deletions
26
...orm-tests/html/rendering/non-replaced-elements/tables/table-bordercolor-001-expected.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>Reference case for table bordercolor attribute behaving like border-color property</title> | ||
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> | ||
<link rel="author" title="Mozilla" href="https://www.mozilla.org/"> | ||
<style> | ||
table { margin: 5px } | ||
</style> | ||
<table> | ||
<td>I should not have a border.</td> | ||
</table> | ||
<table> | ||
<td>I should not have a border.</td> | ||
</table> | ||
<table> | ||
<td>I should not have a border.</td> | ||
</table> | ||
<table> | ||
<td>I should not have a border.</td> | ||
</table> | ||
<table style="border-color: lime; border-style: solid"> | ||
<td>I should have a border.</td> | ||
</table> | ||
<table style="border-color: lime; border-style: solid"> | ||
<td>I should have a border.</td> | ||
</table> |
26 changes: 26 additions & 0 deletions
26
...platform-tests/html/rendering/non-replaced-elements/tables/table-bordercolor-001-ref.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>Reference case for table bordercolor attribute behaving like border-color property</title> | ||
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> | ||
<link rel="author" title="Mozilla" href="https://www.mozilla.org/"> | ||
<style> | ||
table { margin: 5px } | ||
</style> | ||
<table> | ||
<td>I should not have a border.</td> | ||
</table> | ||
<table> | ||
<td>I should not have a border.</td> | ||
</table> | ||
<table> | ||
<td>I should not have a border.</td> | ||
</table> | ||
<table> | ||
<td>I should not have a border.</td> | ||
</table> | ||
<table style="border-color: lime; border-style: solid"> | ||
<td>I should have a border.</td> | ||
</table> | ||
<table style="border-color: lime; border-style: solid"> | ||
<td>I should have a border.</td> | ||
</table> |
29 changes: 29 additions & 0 deletions
29
...web-platform-tests/html/rendering/non-replaced-elements/tables/table-bordercolor-001.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>Test for table bordercolor attribute behaving like border-color property</title> | ||
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> | ||
<link rel="author" title="Mozilla" href="https://www.mozilla.org/"> | ||
<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#tables-2"> | ||
<link rel="match" href="table-bordercolor-001-ref.html"> | ||
<meta name="assert" content="bordercolor is treated as a presentation hint, equivalent to setting the border-color property"> | ||
<style> | ||
table { margin: 5px } | ||
</style> | ||
<table bordercolor="red"> | ||
<td>I should not have a border.</td> | ||
</table> | ||
<table style="border-color: red"> | ||
<td>I should not have a border.</td> | ||
</table> | ||
<table bordercolor="red" style="border-width: 10px"> | ||
<td>I should not have a border.</td> | ||
</table> | ||
<table style="border-color: red; border-width: 10px"> | ||
<td>I should not have a border.</td> | ||
</table> | ||
<table bordercolor="lime" style="border-style: solid"> | ||
<td>I should have a border.</td> | ||
</table> | ||
<table style="border-color: lime; border-style: solid"> | ||
<td>I should have a border.</td> | ||
</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
Oops, something went wrong.