Drop support for Firefox 30 or older versions.

Because Firefox 31 becomes new ESR.
This commit is contained in:
Piro / YUKI Hiroshi 2014-07-27 02:44:23 +09:00
parent fffcd3172f
commit 503803c076
10 changed files with 27 additions and 126 deletions

View File

@ -34,11 +34,9 @@ skin treestyletab classic/1.0 skin/classic/treestyletab/
skin treestyletab-group classic/1.0 skin/classic/treestyletab-group-basic/
skin treestyletab-group classic/1.0 skin/classic/treestyletab-group-aero/ os=WINNT osversion>=6
override chrome://treestyletab/skin/platform-base.css chrome://treestyletab/skin/dummy.css os=Darwin
override chrome://treestyletab/skin/platform-base.css chrome://treestyletab/skin/Darwin-base.css os=Darwin appversion>=29.0a1
override chrome://treestyletab/skin/platform-base.css chrome://treestyletab/skin/Darwin-base.css os=Darwin
override chrome://treestyletab/skin/platform-base.css chrome://treestyletab/skin/Linux-base.css os=Linux
override chrome://treestyletab/skin/platform-base.css chrome://treestyletab/skin/dummy.css os=WINNT
override chrome://treestyletab/skin/platform-base.css chrome://treestyletab/skin/WINNT-base.css os=WINNT appversion>=29.0a1
override chrome://treestyletab/skin/platform-base.css chrome://treestyletab/skin/WINNT-base.css os=WINNT
override chrome://treestyletab/skin/platform-styled.css chrome://treestyletab/skin/Darwin-styled.css os=Darwin
override chrome://treestyletab/skin/platform-styled.css chrome://treestyletab/skin/dummy.css os=Linux
override chrome://treestyletab/skin/platform-styled.css chrome://treestyletab/skin/WINNT-styled.css os=WINNT
@ -46,12 +44,10 @@ override chrome://treestyletab/skin/platform-styled.css chrome://treestyletab/sk
override chrome://treestyletab/skin/ui.css chrome://treestyletab/skin/ui-base.css
override chrome://treestyletab/skin/ui.css chrome://treestyletab/skin/ui-australis.css appversion>=29.0a1
override chrome://treestyletab/skin/Linux-tabs-on-bottom.css chrome://treestyletab/skin/dummy.css os=Linux appversion>=29.0a1
override chrome://treestyletab/skin/square/platform.css chrome://treestyletab/skin/square/Darwin.css os=Darwin
override chrome://treestyletab/skin/square/platform.css chrome://treestyletab/skin/square/Linux.css os=Linux
override chrome://treestyletab/skin/square/platform.css chrome://treestyletab/skin/dummy.css os=WINNT
override chrome://treestyletab/skin/square/disable-closebox-bg.css chrome://treestyletab/skin/dummy.css os=Linux appversion>=29.0b4
override chrome://treestyletab/skin/square/disable-closebox-bg.css chrome://treestyletab/skin/dummy.css os=Linux
override chrome://treestyletab/skin/metal/platform.css chrome://treestyletab/skin/metal/Darwin.css os=Darwin
override chrome://treestyletab/skin/metal/platform.css chrome://treestyletab/skin/dummy.css os=WINNT
@ -61,8 +57,7 @@ override chrome://treestyletab/skin/platform-config.css chrome://treestyletab/sk
override chrome://treestyletab/skin/platform-config.css chrome://treestyletab/skin/Linux-config.css os=Linux
override chrome://treestyletab/skin/platform-config.css chrome://treestyletab/skin/dummy.css os=WINNT
override chrome://treestyletab/content/base-toolbar-binding.xml chrome://global/content/bindings/toolbar.xml
override chrome://treestyletab/content/base-toolbar-binding.xml chrome://browser/content/customizableui/toolbar.xml appversion>=29.0a1
override chrome://treestyletab/content/base-toolbar-binding.xml chrome://browser/content/customizableui/toolbar.xml
resource treestyletab-modules modules/

View File

