Bug 1399723 - Draw a grey background color when event state is active instead of hover. r?mats draft
authorLouis Chang <lochang@mozilla.com>
Thu, 21 Sep 2017 10:15:15 +0800
changeset 668019 3d019f46b1ca35841c77bdf8af45e23c6d093d5d
parent 667303 a0eb21bf55e1c1ae0ba311e6f2273da05c712799
child 732582 ec37a3b58ad952fcfa3c625b2b121781e9f573ec
push id80920
push userlochang@mozilla.com
push dateThu, 21 Sep 2017 02:15:55 +0000
reviewersmats
bugs1399723
milestone57.0a1
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)
 {