From d51a6fb94484e37b4d715c956efee4526f072550 Mon Sep 17 00:00:00 2001 From: Anna Yeddi Date: Mon, 22 Jan 2024 18:40:57 +0000 Subject: [PATCH] Bug 1803933 - Make deprecated system colors ActiveBorder, InactiveBorder, ThreeDDarkShadow, ThreeDHighlight, ThreeDShadow, WindowFrame same as css-color-4 system color ButtonBorder. r=morgan,emilio Map: 1. `ActiveBorder`, 1. `InactiveBorder`, 1. `ThreeDDarkShadow`, 1. `ThreeDHighlight`, 1. `ThreeDShadow`, 1. `WindowFrame` to the `ButtonBorder` to conform with [css-color-4 Appendix A: Deprecated CSS System Colors](https://www.w3.org/TR/css-color-4/#deprecated-system-colors) and update expected WPT and dom/canvas test results. Differential Revision: https://phabricator.services.mozilla.com/D198313 --- dom/canvas/test/test_bug232227.html | 8 +++---- .../css-color/deprecated-sameas-001.html.ini | 2 -- .../css-color/deprecated-sameas-008.html.ini | 2 -- .../css-color/deprecated-sameas-016.html.ini | 2 -- .../css-color/deprecated-sameas-018.html.ini | 2 -- .../css-color/deprecated-sameas-020.html.ini | 2 -- .../css-color/deprecated-sameas-022.html.ini | 2 -- widget/nsXPLookAndFeel.cpp | 22 ++++++++++++++----- 8 files changed, 20 insertions(+), 22 deletions(-) delete mode 100644 testing/web-platform/meta/css/css-color/deprecated-sameas-001.html.ini delete mode 100644 testing/web-platform/meta/css/css-color/deprecated-sameas-008.html.ini delete mode 100644 testing/web-platform/meta/css/css-color/deprecated-sameas-016.html.ini delete mode 100644 testing/web-platform/meta/css/css-color/deprecated-sameas-018.html.ini delete mode 100644 testing/web-platform/meta/css/css-color/deprecated-sameas-020.html.ini delete mode 100644 testing/web-platform/meta/css/css-color/deprecated-sameas-022.html.ini diff --git a/dom/canvas/test/test_bug232227.html b/dom/canvas/test/test_bug232227.html index 83c27843403c..eee5b1be8d76 100644 --- a/dom/canvas/test/test_bug232227.html +++ b/dom/canvas/test/test_bug232227.html @@ -30,13 +30,13 @@ function runTest(testCanvasColors) { [ "Menu", 0xFF, 0xFF, 0xFF ], // deprecated, same as Canvas/Window (bug 1803930) [ "MenuText", 0x00, 0x00, 0x00 ], // deprecated, same as CanvasText/WindowText (bug 1873951) [ "Scrollbar", 0xFF, 0xFF, 0xFF ], // deprecated, same as Canvas/Window (bug 1803930) - [ "ThreeDDarkShadow", 0x69, 0x69, 0x69 ], + [ "ThreeDDarkShadow", 0xE3, 0xE3, 0xE3 ], // deprecated, same as ButtonBorder (bug 1803933) [ "ThreeDFace", 0xE9, 0xE9, 0xED ], // deprecated, same as ButtonFace (bug 1874064) - [ "ThreeDHighlight", 0xFF, 0xFF, 0xFF ], + [ "ThreeDHighlight", 0xE3, 0xE3, 0xE3 ], // deprecated, same as ButtonBorder (bug 1803933) [ "ThreeDLightShadow", 0xE3, 0xE3, 0xE3 ], - [ "ThreeDShadow", 0xA0, 0xA0, 0xA0 ], + [ "ThreeDShadow", 0xE3, 0xE3, 0xE3 ], // deprecated, same as ButtonBorder (bug 1803933) [ "Window", 0xFF, 0xFF, 0xFF ], - [ "WindowFrame", 0x64, 0x64, 0x64 ], + [ "WindowFrame", 0xE3, 0xE3, 0xE3 ], // deprecated, same as ButtonBorder (bug 1803933) [ "WindowText", 0x00, 0x00, 0x00 ], [ "-moz-ButtonHoverFace", 0xD0, 0xD0, 0xD7 ], [ "-moz-ButtonHoverText", 0x00, 0x00, 0x00 ], diff --git a/testing/web-platform/meta/css/css-color/deprecated-sameas-001.html.ini b/testing/web-platform/meta/css/css-color/deprecated-sameas-001.html.ini deleted file mode 100644 index 2efebf74c212..000000000000 --- a/testing/web-platform/meta/css/css-color/deprecated-sameas-001.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[deprecated-sameas-001.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/deprecated-sameas-008.html.ini b/testing/web-platform/meta/css/css-color/deprecated-sameas-008.html.ini deleted file mode 100644 index a075865eff97..000000000000 --- a/testing/web-platform/meta/css/css-color/deprecated-sameas-008.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[deprecated-sameas-008.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/deprecated-sameas-016.html.ini b/testing/web-platform/meta/css/css-color/deprecated-sameas-016.html.ini deleted file mode 100644 index b0bc519cb18a..000000000000 --- a/testing/web-platform/meta/css/css-color/deprecated-sameas-016.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[deprecated-sameas-016.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/deprecated-sameas-018.html.ini b/testing/web-platform/meta/css/css-color/deprecated-sameas-018.html.ini deleted file mode 100644 index 33379b9cdf8d..000000000000 --- a/testing/web-platform/meta/css/css-color/deprecated-sameas-018.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[deprecated-sameas-018.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/deprecated-sameas-020.html.ini b/testing/web-platform/meta/css/css-color/deprecated-sameas-020.html.ini deleted file mode 100644 index 4ca54444e6e0..000000000000 --- a/testing/web-platform/meta/css/css-color/deprecated-sameas-020.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[deprecated-sameas-020.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/deprecated-sameas-022.html.ini b/testing/web-platform/meta/css/css-color/deprecated-sameas-022.html.ini deleted file mode 100644 index f297a1d4606a..000000000000 --- a/testing/web-platform/meta/css/css-color/deprecated-sameas-022.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[deprecated-sameas-022.html] - expected: FAIL diff --git a/widget/nsXPLookAndFeel.cpp b/widget/nsXPLookAndFeel.cpp index 3401170744ec..2dd042cf77e1 100644 --- a/widget/nsXPLookAndFeel.cpp +++ b/widget/nsXPLookAndFeel.cpp @@ -623,8 +623,10 @@ nscolor nsXPLookAndFeel::GetStandinForNativeColor(ColorID aID, COLOR(TextSelectDisabledBackground, 0xAA, 0xAA, 0xAA) // Titlebar colors - COLOR(Activeborder, 0xB4, 0xB4, 0xB4) - COLOR(Inactiveborder, 0xB4, 0xB4, 0xB4) + // deprecated in CSS Color Level 4, same as Buttonborder: + COLOR(Activeborder, 0xE3, 0xE3, 0xE3) + // deprecated in CSS Color Level 4, same as Buttonborder: + COLOR(Inactiveborder, 0xE3, 0xE3, 0xE3) // deprecated in CSS Color Level 4, same as Canvas/Window: COLOR(Activecaption, 0xFF, 0xFF, 0xFF) // deprecated in CSS Color Level 4, same as Canvas/Window: @@ -667,17 +669,21 @@ nscolor nsXPLookAndFeel::GetStandinForNativeColor(ColorID aID, COLOR(Menutext, 0x00, 0x00, 0x00) // deprecated in CSS Color Level 4, same as Canvas/Window: COLOR(Scrollbar, 0xFF, 0xFF, 0xFF) - COLOR(Threeddarkshadow, 0x69, 0x69, 0x69) + // deprecated in CSS Color Level 4, same as Buttonborder: + COLOR(Threeddarkshadow, 0xE3, 0xE3, 0xE3) // deprecated in CSS Color Level 4, same as Buttonface: COLOR(Threedface, 0xE9, 0xE9, 0xED) - COLOR(Threedhighlight, 0xFF, 0xFF, 0xFF) + // deprecated in CSS Color Level 4, same as Buttonborder: + COLOR(Threedhighlight, 0xE3, 0xE3, 0xE3) COLOR(Threedlightshadow, 0xE3, 0xE3, 0xE3) - COLOR(Threedshadow, 0xA0, 0xA0, 0xA0) + // deprecated in CSS Color Level 4, same as Buttonborder: + COLOR(Threedshadow, 0xE3, 0xE3, 0xE3) COLOR(Buttonborder, 0xE3, 0xE3, 0xE3) COLOR(Mark, 0xFF, 0xFF, 0x00) COLOR(Marktext, 0x00, 0x00, 0x00) COLOR(Window, 0xFF, 0xFF, 0xFF) - COLOR(Windowframe, 0x64, 0x64, 0x64) + // deprecated in CSS Color Level 4, same as Buttonborder: + COLOR(Windowframe, 0xE3, 0xE3, 0xE3) COLOR(Windowtext, 0x00, 0x00, 0x00) COLOR(Field, 0xFF, 0xFF, 0xFF) COLORA(MozDisabledfield, 0xFF, 0xFF, 0xFF, 128) @@ -1277,6 +1283,10 @@ static constexpr std::bitset sNonNativeThemeStandinColors{ // https://drafts.csswg.org/css-color-4/#deprecated-system-colors // should match ButtonFace: BIT_FOR(Buttonhighlight) | BIT_FOR(Buttonshadow) | BIT_FOR(Threedface) | + // should match ButtonBorder: + BIT_FOR(Activeborder) | BIT_FOR(Inactiveborder) | + BIT_FOR(Threeddarkshadow) | BIT_FOR(Threedhighlight) | + BIT_FOR(Threedshadow) | BIT_FOR(Windowframe) | // should match GrayText: BIT_FOR(Inactivecaptiontext) | // should match Canvas/Window: