Bug 1295883 - Chase Linux scroll wheel behavior on Tier3 desktop Unix. r=smaug a=ritu
authorJan Beich <jbeich@FreeBSD.org>
Wed, 17 Aug 2016 04:55:36 +0000
changeset 350749 9f719285cd161a538446d0601162b474914e8a14
parent 350748 69c68bce430d468037bc82223acb9ea4155dbc7d
child 350750 8ebdcfa6203a25d4c8d8a73daa3342f6a64c1090
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, ritu
bugs1295883
milestone50.0
Bug 1295883 - Chase Linux scroll wheel behavior on Tier3 desktop Unix. r=smaug a=ritu MozReview-Commit-ID: 7osYJCwDQev
dom/html/HTMLInputElement.cpp
dom/html/HTMLInputElement.h
dom/html/test/mochitest.ini
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -3409,17 +3409,17 @@ HTMLInputElement::Focus(ErrorResult& aEr
         break;
       }
     }
   }
 
   return;
 }
 
-#if defined(XP_WIN) || defined(XP_LINUX)
+#if !defined(ANDROID) && !defined(XP_MACOSX)
 bool
 HTMLInputElement::IsNodeApzAwareInternal() const
 {
   // Tell APZC we may handle mouse wheel event and do preventDefault when input
   // type is number.
   return (mType == NS_FORM_INPUT_NUMBER) || (mType == NS_FORM_INPUT_RANGE) ||
          nsINode::IsNodeApzAwareInternal();
 }
@@ -4500,17 +4500,17 @@ HTMLInputElement::PostHandleEvent(EventC
               // aggressive about stopping the spin. (And don't set
               // nsEventStatus_eConsumeNoDefault after doing so, since that
               // might prevent, say, the context menu from opening.)
               StopNumberControlSpinnerSpin();
             }
           }
           break;
         }
-#if defined(XP_WIN) || defined(XP_LINUX)
+#if !defined(ANDROID) && !defined(XP_MACOSX)
         case eWheel: {
           // Handle wheel events as increasing / decreasing the input element's
           // value when it's focused and it's type is number or range.
           WidgetWheelEvent* wheelEvent = aVisitor.mEvent->AsWheelEvent();
           if (!aVisitor.mEvent->DefaultPrevented() &&
               aVisitor.mEvent->IsTrusted() && IsMutable() && wheelEvent &&
               wheelEvent->mDeltaY != 0 &&
               wheelEvent->mDeltaMode != nsIDOMWheelEvent::DOM_DELTA_PIXEL) {
@@ -6024,17 +6024,17 @@ FireEventForAccessibility(nsIDOMHTMLInpu
 
   return NS_OK;
 }
 #endif
 
 void
 HTMLInputElement::UpdateApzAwareFlag()
 {
-#if defined(XP_WIN) || defined(XP_LINUX)
+#if !defined(ANDROID) && !defined(XP_MACOSX)
   if ((mType == NS_FORM_INPUT_NUMBER) || (mType == NS_FORM_INPUT_RANGE)) {
     SetMayBeApzAware();
   }
 #endif
 }
 
 nsresult
 HTMLInputElement::SetDefaultValueAsValue()
--- a/dom/html/HTMLInputElement.h
+++ b/dom/html/HTMLInputElement.h
@@ -130,17 +130,17 @@ public:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual int32_t TabIndexDefault() override;
   using nsGenericHTMLElement::Focus;
   virtual void Blur(ErrorResult& aError) override;
   virtual void Focus(ErrorResult& aError) override;
 
   // nsINode
-#if defined(XP_WIN) || defined(XP_LINUX)
+#if !defined(ANDROID) && !defined(XP_MACOSX)
   virtual bool IsNodeApzAwareInternal() const override;
 #endif
 
   // Element
   virtual bool IsInteractiveHTMLContent(bool aIgnoreTabindex) const override;
 
   // nsIDOMHTMLInputElement
   NS_DECL_NSIDOMHTMLINPUTELEMENT
--- a/dom/html/test/mochitest.ini
+++ b/dom/html/test/mochitest.ini
@@ -616,19 +616,19 @@ skip-if = buildapp == 'b2g' # bug 112901
 [test_bug1166138.html]
 [test_bug1230665.html]
 [test_filepicker_default_directory.html]
 skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android'
 [test_bug1233598.html]
 [test_bug1250401.html]
 [test_bug1260664.html]
 [test_bug1261673.html]
-skip-if = (os != 'win' && os != 'linux')
+skip-if = (os == 'android' || os == 'mac')
 [test_bug1261674-1.html]
-skip-if = (os != 'win' && os != 'linux')
+skip-if = (os == 'android' || os == 'mac')
 [test_bug1261674-2.html]
-skip-if = (os != 'win' && os != 'linux')
+skip-if = (os == 'android' || os == 'mac')
 [test_bug1260704.html]
 [test_allowMedia.html]
 [test_bug1292522_same_domain_with_different_port_number.html]
 [test_bug1295719_event_sequence_for_arrow_keys.html]
 skip-if = os == "android" || appname == "b2g" # up/down arrow keys not supported on android/b2g
 [test_bug1295719_event_sequence_for_number_keys.html]
\ No newline at end of file