зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 3ee28802c28c (bug 1024930) for causing B2G mochitest-debug-14 failures
This commit is contained in:
Родитель
a2f6437df2
Коммит
6719992f39
|
@ -3643,14 +3643,6 @@ nsTextPaintStyle::InitSelectionColorsAndShadow()
|
|||
eCSSProperty_color;
|
||||
nscoord frameColor = mFrame->GetVisitedDependentColor(property);
|
||||
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 {
|
||||
EnsureSufficientContrast(&mSelectionTextColor, &mSelectionBGColor);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,6 @@ public:
|
|||
eColorID_TextForeground,
|
||||
eColorID_TextSelectBackground,
|
||||
eColorID_TextSelectForeground,
|
||||
eColorID_TextSelectForegroundCustom,
|
||||
eColorID_TextSelectBackgroundDisabled,
|
||||
eColorID_TextSelectBackgroundAttention,
|
||||
eColorID_TextHighlightBackground,
|
||||
|
@ -589,12 +588,6 @@ public:
|
|||
// Of course if other plaforms work like the Mac, they can use it too.
|
||||
#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
|
||||
// ---------------------------------------------------------------------
|
||||
|
|
|
@ -92,19 +92,12 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
|
|||
aColor = TEXT_NORMAL_COLOR;
|
||||
break;
|
||||
case eColorID_TextSelectBackground:
|
||||
aColor = NS_RGBA(0x33,0xb5,0xe5,0x66);
|
||||
break;
|
||||
case eColorID_IMESelectedRawTextBackground:
|
||||
case eColorID_IMESelectedConvertedTextBackground:
|
||||
// still used
|
||||
aColor = BASE_SELECTED_COLOR;
|
||||
break;
|
||||
case eColorID_TextSelectForegroundCustom:
|
||||
aColor = NS_RGB(0x4d,0x4d,0x4d);
|
||||
break;
|
||||
case eColorID_TextSelectForeground:
|
||||
aColor = NS_CHANGE_COLOR_IF_SAME_AS_BG;
|
||||
break;
|
||||
case eColorID_IMESelectedRawTextForeground:
|
||||
case eColorID_IMESelectedConvertedTextForeground:
|
||||
// still used
|
||||
|
|
|
@ -151,7 +151,6 @@ const char nsXPLookAndFeel::sColorPrefs[][38] =
|
|||
"ui.textForeground",
|
||||
"ui.textSelectBackground",
|
||||
"ui.textSelectForeground",
|
||||
"ui.textSelectForegroundCustom",
|
||||
"ui.textSelectBackgroundDisabled",
|
||||
"ui.textSelectBackgroundAttention",
|
||||
"ui.textHighlightBackground",
|
||||
|
|
Загрузка…
Ссылка в новой задаче