Bug 1387716 - Remove ancient workaround for bug 341047. r?masayuki draft
authorDão Gottwald <dao@mozilla.com>
Sat, 05 Aug 2017 14:43:41 +0200
changeset 641108 26f3c2cafb79e870a32390b8afbcc4423d7a322b
parent 641104 933a04a91ce3bd44b230937083a835cb60637084
child 724722 39cbfe4b2e19dc154a2687c586cfaf744c6541a2
push id72436
push userdgottwald@mozilla.com
push dateSat, 05 Aug 2017 12:44:09 +0000
reviewersmasayuki
bugs1387716, 341047
milestone57.0a1
Bug 1387716 - Remove ancient workaround for bug 341047. r?masayuki _updateScrollButtonsDisabledState doesn't use nsIScrollBoxObject, so this shouldn't be a problem anymore. MozReview-Commit-ID: DP7RD0lA7dQ
toolkit/content/widgets/scrollbox.xml
--- a/toolkit/content/widgets/scrollbox.xml
+++ b/toolkit/content/widgets/scrollbox.xml
@@ -595,24 +595,17 @@
           if (event.detail == 1)
             return;
         } else if (event.detail == 0) {
           // horizontal scrollbox
           return;
         }
 
         this.setAttribute("notoverflowing", "true");
-
-        try {
-          // See bug 341047 and comments in overflow handler as to why
-          // try..catch is needed here
-          this._updateScrollButtonsDisabledState();
-        } catch (e) {
-          this.removeAttribute("notoverflowing");
-        }
+        this._updateScrollButtonsDisabledState();
       ]]></handler>
 
       <handler event="overflow" phase="capturing"><![CDATA[
         // filter underflow events which were dispatched on nested scrollboxes
         if (event.target != this)
           return;
 
         // Ignore events that doesn't match our orientation.
@@ -624,27 +617,17 @@
           if (event.detail == 1)
             return;
         } else if (event.detail == 0) {
           // horizontal scrollbox
           return;
         }
 
         this.removeAttribute("notoverflowing");
-
-        try {
-          // See bug 341047, the overflow event is dispatched when the
-          // scrollbox already is mostly destroyed. This causes some code in
-          // _updateScrollButtonsDisabledState() to throw an error. It also
-          // means that the notoverflowing attribute was removed erroneously,
-          // as the whole overflow event should not be happening in that case.
-          this._updateScrollButtonsDisabledState();
-        } catch (e) {
-          this.setAttribute("notoverflowing", "true");
-        }
+        this._updateScrollButtonsDisabledState();
       ]]></handler>
 
       <handler event="scroll"><![CDATA[
         this._updateScrollButtonsDisabledState();
       ]]></handler>
     </handlers>
   </binding>