Skip to content

Commit

Permalink
Fix deprecated system colors to match same-as requirements in CSS Col…
Browse files Browse the repository at this point in the history
…or 4

https://bugs.webkit.org/show_bug.cgi?id=245609

Reviewed by Aditya Keerthi.

CSS Color 4 deprecates some of the system colors
and adds a "same-as" requirement for each of them.

https://drafts.csswg.org/css-color-4/#deprecated-system-colors

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/system-color-compute-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-color/system-color-compute-expected.txt: Removed.
* LayoutTests/platform/glib/tables/mozilla/bugs/bug103533-expected.txt:
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/ios-wk2/TestExpectations:
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-color/system-color-compute-expected.txt: Removed.
* LayoutTests/platform/ios/tables/mozilla/bugs/bug103533-expected.txt:
* LayoutTests/platform/mac/TestExpectations:
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/css/css-color/system-color-compute-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-color/system-color-compute-expected.txt.
* LayoutTests/platform/mac/tables/mozilla/bugs/bug103533-expected.txt:
* Source/WebCore/rendering/RenderTheme.cpp:
(WebCore::RenderTheme::systemColor const):
* Source/WebCore/rendering/RenderThemeAdwaita.cpp:
(WebCore::RenderThemeAdwaita::systemColor const):
* Source/WebCore/rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemColor const):

Canonical link: https://commits.webkit.org/268124@main
  • Loading branch information
obyknovenius committed Sep 19, 2023
1 parent 7be6789 commit a396d02
Show file tree
Hide file tree
Showing 14 changed files with 104 additions and 152 deletions.
16 changes: 0 additions & 16 deletions LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -4611,22 +4611,6 @@ webkit.org/b/214453 imported/w3c/web-platform-tests/css/css-align/baseline-rules

webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/at-color-profile-001.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/currentcolor-003.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-001.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-002.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-003.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-004.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-005.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-006.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-010.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-011.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-013.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-014.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-015.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-016.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-020.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-021.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-022.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-023.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/lch-009.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/lch-010.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/oklch-009.html [ ImageOnlyFailure ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@ Parent
Specified Child
Inherit Child

FAIL color-scheme property affects Menu system color keyword assert_not_equals: got disallowed value "rgb(246, 246, 246)"
FAIL System color doesn't compute to itself on color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS color-scheme property affects Menu system color keyword
PASS System color doesn't compute to itself on color
PASS Inherited system color keyword is observable on color
FAIL System color doesn't compute to itself on background-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS System color doesn't compute to itself on background-color
PASS Inherited system color keyword is observable on background-color
FAIL System color doesn't compute to itself on box-shadow assert_not_equals: got disallowed value "rgb(246, 246, 246) 2px 2px 0px 0px"
PASS System color doesn't compute to itself on box-shadow
PASS Inherited system color keyword is observable on box-shadow
FAIL System color doesn't compute to itself on text-shadow assert_not_equals: got disallowed value "rgb(246, 246, 246) 2px 2px 0px"
PASS System color doesn't compute to itself on text-shadow
PASS Inherited system color keyword is observable on text-shadow
FAIL System color doesn't compute to itself on border-left-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS System color doesn't compute to itself on border-left-color
PASS Inherited system color keyword is observable on border-left-color
FAIL System color doesn't compute to itself on border-top-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS System color doesn't compute to itself on border-top-color
PASS Inherited system color keyword is observable on border-top-color
FAIL System color doesn't compute to itself on border-right-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS System color doesn't compute to itself on border-right-color
PASS Inherited system color keyword is observable on border-right-color
FAIL System color doesn't compute to itself on border-bottom-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS System color doesn't compute to itself on border-bottom-color
PASS Inherited system color keyword is observable on border-bottom-color
FAIL System color doesn't compute to itself on column-rule-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS System color doesn't compute to itself on column-rule-color
PASS Inherited system color keyword is observable on column-rule-color
FAIL System color doesn't compute to itself on outline-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS System color doesn't compute to itself on outline-color
PASS Inherited system color keyword is observable on outline-color
FAIL System color doesn't compute to itself on caret-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS System color doesn't compute to itself on caret-color
PASS Inherited system color keyword is observable on caret-color
FAIL System color doesn't compute to itself on fill assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS System color doesn't compute to itself on fill
PASS Inherited system color keyword is observable on fill
FAIL System color doesn't compute to itself on stroke assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS System color doesn't compute to itself on stroke
PASS Inherited system color keyword is observable on stroke

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ layer at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderTable {TABLE} at (0,0) size 216x24 [bgcolor=#6363CE]
RenderTable {TABLE} at (0,0) size 216x24 [bgcolor=#FFFFFF]
RenderTableSection {TBODY} at (0,0) size 216x24
RenderTableRow {TR} at (0,2) size 216x20
RenderTableCell {TD} at (2,2) size 212x20 [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (1,1) size 210x17
text run at (1,1) width 210: "This table should NOT be visible"
RenderTable {TABLE} at (0,24) size 216x24 [bgcolor=#6363CE]
RenderTable {TABLE} at (0,24) size 216x24 [bgcolor=#FFFFFF]
RenderTableSection {TBODY} at (0,0) size 216x24
RenderTableRow {TR} at (0,2) size 216x20
RenderTableCell {TD} at (2,2) size 212x20 [r=0 c=0 rs=1 cs=1]
Expand Down
3 changes: 0 additions & 3 deletions LayoutTests/platform/gtk/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -2473,9 +2473,6 @@ imported/w3c/web-platform-tests/css/css-tables/tentative/caption.html [ Failure
imported/w3c/web-platform-tests/css/css-tables/tentative/colgroup-col.html [ Failure ]
imported/w3c/web-platform-tests/css/css-tables/tentative/table-quirks.html [ Failure ]

imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-018.html [ Failure ImageOnlyFailure Timeout ]
imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-019.html [ Failure ]
imported/w3c/web-platform-tests/css/css-color/system-color-compute.html [ Failure ]
imported/w3c/web-platform-tests/css/css-color/system-color-consistency.html [ Failure ]

# Timeout
Expand Down
4 changes: 0 additions & 4 deletions LayoutTests/platform/ios-wk2/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -2397,12 +2397,8 @@ fast/forms/date/date-validity-badinput.html [ Skip ]
fast/forms/datetimelocal/datetimelocal-validity-badinput.html [ Skip ]
fast/forms/time/time-validity-badinput.html [ Skip ]

imported/w3c/web-platform-tests/css/css-color/system-color-compute.html [ Failure ]
imported/w3c/web-platform-tests/css/css-color/system-color-consistency.html [ Failure ]

webkit.org/b/259085 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-018.html [ ImageOnlyFailure ]
webkit.org/b/259085 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-019.html [ ImageOnlyFailure ]

# Skipping scrollbar-width tests that don't work with overlay scrollbars
imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-width-001.html [ Skip ]
imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-width-002.html [ Skip ]
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ layer at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderTable {TABLE} at (0,0) size 219x26 [bgcolor=#6363CE]
RenderTable {TABLE} at (0,0) size 219x26 [bgcolor=#FFFFFF]
RenderTableSection {TBODY} at (0,0) size 219x26
RenderTableRow {TR} at (0,2) size 219x22
RenderTableCell {TD} at (2,2) size 215x22 [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (1,1) size 213x19
text run at (1,1) width 213: "This table should NOT be visible"
RenderTable {TABLE} at (0,26) size 219x26 [bgcolor=#6363CE]
RenderTable {TABLE} at (0,26) size 219x26 [bgcolor=#FFFFFF]
RenderTableSection {TBODY} at (0,0) size 219x26
RenderTableRow {TR} at (0,2) size 219x22
RenderTableCell {TD} at (2,2) size 215x22 [r=0 c=0 rs=1 cs=1]
Expand Down
18 changes: 18 additions & 0 deletions LayoutTests/platform/mac/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -2878,3 +2878,21 @@ webkit.org/b/261531 [ Monterey ] imported/w3c/web-platform-tests/css/css-transfo
webkit.org/b/261531 [ Monterey ] imported/w3c/web-platform-tests/css/css-transforms/transform3d-sorting-003.html [ ImageOnlyFailure ]
webkit.org/b/261531 [ Monterey ] imported/w3c/web-platform-tests/css/css-transforms/transform3d-scale-004.html [ ImageOnlyFailure ]
webkit.org/b/261531 [ Monterey ] imported/w3c/web-platform-tests/css/css-transforms/preserve3d-and-filter-no-perspective.html [ ImageOnlyFailure ]

# Deprecated CSS System Colors https://drafts.csswg.org/css-color-4/#deprecated-system-colors
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-001.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-002.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-003.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-004.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-005.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-006.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-010.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-011.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-013.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-014.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-015.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-016.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-020.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-021.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-022.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-023.html [ ImageOnlyFailure ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Parent
Specified Child
Inherit Child

FAIL color-scheme property affects Menu system color keyword assert_not_equals: got disallowed value "rgb(246, 246, 246)"
FAIL System color doesn't compute to itself on color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS Inherited system color keyword is observable on color
FAIL System color doesn't compute to itself on background-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS Inherited system color keyword is observable on background-color
FAIL System color doesn't compute to itself on box-shadow assert_not_equals: got disallowed value "rgb(246, 246, 246) 2px 2px 0px 0px"
PASS Inherited system color keyword is observable on box-shadow
FAIL System color doesn't compute to itself on text-shadow assert_not_equals: got disallowed value "rgb(246, 246, 246) 2px 2px 0px"
PASS Inherited system color keyword is observable on text-shadow
FAIL System color doesn't compute to itself on border-left-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS Inherited system color keyword is observable on border-left-color
FAIL System color doesn't compute to itself on border-top-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS Inherited system color keyword is observable on border-top-color
FAIL System color doesn't compute to itself on border-right-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS Inherited system color keyword is observable on border-right-color
FAIL System color doesn't compute to itself on border-bottom-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS Inherited system color keyword is observable on border-bottom-color
FAIL System color doesn't compute to itself on column-rule-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS Inherited system color keyword is observable on column-rule-color
FAIL System color doesn't compute to itself on outline-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS Inherited system color keyword is observable on outline-color
FAIL System color doesn't compute to itself on caret-color assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS Inherited system color keyword is observable on caret-color
FAIL System color doesn't compute to itself on fill assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS Inherited system color keyword is observable on fill
FAIL System color doesn't compute to itself on stroke assert_not_equals: got disallowed value "rgb(246, 246, 246)"
PASS Inherited system color keyword is observable on stroke

Loading

0 comments on commit a396d02

Please sign in to comment.