From 6719992f39325cc8bd6995f2094843bff2fafd1b Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Thu, 24 Jul 2014 16:23:40 +0100 Subject: [PATCH] Backed out changeset 3ee28802c28c (bug 1024930) for causing B2G mochitest-debug-14 failures --- layout/generic/nsTextFrame.cpp | 8 -------- widget/LookAndFeel.h | 7 ------- widget/gonk/nsLookAndFeel.cpp | 7 ------- widget/xpwidgets/nsXPLookAndFeel.cpp | 1 - 4 files changed, 23 deletions(-) diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index 018bb997930f..7458d028bb1d 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -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); } diff --git a/widget/LookAndFeel.h b/widget/LookAndFeel.h index 41722561b3e6..823848b67260 100644 --- a/widget/LookAndFeel.h +++ b/widget/LookAndFeel.h @@ -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 // --------------------------------------------------------------------- diff --git a/widget/gonk/nsLookAndFeel.cpp b/widget/gonk/nsLookAndFeel.cpp index 3aae4eae86e9..6e503d6661c6 100644 --- a/widget/gonk/nsLookAndFeel.cpp +++ b/widget/gonk/nsLookAndFeel.cpp @@ -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 diff --git a/widget/xpwidgets/nsXPLookAndFeel.cpp b/widget/xpwidgets/nsXPLookAndFeel.cpp index c1f146feab44..c16133c5b7c3 100644 --- a/widget/xpwidgets/nsXPLookAndFeel.cpp +++ b/widget/xpwidgets/nsXPLookAndFeel.cpp @@ -151,7 +151,6 @@ const char nsXPLookAndFeel::sColorPrefs[][38] = "ui.textForeground", "ui.textSelectBackground", "ui.textSelectForeground", - "ui.textSelectForegroundCustom", "ui.textSelectBackgroundDisabled", "ui.textSelectBackgroundAttention", "ui.textHighlightBackground",