@ -60,10 +60,8 @@ var TreeStyleTabWindowHelper = {
if ('BrowserOpenTab' in window) {
eval('window.BrowserOpenTab = '+
window.BrowserOpenTab.toSource().replace(
// loadOneTab => Firefox 10 or olders
// openUILinkIn => Firefox 11 or later
/(gBrowser\.loadOneTab\(|openUILinkIn\(.+\,\s*"tab"\))/,
'gBrowser.treeStyleTab.onBeforeNewTabCommand(); $1'
'openUILinkIn(',
'gBrowser.treeStyleTab.onBeforeNewTabCommand(); $&'
)
);
}
@ -198,8 +196,8 @@ var TreeStyleTabWindowHelper = {
)
);
if ('BrowserSearch' in window) {
if ('_loadSearch' in BrowserSearch) {
if ('BrowserSearch' in window &&
'_loadSearch' in BrowserSearch) {
eval('BrowserSearch._loadSearch = '+
BrowserSearch._loadSearch.toSource().replace(
'openLinkIn(',
@ -207,15 +205,6 @@ var TreeStyleTabWindowHelper = {
)
);
}
else if ('loadSearch' in BrowserSearch) { // Firefox 24 and olders
eval('BrowserSearch.loadSearch = '+
BrowserSearch.loadSearch.toSource().replace(
'openLinkIn(',
'TreeStyleTabService.onBeforeBrowserSearch(arguments[0], useNewTab); $&'
)
);
}
}
if ('openLinkIn' in window) {
eval('window.openLinkIn = '+

View File

@ -1,7 +1,8 @@
# History
- master/HEAD
* Restore tab position for "Undo Close Tab" command correctly on Firefox 29 and newer versions.
* Drop support for Firefox 30 and older versions
* Restore tab position for "Undo Close Tab" command correctly.
* Works on Nightly 33.0a1 with the preference `dom.compartment_per_addon`=`true`.
* Update tabbar appearance correctly, after toolbar customization.
* Update fr-FR locale, by AxlMun. Thanks!

View File

@ -1,7 +1,8 @@
# 更新履歴
- master/HEAD
* Firefox 29以降において、閉じたタブを開き直したときの位置がおかしくなる問題を修正
* Firefox 30およびそれ以前のバージョンへの対応を終了
* 閉じたタブを開き直したときの位置がおかしくなる問題を修正
* Nightly 33.0a1において `dom.compartment_per_addon`=`true` に設定した場合でも動作するように暫定的に対処
* ツールバーカスタマイズを終えた後にタブバーの外観が壊れていたのを修正
* fr-FR ロケール更新by AxlMun. Thanks!

View File

@ -207,7 +207,7 @@
<em:targetApplication>
<RDF:Description em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
em:minVersion="24.0"
em:minVersion="31.0"
em:maxVersion="33.0a1" />
</em:targetApplication>
</RDF:Description>

View File

@ -520,13 +520,6 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
var baseX = this.tabStrip.boxObject.screenX - this.document.documentElement.boxObject.screenX;
/**
* Hacks for Firefox 9 or olders.
* In a box with "direction: rtr", we have to position tabs
* by margin-right, because the basic position becomes
* "top-right" instead of "top-left".
*/
var remainder = maxWidth - (maxCol * width);
var shrunkenOffset = (this.position == 'right' && tabbarPlaceHolderWidth) ?
tabbarWidth - tabbarPlaceHolderWidth :
0 ;
@ -968,35 +961,6 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
if (!aTab.linkedBrowser.__treestyletab__toBeRestored)
aTab.linkedBrowser.__treestyletab__toBeRestored = utils.isTabNotRestoredYet(aTab);
/**
* XXX Dirty hack for Firefox 28 and older, because
* there is no way to know when the tab is readied to be restored...
*/
var b = aTab.linkedBrowser;
if (!utils.shouldUseMessageManager && !b.__treestyletab__stop) {
let self = this;
b.__treestyletab__stop = b.stop;
b.stop = function TSTBrowser_stopHook(...aArgs) {
try {
var stack = Components.stack;
while (stack)
{
if (stack.name == 'sss_restoreHistoryPrecursor' ||
stack.name == 'ssi_restoreHistoryPrecursor' ||
stack.filename == 'resource:///modules/sessionstore/SessionStore.jsm') {
self.onRestoreTabContentStarted(aTab);
break;
}
stack = stack.caller;
}
}
catch(e) {
dump(e+'\n'+e.stack+'\n');
}
return this.__treestyletab__stop.apply(this, aArgs);
};
}
this.initTabAttributes(aTab);
this.initTabContents(aTab);
@ -6642,16 +6606,13 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
var tabsToRestore = 0; // it is the number of pending tabs.
if (utils.SessionStoreInternal &&
utils.SessionStoreInternal._browserEpochs) {
// for Firefox 29 and later
// (after https://bugzilla.mozilla.org/show_bug.cgi?id=942374)
let browserEpochs = utils.SessionStoreInternal._browserEpochs;
tabsToRestore = tabs.filter(function(aTab) {
return browserEpochs.has(aTab.linkedBrowser.permanentKey);
}).length;
}
else {
// for Firefox 24 and old versions
tabsToRestore = this.window.__SS_tabsToRestore;
Components.utils.reportError(new Error('There is no property named "_browserEpochs"!!'));
}
dump('TSTBrowser::restoreTree\n');

View File

@ -244,22 +244,6 @@ let TreeStyleTabUtils = {
},
get shouldUseMessageManager()
{
if (this._shouldUseMessageManager !== null)
return this._shouldUseMessageManager;
try { // detect Firefox 29 and later
Cu.import('resource:///modules/sessionstore/ContentRestore.jsm', {});
this._shouldUseMessageManager = true;
}
catch(e) {
this._shouldUseMessageManager = false;
}
return this._shouldUseMessageManager;
},
_shouldUseMessageManager: undefined,
isTabNotRestoredYet : function utils_isTabNotRestoredYet(aTab)
{
var browser = aTab.linkedBrowser;
@ -304,26 +288,11 @@ let TreeStyleTabUtils = {
getShortcutOrURI : function utils_getShortcutOrURI(aBrowserWindow, aURI)
{
if (aBrowserWindow.getShortcutOrURI) // Firefox 24 and older
return aBrowserWindow.getShortcutOrURI(aURI);
var getShortcutOrURIAndPostData = aBrowserWindow.getShortcutOrURIAndPostData;
var done = false;
if (getShortcutOrURIAndPostData.length == 2) {
// Firefox 31 and later, after https://bugzilla.mozilla.org/show_bug.cgi?id=989984
getShortcutOrURIAndPostData(aURI, function(aData) {
aBrowserWindow.getShortcutOrURIAndPostData(aURI, function(aData) {
aURI = aData.url;
done = true;
});
}
else {
// Firefox 25-30
Task.spawn(function() {
var data = yield getShortcutOrURIAndPostData(aURI);
aURI = data.url;
done = true;
});
}
// this should be rewritten in asynchronous style...
var thread = Cc['@mozilla.org/thread-manager;1'].getService().mainThread;

View File

@ -365,8 +365,6 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
w.addEventListener('beforecustomization', this, true);
w.addEventListener('aftercustomization', this, false);
// for Firefox 29 and later, after https://bugzilla.mozilla.org/show_bug.cgi?id=942374
if (w.messageManager && utils.shouldUseMessageManager)
w.messageManager.addMessageListener('SessionStore:restoreTabContentStarted', this);
this.fullscreenObserver = new FullscreenObserver(this.window);
@ -499,8 +497,6 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
w.removeEventListener('beforecustomization', this, true);
w.removeEventListener('aftercustomization', this, false);
// for Firefox 29 and later, after https://bugzilla.mozilla.org/show_bug.cgi?id=942374
if (w.messageManager && utils.shouldUseMessageManager)
w.messageManager.removeMessageListener('SessionStore:restoreTabContentStarted', this);
this.fullscreenObserver.destroy();
@ -859,7 +855,6 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
prefs.getPref('browser.ctrlTab.previews');
},
// for Firefox 29 and later, after https://bugzilla.mozilla.org/show_bug.cgi?id=942374
receiveMessage : function TSTWindow_receiveMessage(aMessage)
{
var browser = aMessage.target;
@ -1409,8 +1404,7 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
var checked = { value:true };
var w = this.window;
w.focus();
var message = utils.tabbrowserBundle.getFormattedString('tabs.closeWarningMultipleTabs', [aTabsCount]) || // Firefox 28 and older
w.PluralForm.get(aTabsCount, utils.tabbrowserBundle.getString('tabs.closeWarningMultiple')).replace('#1', aTabsCount) ; // Firefox 29 and later
var message = w.PluralForm.get(aTabsCount, utils.tabbrowserBundle.getString('tabs.closeWarningMultiple')).replace('#1', aTabsCount);
var shouldClose = Services.prompt.confirmEx(w,
utils.tabbrowserBundle.getString('tabs.closeWarningTitle'),
message,

View File

@ -1,5 +1,3 @@
@import url("./Linux-tabs-on-bottom.css");
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* splitter for floating & autohide tab bar */

View File

@ -1,7 +0,0 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* bottom border of the "Tabs on Bottom" toolbox */
#main-window[treestyletab-mode="vertical"]:not([disablechrome])
#navigator-toolbox:not([tabsontop="true"]) {
border-bottom: 1px solid ThreeDShadow;
}