Bug 1355752 - Remove B2G code from nsFormControlFrame.cpp & forms.css. draft
authorAstley Chen <aschen@mozilla.com>
Thu, 20 Apr 2017 13:16:43 +0800
changeset 565627 83b0ccee102dde2dcb01ed62efb620f094cc5e1a
parent 565626 f40cfd4de70f41078cddfeba2b3bf53bd525a650
child 565628 edf65f122681c00e7d9294fd9d8fa73711c2fd5f
push id54927
push useraschen@mozilla.com
push dateThu, 20 Apr 2017 05:17:46 +0000
bugs1355752
milestone55.0a1
Bug 1355752 - Remove B2G code from nsFormControlFrame.cpp & forms.css. MozReview-Commit-ID: I1PeSxMLFbn
layout/forms/nsFormControlFrame.cpp
layout/style/res/forms.css
--- a/layout/forms/nsFormControlFrame.cpp
+++ b/layout/forms/nsFormControlFrame.cpp
@@ -44,30 +44,30 @@ NS_QUERYFRAME_HEAD(nsFormControlFrame)
   NS_QUERYFRAME_ENTRY(nsIFormControlFrame)
 NS_QUERYFRAME_TAIL_INHERITING(nsAtomicContainerFrame)
 
 /* virtual */ nscoord
 nsFormControlFrame::GetMinISize(nsRenderingContext *aRenderingContext)
 {
   nscoord result;
   DISPLAY_MIN_WIDTH(this, result);
-#if !defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_WIDGET_GONK)
+#if !defined(MOZ_WIDGET_ANDROID)
   result = StyleDisplay()->UsedAppearance() == NS_THEME_NONE ? 0 : DefaultSize();
 #else
   result = DefaultSize();
 #endif
   return result;
 }
 
 /* virtual */ nscoord
 nsFormControlFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
 {
   nscoord result;
   DISPLAY_PREF_WIDTH(this, result);
-#if !defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_WIDGET_GONK)
+#if !defined(MOZ_WIDGET_ANDROID)
   result = StyleDisplay()->UsedAppearance() == NS_THEME_NONE ? 0 : DefaultSize();
 #else
   result = DefaultSize();
 #endif
   return result;
 }
 
 /* virtual */
@@ -77,17 +77,17 @@ nsFormControlFrame::ComputeAutoSize(nsRe
                                     const LogicalSize&  aCBSize,
                                     nscoord             aAvailableISize,
                                     const LogicalSize&  aMargin,
                                     const LogicalSize&  aBorder,
                                     const LogicalSize&  aPadding,
                                     ComputeSizeFlags    aFlags)
 {
   LogicalSize size(aWM, 0, 0);
-#if !defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_WIDGET_GONK)
+#if !defined(MOZ_WIDGET_ANDROID)
   if (StyleDisplay()->UsedAppearance() == NS_THEME_NONE) {
     return size;
   }
 #endif
   // Note: this call always set the BSize to NS_UNCONSTRAINEDSIZE.
   size = nsAtomicContainerFrame::ComputeAutoSize(aRC, aWM, aCBSize,
                                                  aAvailableISize, aMargin,
                                                  aBorder, aPadding, aFlags);
--- a/layout/style/res/forms.css
+++ b/layout/style/res/forms.css
@@ -593,17 +593,17 @@ input[type="radio"]:disabled:hover,
 input[type="radio"]:disabled:hover:active,
 input[type="checkbox"]:disabled,
 input[type="checkbox"]:disabled:active,
 input[type="checkbox"]:disabled:hover,
 input[type="checkbox"]:disabled:hover:active {
   cursor: inherit;
 }
 
-%if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
+%if defined(MOZ_WIDGET_ANDROID)
 /*
  * These platforms doesn't have any theming support and thus appearance:none
  * is the same as any other appearance value.
  * XXX This is not web-compatible and should be fixed.
  */
 input[type="radio"] {
   border-radius: 100%;
 }
@@ -672,17 +672,17 @@ input[type="checkbox"]:disabled:checked 
 input[type="checkbox"]:indeterminate {
   background-image: url(indeterminate-checkmark.svg);
 }
 
 input[type="checkbox"]:indeterminate:disabled {
   background-image: url(indeterminate-checkmark.svg#disabled);
 }
 
-%endif /* defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) */
+%endif /* defined(MOZ_WIDGET_ANDROID) */
 
 % On Mac, the native theme takes care of this.
 % See nsNativeThemeCocoa::ThemeDrawsFocusForWidget.
 %ifndef XP_MACOSX
 input[type="checkbox"]:-moz-focusring,
 input[type="radio"]:-moz-focusring {
   /* Don't specify the outline-color, we should always use initial value. */
   outline: 1px dotted;