内部的なAPIを変更
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1599 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
e483252508
commit
2f70866c2b
@ -248,19 +248,19 @@ var TreeStyleTabService = {
|
||||
|
||||
initTabAttributes : function(aTab, aTabBrowser)
|
||||
{
|
||||
var b = aTabBrowser || this.getTabBrowserFromChildren(aTab);
|
||||
var b = aTabBrowser || this.getTabBrowserFromChild(aTab);
|
||||
this.getTempTreeStyleTab(b).initTabAttributes(aTab);
|
||||
},
|
||||
|
||||
initTabContents : function(aTab, aTabBrowser)
|
||||
{
|
||||
var b = aTabBrowser || this.getTabBrowserFromChildren(aTab);
|
||||
var b = aTabBrowser || this.getTabBrowserFromChild(aTab);
|
||||
this.getTempTreeStyleTab(b).initTabContents(aTab);
|
||||
},
|
||||
|
||||
initTabContentsOrder : function(aTab, aTabBrowser)
|
||||
{
|
||||
var b = aTabBrowser || this.getTabBrowserFromChildren(aTab);
|
||||
var b = aTabBrowser || this.getTabBrowserFromChild(aTab);
|
||||
this.getTempTreeStyleTab(b).initTabContentsOrder(aTab);
|
||||
},
|
||||
|
||||
@ -345,7 +345,7 @@ var TreeStyleTabService = {
|
||||
return null;
|
||||
},
|
||||
|
||||
getTabBrowserFromChildren : function(aTab)
|
||||
getTabBrowserFromChild : function(aTab)
|
||||
{
|
||||
if (!aTab) return null;
|
||||
|
||||
@ -361,7 +361,7 @@ var TreeStyleTabService = {
|
||||
|
||||
getTabBrowserFromFrame : function(aFrame)
|
||||
{
|
||||
return ('SplitBrowser' in window) ? this.getTabBrowserFromChildren(SplitBrowser.getSubBrowserAndBrowserFromFrame(aFrame.top).browser) : this.browser ;
|
||||
return ('SplitBrowser' in window) ? this.getTabBrowserFromChild(SplitBrowser.getSubBrowserAndBrowserFromFrame(aFrame.top).browser) : this.browser ;
|
||||
},
|
||||
|
||||
getFrameFromTabBrowserElements : function(aFrameOrTabBrowser)
|
||||
@ -375,7 +375,7 @@ var TreeStyleTabService = {
|
||||
frame = frame.contentWindow;
|
||||
}
|
||||
else {
|
||||
frame = this.getTabBrowserFromChildren(frame);
|
||||
frame = this.getTabBrowserFromChild(frame);
|
||||
if (!frame) return null;
|
||||
frame = frame.contentWindow;
|
||||
}
|
||||
@ -417,7 +417,7 @@ var TreeStyleTabService = {
|
||||
getTabById : function(aId, aTabBrowserChildren)
|
||||
{
|
||||
if (!aId) return null;
|
||||
var b = this.getTabBrowserFromChildren(aTabBrowserChildren);
|
||||
var b = aTabBrowserChildren ? this.getTabBrowserFromChild(aTabBrowserChildren) : null ;
|
||||
if (!b) b = this.browser;
|
||||
return this.evaluateXPath(
|
||||
'descendant::xul:tab[@'+this.kID+' = "'+aId+'"]',
|
||||
@ -672,13 +672,13 @@ var TreeStyleTabService = {
|
||||
'{',
|
||||
'{ var TSTTabBrowser = this;'
|
||||
).replace(
|
||||
/\.screenX/g, '[TreeStyleTabService.getTabBrowserFromChildren(TSTTabBrowser).treeStyleTab.positionProp]'
|
||||
/\.screenX/g, '[TreeStyleTabService.getTabBrowserFromChild(TSTTabBrowser).treeStyleTab.positionProp]'
|
||||
).replace(
|
||||
/\.width/g, '[TreeStyleTabService.getTabBrowserFromChildren(TSTTabBrowser).treeStyleTab.sizeProp]'
|
||||
/\.width/g, '[TreeStyleTabService.getTabBrowserFromChild(TSTTabBrowser).treeStyleTab.sizeProp]'
|
||||
).replace( // Tab Mix Plus
|
||||
/\.screenY/g, '[TreeStyleTabService.getTabBrowserFromChildren(TSTTabBrowser).treeStyleTab.invertedPositionProp]'
|
||||
/\.screenY/g, '[TreeStyleTabService.getTabBrowserFromChild(TSTTabBrowser).treeStyleTab.invertedPositionProp]'
|
||||
).replace( // Tab Mix Plus
|
||||
/\.height/g, '[TreeStyleTabService.getTabBrowserFromChildren(TSTTabBrowser).treeStyleTab.invertedSizeProp]'
|
||||
/\.height/g, '[TreeStyleTabService.getTabBrowserFromChild(TSTTabBrowser).treeStyleTab.invertedSizeProp]'
|
||||
).replace(
|
||||
/(return true;)/,
|
||||
<><![CDATA[
|
||||
@ -1073,7 +1073,7 @@ catch(e) {
|
||||
{
|
||||
this.setPref(
|
||||
'extensions.treestyletab.tabbar.width',
|
||||
TreeStyleTabService.getTabBrowserFromChildren(aEvent.currentTarget)
|
||||
TreeStyleTabService.getTabBrowserFromChild(aEvent.currentTarget)
|
||||
.mStrip.boxObject.width
|
||||
);
|
||||
},
|
||||
@ -1122,7 +1122,7 @@ catch(e) {
|
||||
tabs = [aTabOrTabs];
|
||||
}
|
||||
|
||||
var b = this.getTabBrowserFromChildren(tabs[0]);
|
||||
var b = this.getTabBrowserFromChild(tabs[0]);
|
||||
var descendant = [];
|
||||
for (var i = 0, maxi = tabs.length; i < maxi; i++)
|
||||
{
|
||||
@ -1147,7 +1147,7 @@ catch(e) {
|
||||
|
||||
cleanUpTabsArray : function(aTabs)
|
||||
{
|
||||
var b = this.getTabBrowserFromChildren(aTabs[0]);
|
||||
var b = this.getTabBrowserFromChild(aTabs[0]);
|
||||
|
||||
var self = this;
|
||||
aTabs = aTabs.map(function(aTab) { return aTab.getAttribute(self.kID); });
|
||||
|
@ -115,7 +115,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
{
|
||||
if (TreeStyleTabService.getTreePref('focusMode') == TreeStyleTabService.kFOCUS_VISIBLE) {
|
||||
(function(aDir, aWrap, aSelf) {
|
||||
var treeStyleTab = TreeStyleTabService.getTabBrowserFromChildren(aSelf).treeStyleTab;
|
||||
var treeStyleTab = TreeStyleTabService.getTabBrowserFromChild(aSelf).treeStyleTab;
|
||||
var nextTab = (aDir < 0) ? treeStyleTab.getPreviousVisibleTab(aSelf.selectedItem) : treeStyleTab.getNextVisibleTab(aSelf.selectedItem) ;
|
||||
if (!nextTab && aWrap) {
|
||||
var xpathResult = TreeStyleTabService.evaluateXPath(
|
||||
@ -142,7 +142,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
'{',
|
||||
<><![CDATA[
|
||||
{
|
||||
var treeStyleTab = TreeStyleTabService.getTabBrowserFromChildren(this).treeStyleTab;
|
||||
var treeStyleTab = TreeStyleTabService.getTabBrowserFromChild(this).treeStyleTab;
|
||||
if (!treeStyleTab.isTabInViewport(this.selectedItem)) {
|
||||
treeStyleTab.scrollToTab(this.selectedItem);
|
||||
return;
|
||||
@ -154,7 +154,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
eval('b.mTabContainer._notifyBackgroundTab = '+
|
||||
b.mTabContainer._notifyBackgroundTab.toSource().replace(
|
||||
'{',
|
||||
'{ var treeStyleTab = TreeStyleTabService.getTabBrowserFromChildren(this).treeStyleTab;'
|
||||
'{ var treeStyleTab = TreeStyleTabService.getTabBrowserFromChild(this).treeStyleTab;'
|
||||
).replace(
|
||||
/\.screenX/g, '[treeStyleTab.positionProp]'
|
||||
).replace(
|
||||
|
Loading…
Reference in New Issue
Block a user