зеркало из https://github.com/mozilla/pjs.git
Bug 574654 - Remove browser.tabs.tabMinWidth and browser.tabs.tabMaxWidth in favor of CSS. r=mano
This commit is contained in:
Родитель
22230a2083
Коммит
4909a65d40
|
@ -320,8 +320,6 @@ pref("browser.tabs.loadInBackground", true);
|
||||||
pref("browser.tabs.opentabfor.middleclick", true);
|
pref("browser.tabs.opentabfor.middleclick", true);
|
||||||
pref("browser.tabs.loadDivertedInBackground", false);
|
pref("browser.tabs.loadDivertedInBackground", false);
|
||||||
pref("browser.tabs.loadBookmarksInBackground", false);
|
pref("browser.tabs.loadBookmarksInBackground", false);
|
||||||
pref("browser.tabs.tabMinWidth", 100);
|
|
||||||
pref("browser.tabs.tabMaxWidth", 250);
|
|
||||||
pref("browser.tabs.tabClipWidth", 140);
|
pref("browser.tabs.tabClipWidth", 140);
|
||||||
|
|
||||||
// Where to show tab close buttons:
|
// Where to show tab close buttons:
|
||||||
|
|
|
@ -22,12 +22,18 @@ tabbrowser {
|
||||||
|
|
||||||
.tabbrowser-tab {
|
.tabbrowser-tab {
|
||||||
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tab");
|
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tab");
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabbrowser-tab:not([pinned]) {
|
||||||
-moz-box-flex: 100;
|
-moz-box-flex: 100;
|
||||||
|
max-width: 250px;
|
||||||
|
min-width: 100px;
|
||||||
|
width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabbrowser-tab:not([fadein]) {
|
.tabbrowser-tab:not([fadein]) {
|
||||||
max-width: 1px !important;
|
max-width: 1px;
|
||||||
min-width: 1px !important;
|
min-width: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabbrowser-tab[fadein]:not([pinned]) {
|
.tabbrowser-tab[fadein]:not([pinned]) {
|
||||||
|
@ -48,9 +54,6 @@ tabbrowser {
|
||||||
|
|
||||||
.tabbrowser-tab[pinned] {
|
.tabbrowser-tab[pinned] {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
-moz-box-flex: 0;
|
|
||||||
min-width: 0 !important;
|
|
||||||
max-width: none !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabbrowser-tab[pinned] > .tab-text {
|
.tabbrowser-tab[pinned] > .tab-text {
|
||||||
|
|
|
@ -1210,9 +1210,6 @@
|
||||||
t.setAttribute("label", aURI);
|
t.setAttribute("label", aURI);
|
||||||
|
|
||||||
t.setAttribute("crop", "end");
|
t.setAttribute("crop", "end");
|
||||||
t.style.maxWidth = this.tabContainer.mTabMaxWidth + "px";
|
|
||||||
t.style.minWidth = this.tabContainer.mTabMinWidth + "px";
|
|
||||||
t.width = 0;
|
|
||||||
t.setAttribute("validate", "never");
|
t.setAttribute("validate", "never");
|
||||||
t.setAttribute("onerror", "this.removeAttribute('image');");
|
t.setAttribute("onerror", "this.removeAttribute('image');");
|
||||||
t.className = "tabbrowser-tab";
|
t.className = "tabbrowser-tab";
|
||||||
|
@ -2505,8 +2502,6 @@
|
||||||
<implementation implements="nsIDOMEventListener">
|
<implementation implements="nsIDOMEventListener">
|
||||||
<constructor>
|
<constructor>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
this.mTabMinWidth = Services.prefs.getIntPref("browser.tabs.tabMinWidth");
|
|
||||||
this.mTabMaxWidth = Services.prefs.getIntPref("browser.tabs.tabMaxWidth");
|
|
||||||
this.mTabClipWidth = Services.prefs.getIntPref("browser.tabs.tabClipWidth");
|
this.mTabClipWidth = Services.prefs.getIntPref("browser.tabs.tabClipWidth");
|
||||||
this.mCloseButtons = Services.prefs.getIntPref("browser.tabs.closeButtons");
|
this.mCloseButtons = Services.prefs.getIntPref("browser.tabs.closeButtons");
|
||||||
this._closeWindowWithLastTab = Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab");
|
this._closeWindowWithLastTab = Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab");
|
||||||
|
@ -2514,9 +2509,6 @@
|
||||||
var tab = this.firstChild;
|
var tab = this.firstChild;
|
||||||
tab.setAttribute("label",
|
tab.setAttribute("label",
|
||||||
this.tabbrowser.mStringBundle.getString("tabs.emptyTabTitle"));
|
this.tabbrowser.mStringBundle.getString("tabs.emptyTabTitle"));
|
||||||
tab.style.minWidth = this.mTabMinWidth + "px";
|
|
||||||
tab.style.maxWidth = this.mTabMaxWidth + "px";
|
|
||||||
tab.width = 0;
|
|
||||||
tab.setAttribute("crop", "end");
|
tab.setAttribute("crop", "end");
|
||||||
tab.setAttribute("validate", "never");
|
tab.setAttribute("validate", "never");
|
||||||
tab.setAttribute("onerror", "this.removeAttribute('image');");
|
tab.setAttribute("onerror", "this.removeAttribute('image');");
|
||||||
|
|
|
@ -25,7 +25,7 @@ function test() {
|
||||||
function doTest() {
|
function doTest() {
|
||||||
tabstrip.smoothScroll = false;
|
tabstrip.smoothScroll = false;
|
||||||
|
|
||||||
var tabMinWidth = gPrefService.getIntPref("browser.tabs.tabMinWidth");
|
var tabMinWidth = parseInt(getComputedStyle(gBrowser.selectedTab, null).minWidth);
|
||||||
var tabCountForOverflow = Math.ceil(width(tabstrip) / tabMinWidth * 3);
|
var tabCountForOverflow = Math.ceil(width(tabstrip) / tabMinWidth * 3);
|
||||||
while (tabContainer.childNodes.length < tabCountForOverflow)
|
while (tabContainer.childNodes.length < tabCountForOverflow)
|
||||||
gBrowser.addTab("about:blank", {skipAnimation: true});
|
gBrowser.addTab("about:blank", {skipAnimation: true});
|
||||||
|
|
|
@ -83,8 +83,7 @@ function test() {
|
||||||
let numTests = 4;
|
let numTests = 4;
|
||||||
let completedTests = 0;
|
let completedTests = 0;
|
||||||
|
|
||||||
// access the pref service just once
|
let tabMinWidth = parseInt(getComputedStyle(gBrowser.selectedTab, null).minWidth);
|
||||||
let tabMinWidth = gPrefService.getIntPref("browser.tabs.tabMinWidth");
|
|
||||||
|
|
||||||
function runTest(testNum, totalTabs, selectedTab, shownTabs, order) {
|
function runTest(testNum, totalTabs, selectedTab, shownTabs, order) {
|
||||||
let test = {
|
let test = {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче