Bug 1414252 - Remove dysfunctional performance optimization in tabbrowser's resize handler. r=daleharvey

MozReview-Commit-ID: 5oJ2CpBoMmd

--HG--
extra : rebase_source : dd47b10041f0bf3db665ad496155b1c1cb7d3080
This commit is contained in:
Dão Gottwald 2017-11-03 14:38:29 +01:00
Родитель 334a1e2309
Коммит f2f67ad26e
1 изменённых файлов: 7 добавлений и 12 удалений

Просмотреть файл

@ -6440,8 +6440,6 @@
document.getElementById("tabContextMenu");
</field>
<field name="mTabstripWidth">0</field>
<field name="mTabstrip">
document.getAnonymousElementByAttribute(this, "anonid", "arrowscrollbox");
</field>
@ -6473,7 +6471,7 @@
<method name="updateSessionRestoreVisibility">
<body><![CDATA[
let {restoreTabsButton, restoreTabsButtonWrapperWidth, windowUtils, mTabstripWidth} = this;
let {restoreTabsButton, restoreTabsButtonWrapperWidth, windowUtils} = this;
let restoreTabsButtonWrapper = restoreTabsButton.parentNode;
if (!restoreTabsButtonWrapper.getAttribute("session-exists")) {
@ -6481,6 +6479,8 @@
return;
}
let tabstripWidth = windowUtils.getBoundsWithoutFlushing(this.mTabstrip);
let newTabButton = document.getAnonymousElementByAttribute(
this, "anonid", "tabs-newtab-button");
@ -6495,7 +6495,7 @@
// Subtract the elements' widths from the available space to ensure
// that showing the restoreTabsButton won't cause any overflow.
if ((mTabstripWidth - tabbarUsedSpace) > restoreTabsButtonWrapperWidth) {
if (tabstripWidth - tabbarUsedSpace > restoreTabsButtonWrapperWidth) {
restoreTabsButtonWrapper.setAttribute("shown", "true");
} else {
restoreTabsButtonWrapper.removeAttribute("shown");
@ -7000,14 +7000,9 @@
break;
TabsInTitlebar.updateAppearance();
var width = this.mTabstrip.boxObject.width;
if (width != this.mTabstripWidth) {
this.adjustTabstrip();
this._handleTabSelect(true);
this.mTabstripWidth = width;
this.updateSessionRestoreVisibility();
}
this.adjustTabstrip();
this._handleTabSelect(true);
this.updateSessionRestoreVisibility();
break;
case "mouseout":
// If the "related target" (the node to which the pointer went) is not