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
--- 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>