Bug 659968 Simplify DOMMouseScroll event handler. r=Neil.
authorPhilip Chee <philip.chee@gmail.com>
Fri, 27 May 2011 15:48:50 +0800
changeset 8055 450b97c769ad894b423f850721166aeb09c8307c
parent 8054 a5aa5b32235daf50e81c0dead12dec3e464ab16d
child 8056 50d8db11a0fe984c95fba9df59000a940de74163
push id84
push userbugzilla@standard8.plus.com
push dateTue, 16 Aug 2011 21:25:04 +0000
treeherdercomm-beta@6970c86be3cd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil
bugs659968
Bug 659968 Simplify DOMMouseScroll event handler. r=Neil.
suite/common/search/search.xml
--- a/suite/common/search/search.xml
+++ b/suite/common/search/search.xml
@@ -508,21 +508,20 @@
           return;
 
         this.focus();
         this.select();
       ]]></handler>
 
       <handler event="popupshowing" action="this.rebuildPopupDynamic();"/>
 
-      <handler event="DOMMouseScroll" phase="capturing"><![CDATA[
-        var key = /Mac/.test(navigator.platform) ? event.metaKey : event.ctrlKey;
-        if (key)
-          this.selectEngine(event, event.detail > 0);
-      ]]></handler>
+      <handler event="DOMMouseScroll"
+               phase="capturing"
+               modifiers="accel"
+               action="this.selectEngine(event, (event.detail > 0));"/>
     </handlers>
   </binding>
 
   <binding id="searchbar-textbox"
       extends="chrome://global/content/bindings/autocomplete.xml#autocomplete">
     <implementation implements="nsIObserver">
       <constructor><![CDATA[
         if (document.getBindingParent(this).parentNode.parentNode.localName ==