Backed out changeset ec25a8482342 (bug 1592389) for mochitest failure at layout/style/test/test_value_computation.html. On a CLOSED TREE

This commit is contained in:
Daniel Varga 2019-10-30 10:17:29 +02:00
Родитель 9b82b18b44
Коммит b747b90cd8
11 изменённых файлов: 27 добавлений и 33 удалений

Просмотреть файл

@ -4076,9 +4076,9 @@ void nsTextPaintStyle::InitCommonColors() {
mFrameBackgroundColor = NS_ComposeColors(defaultBgColor, bgColor);
mSystemFieldForegroundColor =
LookAndFeel::GetColor(LookAndFeel::ColorID::Fieldtext);
LookAndFeel::GetColor(LookAndFeel::ColorID::MozFieldtext);
mSystemFieldBackgroundColor =
LookAndFeel::GetColor(LookAndFeel::ColorID::Field);
LookAndFeel::GetColor(LookAndFeel::ColorID::MozField);
if (bgFrame->IsThemed()) {
// Assume a native widget has sufficient contrast always

Просмотреть файл

@ -5196,8 +5196,6 @@ var gCSSProperties = {
"hsl(1turn, 0%, 0%)",
],
other_values: [
"field",
"fieldtext",
"green",
"#f3c",
"#fed292",

Просмотреть файл

@ -119,10 +119,6 @@ pub enum SystemColor {
Buttonshadow,
Buttontext,
Captiontext,
#[parse(aliases = "-moz-field")]
Field,
#[parse(aliases = "-moz-fieldtext")]
Fieldtext,
Graytext,
Highlight,
Highlighttext,
@ -143,6 +139,8 @@ pub enum SystemColor {
Windowframe,
Windowtext,
MozButtondefault,
MozField,
MozFieldtext,
MozDialog,
MozDialogtext,
/// Used to highlight valid regions to drop something onto.

Просмотреть файл

@ -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>

Просмотреть файл

@ -248,10 +248,10 @@ nsresult nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) {
break;
case ColorID::MozEventreerow:
case ColorID::Field:
case ColorID::MozField:
aColor = mSystemColors.colorBackground;
break;
case ColorID::Fieldtext:
case ColorID::MozFieldtext:
aColor = mSystemColors.textColorPrimary;
break;
case ColorID::MozDialog:

Просмотреть файл

@ -328,11 +328,11 @@ nsresult nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) {
aColor = mColorWindowFrame;
break;
case ColorID::Window:
case ColorID::Field:
case ColorID::MozField:
case ColorID::MozCombobox:
aColor = NS_RGB(0xff, 0xff, 0xff);
break;
case ColorID::Fieldtext:
case ColorID::MozFieldtext:
case ColorID::MozComboboxtext:
aColor = mColorFieldText;
break;

Просмотреть файл

@ -218,7 +218,7 @@ nsresult nsLookAndFeel::InitCellHighlightColors() {
// on top of another background
int32_t minLuminosityDifference = NS_SUFFICIENT_LUMINOSITY_DIFFERENCE / 5;
int32_t backLuminosityDifference =
NS_LUMINOSITY_DIFFERENCE(mMozWindowBackground, mFieldBackground);
NS_LUMINOSITY_DIFFERENCE(mMozWindowBackground, mMozFieldBackground);
if (backLuminosityDifference >= minLuminosityDifference) {
mMozCellHighlightBackground = mMozWindowBackground;
mMozCellHighlightText = mMozWindowText;
@ -227,8 +227,8 @@ nsresult nsLookAndFeel::InitCellHighlightColors() {
uint16_t hue, sat, luminance;
uint8_t alpha;
mMozCellHighlightBackground = mFieldBackground;
mMozCellHighlightText = mFieldText;
mMozCellHighlightBackground = mMozFieldBackground;
mMozCellHighlightText = mMozFieldText;
NS_RGB2HSV(mMozCellHighlightBackground, hue, sat, luminance, alpha);
@ -425,11 +425,11 @@ nsresult nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) {
break;
case ColorID::MozEventreerow:
case ColorID::Field:
aColor = mFieldBackground;
case ColorID::MozField:
aColor = mMozFieldBackground;
break;
case ColorID::Fieldtext:
aColor = mFieldText;
case ColorID::MozFieldtext:
aColor = mMozFieldText;
break;
case ColorID::MozButtondefault:
// default button border color
@ -1062,9 +1062,9 @@ void nsLookAndFeel::EnsureInit() {
style = GetStyleContext(MOZ_GTK_TEXT_VIEW_TEXT);
gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
ApplyColorOver(color, &bgColor);
mFieldBackground = GDK_RGBA_TO_NS_RGBA(bgColor);
mMozFieldBackground = GDK_RGBA_TO_NS_RGBA(bgColor);
gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
mFieldText = GDK_RGBA_TO_NS_RGBA(color);
mMozFieldText = GDK_RGBA_TO_NS_RGBA(color);
// Selected text and background
gtk_style_context_get_background_color(

Просмотреть файл

@ -72,8 +72,8 @@ class nsLookAndFeel final : public nsXPLookAndFeel {
nscolor mNativeHyperLinkText = kBlack;
nscolor mComboBoxText = kBlack;
nscolor mComboBoxBackground = kWhite;
nscolor mFieldText = kBlack;
nscolor mFieldBackground = kWhite;
nscolor mMozFieldText = kBlack;
nscolor mMozFieldBackground = kWhite;
nscolor mMozWindowText = kBlack;
nscolor mMozWindowBackground = kWhite;
nscolor mMozWindowActiveBorder = kBlack;

Просмотреть файл

@ -27,8 +27,8 @@ nsresult HeadlessLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) {
switch (aID) {
// Override the solid black that GetStandinForNativeColor provides for
// FieldText, to match our behavior under the real GTK.
case ColorID::Fieldtext:
// -moz-FieldText, to match our behavior under the real GTK.
case ColorID::MozFieldtext:
aColor = NS_RGB(0x21, 0x21, 0x21);
break;

Просмотреть файл

@ -629,10 +629,10 @@ nscolor nsXPLookAndFeel::GetStandinForNativeColor(ColorID aID) {
case ColorID::MozButtondefault:
result = NS_RGB(0x69, 0x69, 0x69);
break;
case ColorID::Field:
case ColorID::MozField:
result = NS_RGB(0xFF, 0xFF, 0xFF);
break;
case ColorID::Fieldtext:
case ColorID::MozFieldtext:
result = NS_RGB(0x00, 0x00, 0x00);
break;
case ColorID::MozDialog:
@ -837,8 +837,8 @@ nsresult nsXPLookAndFeel::GetColorImpl(ColorID aID,
// from the CSS3 working draft (not yet finalized)
// http://www.w3.org/tr/2000/wd-css3-userint-20000216.html#color
case ColorID::Field:
case ColorID::Fieldtext:
case ColorID::MozField:
case ColorID::MozFieldtext:
aResult = NS_RGB(0xff, 0x00, 0xff);
break;

Просмотреть файл

@ -292,11 +292,11 @@ nsresult nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) {
break;
case ColorID::MozEventreerow:
case ColorID::MozOddtreerow:
case ColorID::Field:
case ColorID::MozField:
case ColorID::MozCombobox:
idx = COLOR_WINDOW;
break;
case ColorID::Fieldtext:
case ColorID::MozFieldtext:
case ColorID::MozComboboxtext:
idx = COLOR_WINDOWTEXT;
break;