From 6615c628f970c933c0d8dff4a870514c676ea3fb Mon Sep 17 00:00:00 2001 From: piro Date: Fri, 2 Jul 2010 01:51:55 +0000 Subject: [PATCH] =?UTF-8?q?Minefield=204.0b2pre=E3=81=A7=E8=B5=B7=E5=8B=95?= =?UTF-8?q?=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=8F=E3=81=AA=E3=82=8B=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=E3=82=92=E8=A7=A3=E6=B6=88?= 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@6796 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/preloadImages.js | 4 ++-- content/treestyletab/treestyletab.js | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/content/treestyletab/preloadImages.js b/content/treestyletab/preloadImages.js index 9a202539..8e58dbd0 100644 --- a/content/treestyletab/preloadImages.js +++ b/content/treestyletab/preloadImages.js @@ -30,7 +30,7 @@ TreeStyleTabService._preLoadImages = { 'chrome://treestyletab/skin/metal/shadow-active-l.png', 'chrome://treestyletab/skin/metal/shadow-inactive-l.png' ].concat( - 'MozBorderImage' in document.documentElement.style ? + TreeStyleTabService.Comparator.compare(TreeStyleTabService.XULAppInfo.version, '3.5') >= 0 ? [ 'chrome://treestyletab/skin/metal/tab-active-middle.png', 'chrome://treestyletab/skin/metal/tab-active-middle-selected.png', @@ -47,7 +47,7 @@ TreeStyleTabService._preLoadImages = { 'chrome://treestyletab/skin/metal/shadow-active-r.png', 'chrome://treestyletab/skin/metal/shadow-inactive-r.png' ].concat( - 'MozBorderImage' in document.documentElement.style ? + TreeStyleTabService.Comparator.compare(TreeStyleTabService.XULAppInfo.version, '3.5') >= 0 ? [ 'chrome://treestyletab/skin/metal/tab-active-middle.png', 'chrome://treestyletab/skin/metal/tab-active-middle-selected.png', diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index 9226a25e..781113d6 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -9,8 +9,11 @@ var TreeStyleTabService = { get currentTabbarPosition() /* PUBLIC API */ { - return this.browser.getAttribute(this.kTABBAR_POSITION) || - this.utils.currentTabbarPosition; + return ( + // Don't touch to the element before it is initialized by XBL constructor. + (this.preInitialized && this.browser.getAttribute(this.kTABBAR_POSITION)) || + this.utils.currentTabbarPosition + ); }, set currentTabbarPosition(aValue) {