зеркало из https://github.com/mozilla/gecko-dev.git
Bug 583000 - Don't try to measure the tab width if there is only one tab. Fixes broken popup windows with browser.tabs.closeWindowWithLastTab=false where accessing tabbrowser.tabs during the construction of tabbrowser-tabs would fail. r=gavin
--HG-- extra : rebase_source : 2fd228cf6903d910ff352f8f754ab1334924c08d
This commit is contained in:
Родитель
ea52c5636c
Коммит
00211b001d
|
@ -2650,9 +2650,12 @@
|
|||
this.setAttribute("closebuttons", "activetab");
|
||||
break;
|
||||
case 1:
|
||||
if (this.childNodes.length == 1 && this._closeWindowWithLastTab)
|
||||
this.setAttribute("closebuttons", "noclose");
|
||||
else {
|
||||
if (this.childNodes.length == 1) {
|
||||
if (this._closeWindowWithLastTab)
|
||||
this.setAttribute("closebuttons", "noclose");
|
||||
else
|
||||
this.setAttribute("closebuttons", "alltabs");
|
||||
} else {
|
||||
let tab = this.tabbrowser.visibleTabs[this.tabbrowser._numPinnedTabs];
|
||||
if (tab && tab.getBoundingClientRect().width > this.mTabClipWidth)
|
||||
this.setAttribute("closebuttons", "alltabs");
|
||||
|
|
Загрузка…
Ссылка в новой задаче