From ef2e0984661f552c8791199f80bd36862b192d71 Mon Sep 17 00:00:00 2001 From: piro Date: Mon, 13 Sep 2010 04:57:53 +0000 Subject: [PATCH] =?UTF-8?q?*=20Firefox=202=E7=94=A8=E3=81=AE=E5=8F=A4?= =?UTF-8?q?=E3=81=84=E3=82=B3=E3=83=BC=E3=83=89=E3=82=92=E5=89=8A=E9=99=A4?= =?UTF-8?q?=20*=20isVertical,=20isFixed=E3=81=AFDOMContentLoaded=E4=BB=A5?= =?UTF-8?q?=E5=89=8D=E3=81=AFDOM=E3=82=92=E5=8F=82=E7=85=A7=E3=81=9B?= =?UTF-8?q?=E3=81=9A=E3=81=AB=E8=A8=AD=E5=AE=9A=E5=80=A4=E3=82=92=E3=81=9D?= =?UTF-8?q?=E3=81=AE=E3=81=BE=E3=81=BE=E8=BF=94=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@7181 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletab-tmp.css | 17 ---------------- content/treestyletab/treestyletab.css | 15 -------------- content/treestyletab/treestyletabbrowser.js | 22 ++++++++++----------- modules/utils.js | 1 - 4 files changed, 10 insertions(+), 45 deletions(-) diff --git a/content/treestyletab/treestyletab-tmp.css b/content/treestyletab/treestyletab-tmp.css index a62ff957..d82db55a 100644 --- a/content/treestyletab/treestyletab-tmp.css +++ b/content/treestyletab/treestyletab-tmp.css @@ -23,20 +23,3 @@ tabbrowser[treestyletab-mode="vertical"] tabs[flowing] > * .tabs-frame { -moz-box-flex: 1 !important; } - -:root[treestyletab-enable-compatibility-tmp="true"] - tabbrowser[treestyletab-tabbar-position="left"][treestyletab-scrollbar-inverted="true"] .tabs-frame { - direction: rtl !important; - /* if there is scrollbar, closeboxes of tabs cannot be clicked because - they are "under the rightside scrollbar" even if it is moved to - leftside by the above rule. This seems a bug. Following rules move - the "hidden rightside scrollbar" out of the box, then we can click - closeboxes again. */ - margin-right: -1em !important; - padding-right: 1em !important; -} - -:root[treestyletab-enable-compatibility-tmp="true"] - tabbrowser[treestyletab-tabbar-position="left"][treestyletab-scrollbar-inverted="true"] .tabbrowser-tabs[firefox2][flowing][closebutton][hideAllTabsButton][tabBarSpace] .tabbrowser-tab { - direction: ltr !important; -} diff --git a/content/treestyletab/treestyletab.css b/content/treestyletab/treestyletab.css index b95560a3..4ec7184a 100644 --- a/content/treestyletab/treestyletab.css +++ b/content/treestyletab/treestyletab.css @@ -74,21 +74,6 @@ tabbrowser[treestyletab-mode="vertical"] .tabs-stack > *:first-child + * > hbox: -moz-box-flex: 1 !important; } -.tabbrowser-tabs[treestyletab-tabbar-position="left"][treestyletab-scrollbar-inverted="true"] .tabbrowser-arrowscrollbox > scrollbox { - direction: rtl !important; - /* if there is scrollbar, closeboxes of tabs cannot be clicked because - they are "under the rightside scrollbar" even if it is moved to - leftside by the above rule. This seems a bug. Following rules move - the "hidden rightside scrollbar" out of the box, then we can click - closeboxes again. */ - margin-right: -1em !important; - padding-right: 1em !important; -} - -.tabbrowser-tabs[treestyletab-tabbar-position="left"][treestyletab-scrollbar-inverted="true"] .tabbrowser-arrowscrollbox > scrollbox > .scrollbox-innerbox { - direction: ltr !important; -} - .tabbrowser-tabs[treestyletab-mode="vertical"] .tabbrowser-tab:not([treestyletab-removed="true"]):not([pinned]), .tabbrowser-tabs[treestyletab-mode="vertical"] diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 104412b1..2ba97fb4 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -107,6 +107,9 @@ TreeStyleTabBrowser.prototype = { get isVertical() { + if (!this.preInitialized) + return ['left', 'right'].indexOf(this.currentTabbarPosition) > -1; + var b = this.mTabBrowser; if (!b) return false; var box = this.scrollBox || b.mTabContainer ; @@ -120,14 +123,19 @@ TreeStyleTabBrowser.prototype = { get isFixed() { + var orient = this.isVertical ? 'vertical' : 'horizontal' ; + if (!this.preInitialized) + return this.getTreePref('tabbar.fixed.'+orient); + var b = this.mTabBrowser; if (!b) return false; - return b.getAttribute(this.kFIXED+'-'+(this.isVertical ? 'vertical' : 'horizontal')) == 'true'; + return b.getAttribute(this.kFIXED+'-'+orient) == 'true'; }, isTabInViewport : function TSTBrowser_isTabInViewport(aTab) { - if (!aTab) return false; + if (!this.preInitialized || !aTab) + return false; if (aTab.getAttribute('pinned') == 'true') return true; var tabBox = aTab.boxObject; @@ -724,16 +732,6 @@ TreeStyleTabBrowser.prototype = { } } - /* To move up content area on the tab bar, switch tab. - If we don't do it, a gray space appears on the content area - by negative margin of it. */ - if (this.currentTabbarPosition == 'left' && - b.getAttribute(this.kSCROLLBAR_INVERTED) == 'true') { - b.removeTab( - b.selectedTab = b.addTab('about:blank') - ); - } - this.ObserverService.addObserver(this, 'TreeStyleTab:indentModified', false); this.ObserverService.addObserver(this, 'TreeStyleTab:collapseExpandAllSubtree', false); this.ObserverService.addObserver(this, 'private-browsing-change-granted', false); diff --git a/modules/utils.js b/modules/utils.js index 41d7414f..33849613 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -93,7 +93,6 @@ var TreeStyleTabUtils = { kTAB_INVERTED : 'treestyletab-tab-inverted', kTAB_CONTENTS_INVERTED : 'treestyletab-tab-contents-inverted', kCLOSEBOX_INVERTED : 'treestyletab-closebox-inverted', - kSCROLLBAR_INVERTED : 'treestyletab-scrollbar-inverted', kTWISTY_HOVER : 'treestyletab-twisty-hover', kTWISTY_STYLE : 'treestyletab-twisty-style',