Bug 1383653 P2 - call tabbrowser-tab::finishUnselectedTabHoverTimer() at tabbrowser::updateCurrentBrowser(); r=dao
authorKaku Kuo <kaku@mozilla.com>
Fri, 28 Jul 2017 10:44:48 +0800
changeset 422906 de7f272d1f1ec89229d39f41817137e7be819f2d
parent 422905 6fbab9f755a841a51e930f1d786879fc6197804a
child 422907 8c470a91f0ff7617990e08e09e696612dd674d9e
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1383653
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1383653 P2 - call tabbrowser-tab::finishUnselectedTabHoverTimer() at tabbrowser::updateCurrentBrowser(); r=dao The original caller is tabbrowser-tab::_visuallySelected setter. MozReview-Commit-ID: GjsYF1ko95x
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1206,16 +1206,21 @@
                   oldFindBar.findMode == oldFindBar.FIND_NORMAL &&
                   !oldFindBar.hidden)
                 this._lastFindValue = oldFindBar._findField.value;
 
               this.updateTitlebar();
 
               this.mCurrentTab.removeAttribute("titlechanged");
               this.mCurrentTab.removeAttribute("attention");
+
+              // The tab has been selected, it's not unselected anymore.
+              // (1) Call the current tab's finishUnselectedTabHoverTimer()
+              //     to save a telemetry record.
+              this.mCurrentTab.finishUnselectedTabHoverTimer();
             }
 
             // If the new tab is busy, and our current state is not busy, then
             // we need to fire a start to all progress listeners.
             const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
             if (this.mCurrentTab.hasAttribute("busy") && !this.mIsBusy) {
               this.mIsBusy = true;
               this._callProgressListeners(null, "onStateChange",
@@ -7495,21 +7500,16 @@
           if (val)
             this.setAttribute("visuallyselected", "true");
           else
             this.removeAttribute("visuallyselected");
           this.parentNode.tabbrowser._tabAttrModified(this, ["visuallyselected"]);
 
           this._setPositionAttributes(val);
 
-          // Tab becomes visible, it's not unselected anymore.
-          if (val) {
-            this.finishUnselectedTabHoverTimer();
-          }
-
           return val;
           ]]>
         </setter>
       </property>
 
       <property name="_selected">
         <setter>
           <![CDATA[