зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1809465 - Replace _hoveredTab with a private tab property. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D166441
This commit is contained in:
Родитель
00c69fa88b
Коммит
0564edd687
|
@ -57,6 +57,7 @@
|
|||
this.addEventListener("focus", this);
|
||||
this.addEventListener("AriaFocus", this);
|
||||
|
||||
this._hover = false;
|
||||
this._selectedOnFirstMouseDown = false;
|
||||
|
||||
/**
|
||||
|
@ -488,15 +489,11 @@
|
|||
if (this.hidden || this.closing) {
|
||||
return;
|
||||
}
|
||||
|
||||
let tabContainer = this.container;
|
||||
this._hover = true;
|
||||
|
||||
if (this.selected) {
|
||||
tabContainer._handleTabSelect();
|
||||
}
|
||||
|
||||
tabContainer._hoveredTab = this;
|
||||
if (this.linkedPanel && !this.selected) {
|
||||
this.container._handleTabSelect();
|
||||
} else if (this.linkedPanel) {
|
||||
this.linkedBrowser.unselectedTabHover(true);
|
||||
this.startUnselectedTabHoverTimer();
|
||||
}
|
||||
|
@ -512,7 +509,10 @@
|
|||
}
|
||||
|
||||
_mouseleave() {
|
||||
this.container._hoveredTab = null;
|
||||
if (!this._hover) {
|
||||
return;
|
||||
}
|
||||
this._hover = false;
|
||||
if (this.linkedPanel && !this.selected) {
|
||||
this.linkedBrowser.unselectedTabHover(false);
|
||||
this.cancelUnselectedTabHoverTimer();
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
|
||||
this.baseConnect();
|
||||
|
||||
this._hoveredTab = null;
|
||||
this._blockDblClick = false;
|
||||
this._tabDropIndicator = this.querySelector(".tab-drop-indicator");
|
||||
this._dragOverDelay = 350;
|
||||
|
|
|
@ -3973,9 +3973,7 @@
|
|||
this._invalidateCachedTabs();
|
||||
|
||||
// Invalidate hovered tab state tracking for this closing tab.
|
||||
if (this.tabContainer._hoveredTab == aTab) {
|
||||
aTab._mouseleave();
|
||||
}
|
||||
aTab._mouseleave();
|
||||
|
||||
if (newTab) {
|
||||
this.addTrustedTab(BROWSER_NEW_TAB_URL, {
|
||||
|
|
Загрузка…
Ссылка в новой задаче