mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 3ee28802c28c (bug 1024930) for causing B2G mochitest-debug-14 failures
This commit is contained in:
parent
69b14b90ad
commit
878ea184cf
@ -3643,14 +3643,6 @@ nsTextPaintStyle::InitSelectionColorsAndShadow()
|
|||||||
eCSSProperty_color;
|
eCSSProperty_color;
|
||||||
nscoord frameColor = mFrame->GetVisitedDependentColor(property);
|
nscoord frameColor = mFrame->GetVisitedDependentColor(property);
|
||||||
mSelectionTextColor = EnsureDifferentColors(frameColor, mSelectionBGColor);
|
mSelectionTextColor = EnsureDifferentColors(frameColor, mSelectionBGColor);
|
||||||
} else if (mSelectionTextColor == NS_CHANGE_COLOR_IF_SAME_AS_BG) {
|
|
||||||
nsCSSProperty property = mFrame->IsSVGText() ? eCSSProperty_fill :
|
|
||||||
eCSSProperty_color;
|
|
||||||
nscolor frameColor = mFrame->GetVisitedDependentColor(property);
|
|
||||||
if (frameColor == mSelectionBGColor) {
|
|
||||||
mSelectionTextColor =
|
|
||||||
LookAndFeel::GetColor(LookAndFeel::eColorID_TextSelectForegroundCustom);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
EnsureSufficientContrast(&mSelectionTextColor, &mSelectionBGColor);
|
EnsureSufficientContrast(&mSelectionTextColor, &mSelectionBGColor);
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ public:
|
|||||||
eColorID_TextForeground,
|
eColorID_TextForeground,
|
||||||
eColorID_TextSelectBackground,
|
eColorID_TextSelectBackground,
|
||||||
eColorID_TextSelectForeground,
|
eColorID_TextSelectForeground,
|
||||||
eColorID_TextSelectForegroundCustom,
|
|
||||||
eColorID_TextSelectBackgroundDisabled,
|
eColorID_TextSelectBackgroundDisabled,
|
||||||
eColorID_TextSelectBackgroundAttention,
|
eColorID_TextSelectBackgroundAttention,
|
||||||
eColorID_TextHighlightBackground,
|
eColorID_TextHighlightBackground,
|
||||||
@ -589,12 +588,6 @@ public:
|
|||||||
// Of course if other plaforms work like the Mac, they can use it too.
|
// Of course if other plaforms work like the Mac, they can use it too.
|
||||||
#define NS_DONT_CHANGE_COLOR NS_RGB(0x01, 0x01, 0x01)
|
#define NS_DONT_CHANGE_COLOR NS_RGB(0x01, 0x01, 0x01)
|
||||||
|
|
||||||
// Similar with NS_DONT_CHANGE_COLOR, except NS_DONT_CHANGE_COLOR would returns
|
|
||||||
// complementary color if fg color is same as bg color.
|
|
||||||
// NS_CHANGE_COLOR_IF_SAME_AS_BG would returns eColorID_TextSelectForegroundCustom if
|
|
||||||
// fg and bg color are the same.
|
|
||||||
#define NS_CHANGE_COLOR_IF_SAME_AS_BG NS_RGB(0x02, 0x02, 0x02)
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
// Special colors for eColorID_IME* and eColorID_SpellCheckerUnderline
|
// Special colors for eColorID_IME* and eColorID_SpellCheckerUnderline
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
|
@ -92,19 +92,12 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
|
|||||||
aColor = TEXT_NORMAL_COLOR;
|
aColor = TEXT_NORMAL_COLOR;
|
||||||
break;
|
break;
|
||||||
case eColorID_TextSelectBackground:
|
case eColorID_TextSelectBackground:
|
||||||
aColor = NS_RGBA(0x33,0xb5,0xe5,0x66);
|
|
||||||
break;
|
|
||||||
case eColorID_IMESelectedRawTextBackground:
|
case eColorID_IMESelectedRawTextBackground:
|
||||||
case eColorID_IMESelectedConvertedTextBackground:
|
case eColorID_IMESelectedConvertedTextBackground:
|
||||||
// still used
|
// still used
|
||||||
aColor = BASE_SELECTED_COLOR;
|
aColor = BASE_SELECTED_COLOR;
|
||||||
break;
|
break;
|
||||||
case eColorID_TextSelectForegroundCustom:
|
|
||||||
aColor = NS_RGB(0x4d,0x4d,0x4d);
|
|
||||||
break;
|
|
||||||
case eColorID_TextSelectForeground:
|
case eColorID_TextSelectForeground:
|
||||||
aColor = NS_CHANGE_COLOR_IF_SAME_AS_BG;
|
|
||||||
break;
|
|
||||||
case eColorID_IMESelectedRawTextForeground:
|
case eColorID_IMESelectedRawTextForeground:
|
||||||
case eColorID_IMESelectedConvertedTextForeground:
|
case eColorID_IMESelectedConvertedTextForeground:
|
||||||
// still used
|
// still used
|
||||||
|
@ -151,7 +151,6 @@ const char nsXPLookAndFeel::sColorPrefs[][38] =
|
|||||||
"ui.textForeground",
|
"ui.textForeground",
|
||||||
"ui.textSelectBackground",
|
"ui.textSelectBackground",
|
||||||
"ui.textSelectForeground",
|
"ui.textSelectForeground",
|
||||||
"ui.textSelectForegroundCustom",
|
|
||||||
"ui.textSelectBackgroundDisabled",
|
"ui.textSelectBackgroundDisabled",
|
||||||
"ui.textSelectBackgroundAttention",
|
"ui.textSelectBackgroundAttention",
|
||||||
"ui.textHighlightBackground",
|
"ui.textHighlightBackground",
|
||||||
|
Loading…
Reference in New Issue
Block a user