зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1319366 - When fullscreen, defer new tab selection until exiting fullscreen completed. r=jchen,sebastian
MozReview-Commit-ID: 2vAkpp7M7Cv --HG-- extra : rebase_source : f6444974a190e8f0992bb7af6446739c14821a11
This commit is contained in:
Родитель
e065b3c989
Коммит
6c1328a7f4
|
@ -432,7 +432,7 @@ var BrowserApp = {
|
|||
// Tab selection has changed during a fullscreen transition, handle it now.
|
||||
let tab = this.fullscreenTransitionTab;
|
||||
this.fullscreenTransitionTab = null;
|
||||
this._handleTabSelected(tab);
|
||||
this.selectTab(tab);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1206,8 +1206,21 @@ var BrowserApp = {
|
|||
addTab: function addTab(aURI, aParams) {
|
||||
aParams = aParams || {};
|
||||
|
||||
let fullscreenState;
|
||||
if (this.selectedBrowser) {
|
||||
fullscreenState = this.selectedBrowser.contentDocument.fullscreenElement;
|
||||
if (fullscreenState) {
|
||||
aParams.selected = false;
|
||||
}
|
||||
}
|
||||
|
||||
let newTab = new Tab(aURI, aParams);
|
||||
|
||||
if (fullscreenState) {
|
||||
this.fullscreenTransitionTab = newTab;
|
||||
doc.exitFullscreen();
|
||||
}
|
||||
|
||||
if (typeof aParams.tabIndex == "number") {
|
||||
this._tabs.splice(aParams.tabIndex, 0, newTab);
|
||||
} else {
|
||||
|
@ -1312,6 +1325,7 @@ var BrowserApp = {
|
|||
// remember the new tab for this.
|
||||
this.fullscreenTransitionTab = aTab;
|
||||
doc.exitFullscreen();
|
||||
return;
|
||||
}
|
||||
|
||||
let message = {
|
||||
|
|
Загрузка…
Ссылка в новой задаче