Bug 1359815 - show throbber sooner; draft
authorKaku Kuo <kaku@mozilla.com>
Mon, 08 May 2017 17:42:31 +0800
changeset 574074 6397168abcfca3b8bf563f3d7712ad96b2488673
parent 573811 17d8a1e278a9c54a6fdda9d390abce4077e55b20
child 627473 7497928fa859c082c3159f80eb061d1b393e85d6
push id57575
push usertkuo@mozilla.com
push dateMon, 08 May 2017 09:53:14 +0000
bugs1359815
milestone55.0a1
Bug 1359815 - show throbber sooner; MozReview-Commit-ID: L3MX5AzwIY2
toolkit/content/widgets/videocontrols.xml
--- a/toolkit/content/widgets/videocontrols.xml
+++ b/toolkit/content/widgets/videocontrols.xml
@@ -514,17 +514,20 @@
        * "canplay" event which indicates that the resuming operation
        * is completed.
        */
       SHOW_THROBBER_TIMEOUT_MS: 250,
       _showThrobberTimer: null,
       _delayShowThrobberWhileResumingVideoDecoder() {
           this._showThrobberTimer = setTimeout(() => {
               this.statusIcon.setAttribute("type", "throbber");
-              this.setupStatusFader();
+              // Show the throbber immediatelly since we have waited for SHOW_THROBBER_TIMEOUT_MS.
+              // We don't want to wait for another transition-delay(750ms) and the
+              // transition-duration(300ms).
+              this.setupStatusFader(true);
           }, this.SHOW_THROBBER_TIMEOUT_MS);
       },
       _cancelShowThrobberWhileResumingVideoDecoder() {
           if (this._showThrobberTimer) {
             clearTimeout(this._showThrobberTimer);
             this._showThrobberTimer = null;
           }
       },