Bug 1709647 - Remove unused NS_CHANGE_COLOR_IF_SAME_AS_BG. r=jfkthame

It was introduced in bug 1024930, but it is unused since.

Differential Revision: https://phabricator.services.mozilla.com/D114389
This commit is contained in:
Emilio Cobos Álvarez 2021-05-06 09:57:19 +00:00
Родитель 3145b3ef03
Коммит 366c9f5ece
4 изменённых файлов: 0 добавлений и 19 удалений

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

@ -4148,16 +4148,6 @@ bool nsTextPaintStyle::InitSelectionColorsAndShadow() {
&nsStyleText::mWebkitTextFillColor);
mSelectionTextColor =
EnsureDifferentColors(frameColor, mSelectionBGColor);
} else if (mSelectionTextColor == NS_CHANGE_COLOR_IF_SAME_AS_BG) {
nscolor frameColor =
SVGUtils::IsInSVGTextSubtree(mFrame)
? mFrame->GetVisitedDependentColor(&nsStyleSVG::mFill)
: mFrame->GetVisitedDependentColor(
&nsStyleText::mWebkitTextFillColor);
if (frameColor == mSelectionBGColor) {
mSelectionTextColor = LookAndFeel::Color(
LookAndFeel::ColorID::TextSelectForegroundCustom, mFrame);
}
} else {
EnsureSufficientContrast(&mSelectionTextColor, &mSelectionBGColor);
}

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

@ -174,8 +174,6 @@ pub enum SystemColor {
#[css(skip)]
TextSelectForeground,
#[css(skip)]
TextSelectForegroundCustom,
#[css(skip)]
TextSelectBackgroundDisabled,
#[css(skip)]
TextSelectBackgroundAttention,

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

@ -564,12 +564,6 @@ class LookAndFeel {
// 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
// ColorID::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 ColorID::IME* and ColorID::SpellCheckerUnderline
// ---------------------------------------------------------------------

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

@ -206,7 +206,6 @@ static const char sColorPrefs[][41] = {
"ui.textForeground",
"ui.textSelectBackground",
"ui.textSelectForeground",
"ui.textSelectForegroundCustom",
"ui.textSelectBackgroundDisabled",
"ui.textSelectBackgroundAttention",
"ui.textHighlightBackground",