summaryrefslogtreecommitdiffstats
path: root/toolkit/content/widgets/arrowscrollbox.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/content/widgets/arrowscrollbox.js')
-rw-r--r--toolkit/content/widgets/arrowscrollbox.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/toolkit/content/widgets/arrowscrollbox.js b/toolkit/content/widgets/arrowscrollbox.js
index 28de96c8d7..7109891faf 100644
--- a/toolkit/content/widgets/arrowscrollbox.js
+++ b/toolkit/content/widgets/arrowscrollbox.js
@@ -21,7 +21,7 @@
return `
<html:link rel="stylesheet" href="chrome://global/skin/toolbarbutton.css"/>
<html:link rel="stylesheet" href="chrome://global/skin/arrowscrollbox.css"/>
- <toolbarbutton id="scrollbutton-up" part="scrollbutton-up" keyNav="false"/>
+ <toolbarbutton id="scrollbutton-up" part="scrollbutton-up" keyNav="false" data-l10n-id="overflow-scroll-button-up"/>
<spacer part="overflow-start-indicator"/>
<box class="scrollbox-clip" part="scrollbox-clip" flex="1">
<scrollbox part="scrollbox" flex="1">
@@ -29,7 +29,7 @@
</scrollbox>
</box>
<spacer part="overflow-end-indicator"/>
- <toolbarbutton id="scrollbutton-down" part="scrollbutton-down" keyNav="false"/>
+ <toolbarbutton id="scrollbutton-down" part="scrollbutton-down" keyNav="false" data-l10n-id="overflow-scroll-button-down"/>
`;
}
@@ -43,6 +43,8 @@
this._scrollButtonDown =
this.shadowRoot.getElementById("scrollbutton-down");
+ MozXULElement.insertFTLIfNeeded("toolkit/global/arrowscrollbox.ftl");
+
this._arrowScrollAnim = {
scrollbox: this,
requestHandle: 0,
@@ -134,6 +136,8 @@
}
this.hasConnected = true;
+ document.l10n.connectRoot(this.shadowRoot);
+
if (!this.hasAttribute("smoothscroll")) {
this.smoothScroll = Services.prefs.getBoolPref(
"toolkit.scrollbox.smoothScroll",
@@ -639,6 +643,7 @@
this._scrollTimer.cancel();
this._scrollTimer = null;
}
+ document.l10n.disconnectRoot(this.shadowRoot);
}
on_wheel(event) {
@@ -749,7 +754,7 @@
}
}
- on_touchend(event) {
+ on_touchend() {
this._touchStart = -1;
}
@@ -804,12 +809,12 @@
this._updateScrollButtonsDisabledState();
}
- on_scroll(event) {
+ on_scroll() {
this._isScrolling = true;
this._updateScrollButtonsDisabledState();
}
- on_scrollend(event) {
+ on_scrollend() {
this._isScrolling = false;
this._destination = 0;
this._direction = 0;