Backed out changeset 3ee28802c28c (bug 1024930) for causing B2G mochitest-debug-14 failures
authorEd Morley <emorley@mozilla.com>
Thu, 24 Jul 2014 16:23:40 +0100
changeset 195898 ba4d556f908eb483d6a3f0ff75f83f6853d2b5da
parent 195897 73c90712e4097c9469f152f6005659ba32f1e63c
child 195899 a0d61b6bb680d3494f9696e7ca2213e7037a97b2
push id27200
push userkwierso@gmail.com
push dateFri, 25 Jul 2014 00:43:41 +0000
treeherdermozilla-central@613e79262240 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1024930
milestone34.0a1
backs out3ee28802c28c3459ccca0aa3285cfe2aa29a9393
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 3ee28802c28c (bug 1024930) for causing B2G mochitest-debug-14 failures
layout/generic/nsTextFrame.cpp
widget/LookAndFeel.h
widget/gonk/nsLookAndFeel.cpp
widget/xpwidgets/nsXPLookAndFeel.cpp
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -3638,24 +3638,16 @@ nsTextPaintStyle::InitSelectionColorsAnd
 
   if (mResolveColors) {
     // On MacOS X, we don't exchange text color and BG color.
     if (mSelectionTextColor == NS_DONT_CHANGE_COLOR) {
       nsCSSProperty property = mFrame->IsSVGText() ? eCSSProperty_fill :
                                                      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);
     }
   } else {
     if (mSelectionTextColor == NS_DONT_CHANGE_COLOR) {
       mSelectionTextColor = NS_SAME_AS_FOREGROUND_COLOR;
     }
   }
--- a/widget/LookAndFeel.h
+++ b/widget/LookAndFeel.h
@@ -34,17 +34,16 @@ public:
     eColorID_WidgetSelectBackground,
     eColorID_WidgetSelectForeground,
     eColorID_Widget3DHighlight,
     eColorID_Widget3DShadow,
     eColorID_TextBackground,
     eColorID_TextForeground,
     eColorID_TextSelectBackground,
     eColorID_TextSelectForeground,
-    eColorID_TextSelectForegroundCustom,
     eColorID_TextSelectBackgroundDisabled,
     eColorID_TextSelectBackgroundAttention,
     eColorID_TextHighlightBackground,
     eColorID_TextHighlightForeground,
 
     eColorID_IMERawInputBackground,
     eColorID_IMERawInputForeground,
     eColorID_IMERawInputUnderline,
@@ -584,22 +583,16 @@ public:
 } // namespace mozilla
 
 // On the Mac, GetColor(eColorID_TextSelectForeground, color) returns this
 // constant to specify that the foreground color should not be changed
 // (ie. a colored text keeps its colors  when selected).
 // 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
 // ---------------------------------------------------------------------
 
 // For background color only.
 #define NS_TRANSPARENT                NS_RGBA(0x01, 0x00, 0x00, 0x00)
 // For foreground color only.
 #define NS_SAME_AS_FOREGROUND_COLOR   NS_RGBA(0x02, 0x00, 0x00, 0x00)
--- a/widget/gonk/nsLookAndFeel.cpp
+++ b/widget/gonk/nsLookAndFeel.cpp
@@ -87,29 +87,22 @@ nsLookAndFeel::NativeGetColor(ColorID aI
         // not used?
         aColor = BASE_NORMAL_COLOR;
         break;
     case eColorID_TextForeground:
         // not used?
         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
         aColor = TEXT_SELECTED_COLOR;
         break;
     case eColorID_IMERawInputBackground:
     case eColorID_IMEConvertedTextBackground:
         aColor = NS_TRANSPARENT;
--- a/widget/xpwidgets/nsXPLookAndFeel.cpp
+++ b/widget/xpwidgets/nsXPLookAndFeel.cpp
@@ -146,17 +146,16 @@ const char nsXPLookAndFeel::sColorPrefs[
   "ui.widgetSelectBackground",
   "ui.widgetSelectForeground",
   "ui.widget3DHighlight",
   "ui.widget3DShadow",
   "ui.textBackground",
   "ui.textForeground",
   "ui.textSelectBackground",
   "ui.textSelectForeground",
-  "ui.textSelectForegroundCustom",
   "ui.textSelectBackgroundDisabled",
   "ui.textSelectBackgroundAttention",
   "ui.textHighlightBackground",
   "ui.textHighlightForeground",
   "ui.IMERawInputBackground",
   "ui.IMERawInputForeground",
   "ui.IMERawInputUnderline",
   "ui.IMESelectedRawTextBackground",