don't update _notifyBackgroundTab twice

This commit is contained in:
Piro / SHIMODA Hiroshi 2011-01-22 13:43:43 +09:00
parent b665a8ca11
commit 7aed5e240a

View File

@ -1063,20 +1063,23 @@ TreeStyleTabBrowser.prototype = {
); );
} }
eval('b.mTabContainer._notifyBackgroundTab = '+ source = b.mTabContainer._notifyBackgroundTab.toSource();
b.mTabContainer._notifyBackgroundTab.toSource().replace( if (source.indexOf('TreeStyleTabService.getTabBrowserFromChild') < 0) {
'{', eval('b.mTabContainer._notifyBackgroundTab = '+
'{ var treeStyleTab = TreeStyleTabService.getTabBrowserFromChild(this).treeStyleTab;' source.toSource().replace(
).replace( '{',
/\.screenX/g, '[treeStyleTab.positionProp]' '{ var treeStyleTab = TreeStyleTabService.getTabBrowserFromChild(this).treeStyleTab;'
).replace( ).replace(
/\.width/g, '[treeStyleTab.sizeProp]' /\.screenX/g, '[treeStyleTab.positionProp]'
).replace( ).replace(
/\.left/g, '[treeStyleTab.startProp]' /\.width/g, '[treeStyleTab.sizeProp]'
).replace( ).replace(
/\.right/g, '[treeStyleTab.endProp]' /\.left/g, '[treeStyleTab.startProp]'
) ).replace(
); /\.right/g, '[treeStyleTab.endProp]'
)
);
}
if (b.tabContainer && '_getDropIndex' in b.tabContainer) { // Firefox 4.0 or later if (b.tabContainer && '_getDropIndex' in b.tabContainer) { // Firefox 4.0 or later
eval('b.tabContainer._getDropIndex = '+ eval('b.tabContainer._getDropIndex = '+