mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1590894: Unprefix existing CSS4 system colors r=emilio
Expect forced-colors-mode-backplate tests to fail because they were passing for the wrong reason, and the backplate is now properly applied, causing them to fail. Remove tests for field and fieldtext from color-valid.html because they are tested again in system-color-valid.html. Differential Revision: https://phabricator.services.mozilla.com/D66879 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
e82bacbf03
commit
9f2ec488bb
@ -5269,6 +5269,10 @@ var gCSSProperties = {
|
||||
"hsl(0rad, 0%, 0%)",
|
||||
"hsl(0turn, 0%, 0%)",
|
||||
"hsl(1turn, 0%, 0%)",
|
||||
/* CSS4 System Colors */
|
||||
"canvastext",
|
||||
/* Preserve previously available specially prefixed colors */
|
||||
"-moz-default-color",
|
||||
],
|
||||
other_values: [
|
||||
"green",
|
||||
@ -5292,6 +5296,21 @@ var gCSSProperties = {
|
||||
"hsl(33rad 100% 90% / 4)",
|
||||
"hsl(0.33turn, 40%, 40%, 10%)",
|
||||
"hsl(63e292, 41%, 34%)",
|
||||
/* CSS4 System Colors */
|
||||
"canvas",
|
||||
"linktext",
|
||||
"visitedtext",
|
||||
"activetext",
|
||||
"buttonface",
|
||||
"field",
|
||||
"highlight",
|
||||
"highlighttext",
|
||||
"graytext",
|
||||
/* Preserve previously available specially prefixed colors */
|
||||
"-moz-activehyperlinktext",
|
||||
"-moz-default-background-color",
|
||||
"-moz-hyperlinktext",
|
||||
"-moz-visitedhyperlinktext",
|
||||
],
|
||||
invalid_values: [
|
||||
"#f",
|
||||
|
@ -140,8 +140,10 @@ pub enum SystemColor {
|
||||
Windowframe,
|
||||
Windowtext,
|
||||
MozButtondefault,
|
||||
MozDefaultColor,
|
||||
MozDefaultBackgroundColor,
|
||||
#[parse(aliases = "-moz-default-color")]
|
||||
Canvastext,
|
||||
#[parse(aliases = "-moz-default-background-color")]
|
||||
Canvas,
|
||||
MozDialog,
|
||||
MozDialogtext,
|
||||
/// Used to highlight valid regions to drop something onto.
|
||||
@ -230,9 +232,12 @@ pub enum SystemColor {
|
||||
/// colors.
|
||||
MozNativehyperlinktext,
|
||||
|
||||
MozHyperlinktext,
|
||||
MozActivehyperlinktext,
|
||||
MozVisitedhyperlinktext,
|
||||
#[parse(aliases = "-moz-hyperlinktext")]
|
||||
Linktext,
|
||||
#[parse(aliases = "-moz-activehyperlinktext")]
|
||||
Activetext,
|
||||
#[parse(aliases = "-moz-visitedhyperlinktext")]
|
||||
Visitedtext,
|
||||
|
||||
/// Combobox widgets
|
||||
MozComboboxtext,
|
||||
@ -253,11 +258,11 @@ impl SystemColor {
|
||||
let prefs = cx.device().pref_sheet_prefs();
|
||||
|
||||
convert_nscolor_to_computedcolor(match *self {
|
||||
SystemColor::MozDefaultColor => prefs.mDefaultColor,
|
||||
SystemColor::MozDefaultBackgroundColor => prefs.mDefaultBackgroundColor,
|
||||
SystemColor::MozHyperlinktext => prefs.mLinkColor,
|
||||
SystemColor::MozActivehyperlinktext => prefs.mActiveLinkColor,
|
||||
SystemColor::MozVisitedhyperlinktext => prefs.mVisitedLinkColor,
|
||||
SystemColor::Canvastext => prefs.mDefaultColor,
|
||||
SystemColor::Canvas => prefs.mDefaultBackgroundColor,
|
||||
SystemColor::Linktext => prefs.mLinkColor,
|
||||
SystemColor::Activetext => prefs.mActiveLinkColor,
|
||||
SystemColor::Visitedtext => prefs.mVisitedLinkColor,
|
||||
|
||||
_ => unsafe {
|
||||
bindings::Gecko_GetLookAndFeelSystemColor(*self as i32, cx.device().document())
|
||||
|
@ -1,16 +0,0 @@
|
||||
[system-color-valid.html]
|
||||
[e.style['color'\] = "VisitedText" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "ActiveText" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "CanvasText" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "LinkText" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "Canvas" should set the property value]
|
||||
expected: FAIL
|
||||
|
@ -0,0 +1,2 @@
|
||||
[forced-colors-mode-backplate-01.html]
|
||||
expected: FAIL
|
@ -0,0 +1,2 @@
|
||||
[forced-colors-mode-backplate-02.html]
|
||||
expected: FAIL
|
@ -0,0 +1,2 @@
|
||||
[forced-colors-mode-backplate-03.html]
|
||||
expected: FAIL
|
@ -0,0 +1,2 @@
|
||||
[forced-colors-mode-backplate-04.html]
|
||||
expected: FAIL
|
@ -0,0 +1,2 @@
|
||||
[forced-colors-mode-backplate-05.html]
|
||||
expected: FAIL
|
@ -0,0 +1,2 @@
|
||||
[forced-colors-mode-backplate-06.html]
|
||||
expected: FAIL
|
@ -0,0 +1,2 @@
|
||||
[forced-colors-mode-backplate-08.html]
|
||||
expected: FAIL
|
@ -0,0 +1,2 @@
|
||||
[forced-colors-mode-backplate-09.html]
|
||||
expected: FAIL
|
@ -0,0 +1,2 @@
|
||||
[forced-colors-mode-backplate-10.html]
|
||||
expected: FAIL
|
@ -28,8 +28,6 @@ test_valid_value("color", "rgb(-2, 3, 4)", "rgb(0, 3, 4)");
|
||||
test_valid_value("color", "rgb(100, 200, 300)", "rgb(100, 200, 255)");
|
||||
test_valid_value("color", "rgb(20, 10, 0, -10)", "rgba(20, 10, 0, 0)"); // Not supported by Edge/Safari.
|
||||
test_valid_value("color", "rgb(100%, 200%, 300%)", "rgb(255, 255, 255)");
|
||||
test_valid_value("color", "field");
|
||||
test_valid_value("color", "fieldtext");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user