Bug 1383653 P2 - call tabbrowser-tab::finishUnselectedTabHoverTimer() at tabbrowser::updateCurrentBrowser(); r?dao
The original caller is tabbrowser-tab::_visuallySelected setter.
MozReview-Commit-ID: GjsYF1ko95x
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1201,16 +1201,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",
@@ -7475,21 +7480,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[