mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
fd001ecdb0
commit
319f069845
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user