Bug 522210 - stop dispatching the UpdatedScrollButtonsDisabledState event. r=enn
authorDão Gottwald <dao@mozilla.com>
Wed, 14 Oct 2009 14:48:18 +0200
changeset 33832 aefdc07e7644970353cd245f31f630405288009a
parent 33831 ae6c0b1a2dce6f821ba988401743a5d2ae09a2f7
child 33833 641afe6a9ac776f7830b3f5bd155289a5a194fae
push id9712
push userdgottwald@mozilla.com
push dateWed, 14 Oct 2009 12:52:24 +0000
treeherdermozilla-central@4f6351d943ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersenn
bugs522210
milestone1.9.3a1pre
Bug 522210 - stop dispatching the UpdatedScrollButtonsDisabledState event. r=enn
toolkit/content/widgets/scrollbox.xml
--- a/toolkit/content/widgets/scrollbox.xml
+++ b/toolkit/content/widgets/scrollbox.xml
@@ -409,25 +409,18 @@
             // In the RTL case, this means the _first_ element in the
             // scrollbox is visible
             if (this._isRTLScrollbox)
               disableUpButton = true;
             else
               disableDownButton = true;
           }
 
-          if (this._scrollButtonUp.disabled != disableUpButton ||
-              this._scrollButtonDown.disabled != disableDownButton) {
-            this._scrollButtonUp.disabled = disableUpButton;
-            this._scrollButtonDown.disabled = disableDownButton;
-
-            var event = document.createEvent("Events");
-            event.initEvent("UpdatedScrollButtonsDisabledState", true, false);
-            this.dispatchEvent(event);
-          }
+          this._scrollButtonUp.disabled = disableUpButton;
+          this._scrollButtonDown.disabled = disableDownButton;
         ]]></body>
       </method>
     </implementation>
 
     <handlers>
       <handler event="DOMMouseScroll"><![CDATA[
         // prevent horizontal scrolling from scrolling a vertical scrollbox
         if (event.axis == event.HORIZONTAL_AXIS &&