Bug 1399723 - Draw a grey background color when event state is active instead of hover. r=mats
authorLouis Chang <lochang@mozilla.com>
Thu, 21 Sep 2017 10:15:15 +0800
changeset 431643 4a59e79b7e947915bae60d7c37bffebf99ff3ef8
parent 431642 7864172bddf6409c2e68ff7b1bd0dc0d730202d9
child 431644 9767e159a7018465824b7f6e4d504875cfa5cc6b
push id7785
push userryanvm@gmail.com
push dateThu, 21 Sep 2017 13:39:55 +0000
treeherdermozilla-beta@06d4034a8a03 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs1399723
milestone57.0a1
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
Bug 1399723 - Draw a grey background color when event state is active instead of hover. r=mats MozReview-Commit-ID: CSX6xn1qy19
widget/android/AndroidColors.h
widget/android/nsNativeThemeAndroid.cpp
--- a/widget/android/AndroidColors.h
+++ b/widget/android/AndroidColors.h
@@ -10,14 +10,14 @@
 
 namespace mozilla {
 namespace widget {
 
 static const Color sAndroidBackgroundColor(Color(1.0f, 1.0f, 1.0f));
 static const Color sAndroidBorderColor(Color(0.73f, 0.73f, 0.73f));
 static const Color sAndroidCheckColor(Color(0.19f, 0.21f, 0.23f));
 static const Color sAndroidDisabledColor(Color(0.88f, 0.88f, 0.88f));
-static const Color sAndroidHoverColor(Color(0.94f, 0.94f, 0.94f));
+static const Color sAndroidActiveColor(Color(0.94f, 0.94f, 0.94f));
 
 } // namespace widget
 } // namespace mozilla
 
 #endif // mozilla_widget_AndroidColors_h
--- a/widget/android/nsNativeThemeAndroid.cpp
+++ b/widget/android/nsNativeThemeAndroid.cpp
@@ -42,19 +42,19 @@ PaintCheckboxControl(nsIFrame* aFrame,
     ColorPattern(ToDeviceColor(mozilla::widget::sAndroidBackgroundColor)));
 
   if (aState.HasState(NS_EVENT_STATE_DISABLED)) {
     aDrawTarget->Fill(roundedRect,
       ColorPattern(ToDeviceColor(mozilla::widget::sAndroidDisabledColor)));
     return;
   }
 
-  if (aState.HasState(NS_EVENT_STATE_HOVER)) {
+  if (aState.HasState(NS_EVENT_STATE_ACTIVE)) {
     aDrawTarget->Fill(roundedRect,
-      ColorPattern(ToDeviceColor(mozilla::widget::sAndroidHoverColor)));
+      ColorPattern(ToDeviceColor(mozilla::widget::sAndroidActiveColor)));
   }
 }
 
 static void
 PaintCheckMark(nsIFrame* aFrame,
                DrawTarget* aDrawTarget,
                const nsRect& aRect)
 {
@@ -131,19 +131,19 @@ PaintRadioControl(nsIFrame* aFrame,
     ColorPattern(ToDeviceColor(mozilla::widget::sAndroidBackgroundColor)));
 
   if (aState.HasState(NS_EVENT_STATE_DISABLED)) {
     aDrawTarget->Fill(ellipse,
       ColorPattern(ToDeviceColor(mozilla::widget::sAndroidDisabledColor)));
     return;
   }
 
-  if (aState.HasState(NS_EVENT_STATE_HOVER)) {
+  if (aState.HasState(NS_EVENT_STATE_ACTIVE)) {
     aDrawTarget->Fill(ellipse,
-      ColorPattern(ToDeviceColor(mozilla::widget::sAndroidHoverColor)));
+      ColorPattern(ToDeviceColor(mozilla::widget::sAndroidActiveColor)));
   }
 }
 
 static void
 PaintCheckedRadioButton(nsIFrame* aFrame,
                         DrawTarget* aDrawTarget,
                         const nsRect& aRect)
 {