name to functions
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5612 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
750d476813
commit
0aae88d7c6
@ -11,7 +11,7 @@ var TreeStyleTabBookmarksService = {
|
|||||||
_BookmarksService : null,
|
_BookmarksService : null,
|
||||||
|
|
||||||
|
|
||||||
beginAddBookmarksFromTabs : function(aTabs) /* PUBLIC API */
|
beginAddBookmarksFromTabs : function TSTBMService_beginAddBookmarksFromTabs(aTabs) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
this._addingBookmarks = [];
|
this._addingBookmarks = [];
|
||||||
this._addingBookmarkTreeStructure = this
|
this._addingBookmarkTreeStructure = this
|
||||||
@ -24,7 +24,7 @@ var TreeStyleTabBookmarksService = {
|
|||||||
this.BookmarksService.addObserver(this, false);
|
this.BookmarksService.addObserver(this, false);
|
||||||
},
|
},
|
||||||
|
|
||||||
endAddBookmarksFromTabs : function() /* PUBLIC API */
|
endAddBookmarksFromTabs : function TSTBMService_endAddBookmarksFromTabs() /* PUBLIC API */
|
||||||
{
|
{
|
||||||
this.BookmarksService.removeObserver(this);
|
this.BookmarksService.removeObserver(this);
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ var TreeStyleTabBookmarksService = {
|
|||||||
this._addingBookmarkTreeStructure = [];
|
this._addingBookmarkTreeStructure = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
bookmarkTabSubTree : function(aTabOrTabs)
|
bookmarkTabSubTree : function TSTBMService_bookmarkTabSubTree(aTabOrTabs)
|
||||||
{
|
{
|
||||||
var tabs = aTabOrTabs;
|
var tabs = aTabOrTabs;
|
||||||
if (!(tabs instanceof Array)) {
|
if (!(tabs instanceof Array)) {
|
||||||
@ -76,7 +76,7 @@ var TreeStyleTabBookmarksService = {
|
|||||||
this.endAddBookmarksFromTabs();
|
this.endAddBookmarksFromTabs();
|
||||||
},
|
},
|
||||||
|
|
||||||
getParentItem : function(aId)
|
getParentItem : function TSTBMService_getParentItem(aId)
|
||||||
{
|
{
|
||||||
if (aId < 0) return -1;
|
if (aId < 0) return -1;
|
||||||
var annotations = PlacesUtils.getAnnotationsForItem(aId);
|
var annotations = PlacesUtils.getAnnotationsForItem(aId);
|
||||||
@ -88,7 +88,7 @@ var TreeStyleTabBookmarksService = {
|
|||||||
return -1;
|
return -1;
|
||||||
},
|
},
|
||||||
|
|
||||||
getTreeStructureFromItems : function(aIDs, aDefaultParentID)
|
getTreeStructureFromItems : function TSTBMService_getTreeStructureFromItems(aIDs, aDefaultParentID)
|
||||||
{
|
{
|
||||||
/* this returns...
|
/* this returns...
|
||||||
[A] => -1 (parent is not in this tree)
|
[A] => -1 (parent is not in this tree)
|
||||||
@ -143,7 +143,7 @@ var TreeStyleTabBookmarksService = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// based on PlacesUtils.getURLsForContainerNode()
|
// based on PlacesUtils.getURLsForContainerNode()
|
||||||
getItemIdsForContainerNode : function(aNode)
|
getItemIdsForContainerNode : function TSTBMService_getItemIdsForContainerNode(aNode)
|
||||||
{
|
{
|
||||||
var ids = [];
|
var ids = [];
|
||||||
if (!aNode || !PlacesUtils.nodeIsContainer(aNode)) return ids;
|
if (!aNode || !PlacesUtils.nodeIsContainer(aNode)) return ids;
|
||||||
@ -171,7 +171,7 @@ var TreeStyleTabBookmarksService = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
init : function()
|
init : function TSTBMService_init()
|
||||||
{
|
{
|
||||||
window.removeEventListener('load', this, false);
|
window.removeEventListener('load', this, false);
|
||||||
|
|
||||||
@ -302,20 +302,20 @@ var TreeStyleTabBookmarksService = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// observer for nsINavBookmarksService
|
// observer for nsINavBookmarksService
|
||||||
onItemAdded : function(aID, aFolderID, aPosition)
|
onItemAdded : function TSTBMService_onItemAdded(aID, aFolderID, aPosition)
|
||||||
{
|
{
|
||||||
this._addingBookmarks.push({
|
this._addingBookmarks.push({
|
||||||
id : aID
|
id : aID
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onItemRemoved : function(aID, aFolderID, aPosition) {},
|
onItemRemoved : function TSTBMService_onItemRemoved(aID, aFolderID, aPosition) {},
|
||||||
onItemMoved : function(aID, aFolderID, aPosition) {},
|
onItemMoved : function TSTBMService_onItemMoved(aID, aFolderID, aPosition) {},
|
||||||
onItemChanged : function(aID, aChange, aIsAnnotation, aNewValue) {},
|
onItemChanged : function TSTBMService_onItemChanged(aID, aChange, aIsAnnotation, aNewValue) {},
|
||||||
onItemVisited : function(aID, aHistoryID, aDate) {},
|
onItemVisited : function TSTBMService_onItemVisited(aID, aHistoryID, aDate) {},
|
||||||
onBeginUpdateBatch : function() {},
|
onBeginUpdateBatch : function TSTBMService_onBeginUpdateBatch() {},
|
||||||
onEndUpdateBatch : function() {},
|
onEndUpdateBatch : function TSTBMService_onEndUpdateBatch() {},
|
||||||
|
|
||||||
handleEvent : function(aEvent)
|
handleEvent : function TSTBMService_handleEvent(aEvent)
|
||||||
{
|
{
|
||||||
switch (aEvent.type)
|
switch (aEvent.type)
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@ var TreeStyleTabBookmarksServiceEditable = {
|
|||||||
return document.getElementById('treestyletab-parent-blank-item');
|
return document.getElementById('treestyletab-parent-blank-item');
|
||||||
},
|
},
|
||||||
|
|
||||||
init : function()
|
init : function TSTBMEditable_init()
|
||||||
{
|
{
|
||||||
// main browser window
|
// main browser window
|
||||||
if ('StarUI' in window) {
|
if ('StarUI' in window) {
|
||||||
@ -66,7 +66,7 @@ var TreeStyleTabBookmarksServiceEditable = {
|
|||||||
this.initEditUI();
|
this.initEditUI();
|
||||||
},
|
},
|
||||||
|
|
||||||
initEditUI : function()
|
initEditUI : function TSTBMEditable_initEditUI()
|
||||||
{
|
{
|
||||||
if (this.editUIInitialized || !('gEditItemOverlay' in window)) return;
|
if (this.editUIInitialized || !('gEditItemOverlay' in window)) return;
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ var TreeStyleTabBookmarksServiceEditable = {
|
|||||||
},
|
},
|
||||||
editUIInitialized : false,
|
editUIInitialized : false,
|
||||||
|
|
||||||
initParentMenuList : function()
|
initParentMenuList : function TSTBMEditable_initParentMenuList()
|
||||||
{
|
{
|
||||||
var id = gEditItemOverlay.itemId;
|
var id = gEditItemOverlay.itemId;
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ var TreeStyleTabBookmarksServiceEditable = {
|
|||||||
|
|
||||||
this.canceled = false;
|
this.canceled = false;
|
||||||
},
|
},
|
||||||
_createSiblingsFragment : function(aCurrentItem)
|
_createSiblingsFragment : function TSTBMEditable__createSiblingsFragment(aCurrentItem)
|
||||||
{
|
{
|
||||||
var items = this._getSiblingItems(aCurrentItem);
|
var items = this._getSiblingItems(aCurrentItem);
|
||||||
var treeStructure = this.getTreeStructureFromItems(items);
|
var treeStructure = this.getTreeStructureFromItems(items);
|
||||||
@ -178,7 +178,7 @@ var TreeStyleTabBookmarksServiceEditable = {
|
|||||||
}, this);
|
}, this);
|
||||||
return fragment;
|
return fragment;
|
||||||
},
|
},
|
||||||
_getItemsInFolder : function(aId)
|
_getItemsInFolder : function TSTBMEditable__getItemsInFolder(aId)
|
||||||
{
|
{
|
||||||
var count = 0;
|
var count = 0;
|
||||||
var items = [];
|
var items = [];
|
||||||
@ -200,12 +200,12 @@ var TreeStyleTabBookmarksServiceEditable = {
|
|||||||
}
|
}
|
||||||
return items;
|
return items;
|
||||||
},
|
},
|
||||||
_getSiblingItems : function(aId)
|
_getSiblingItems : function TSTBMEditable__getSiblingItems(aId)
|
||||||
{
|
{
|
||||||
return this._getItemsInFolder(PlacesUtils.bookmarks.getFolderIdForItem(aId));
|
return this._getItemsInFolder(PlacesUtils.bookmarks.getFolderIdForItem(aId));
|
||||||
},
|
},
|
||||||
|
|
||||||
saveParentFor : function(aId)
|
saveParentFor : function TSTBMEditable_saveParentFor(aId)
|
||||||
{
|
{
|
||||||
var newParentId = parseInt(this.menulist.value || -1);
|
var newParentId = parseInt(this.menulist.value || -1);
|
||||||
if (this.canceled || newParentId == this.getParentItem(aId)) return;
|
if (this.canceled || newParentId == this.getParentItem(aId)) return;
|
||||||
@ -238,13 +238,13 @@ var TreeStyleTabBookmarksServiceEditable = {
|
|||||||
if (this.instantApply) this.initParentMenuList();
|
if (this.instantApply) this.initParentMenuList();
|
||||||
},
|
},
|
||||||
|
|
||||||
onParentChange : function()
|
onParentChange : function TSTBMEditable_onParentChange()
|
||||||
{
|
{
|
||||||
if (!this.instantApply) return;
|
if (!this.instantApply) return;
|
||||||
this.saveParentFor(gEditItemOverlay.itemId);
|
this.saveParentFor(gEditItemOverlay.itemId);
|
||||||
},
|
},
|
||||||
|
|
||||||
handleEvent : function(aEvent)
|
handleEvent : function TSTBMEditable_handleEvent(aEvent)
|
||||||
{
|
{
|
||||||
switch (aEvent.type)
|
switch (aEvent.type)
|
||||||
{
|
{
|
||||||
|
@ -208,7 +208,7 @@ var TreeStyleTabService = {
|
|||||||
|
|
||||||
/* API */
|
/* API */
|
||||||
|
|
||||||
readyToOpenChildTab : function(aFrameOrTabBrowser, aMultiple, aInsertBefore) /* PUBLIC API */
|
readyToOpenChildTab : function TSTService_readyToOpenChildTab(aFrameOrTabBrowser, aMultiple, aInsertBefore) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
if (!this.getTreePref('autoAttachNewTabsAsChildren')) return;
|
if (!this.getTreePref('autoAttachNewTabsAsChildren')) return;
|
||||||
|
|
||||||
@ -234,7 +234,7 @@ var TreeStyleTabService = {
|
|||||||
ownerBrowser.treeStyleTab.insertBefore = refId;
|
ownerBrowser.treeStyleTab.insertBefore = refId;
|
||||||
},
|
},
|
||||||
|
|
||||||
readyToOpenNewTabGroup : function(aFrameOrTabBrowser, aTreeStructure) /* PUBLIC API */
|
readyToOpenNewTabGroup : function TSTService_readyToOpenNewTabGroup(aFrameOrTabBrowser, aTreeStructure) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
if (!this.getTreePref('autoAttachNewTabsAsChildren')) return;
|
if (!this.getTreePref('autoAttachNewTabsAsChildren')) return;
|
||||||
|
|
||||||
@ -250,7 +250,7 @@ var TreeStyleTabService = {
|
|||||||
ownerBrowser.treeStyleTab.treeStructure = aTreeStructure;
|
ownerBrowser.treeStyleTab.treeStructure = aTreeStructure;
|
||||||
},
|
},
|
||||||
|
|
||||||
stopToOpenChildTab : function(aFrameOrTabBrowser) /* PUBLIC API */
|
stopToOpenChildTab : function TSTService_stopToOpenChildTab(aFrameOrTabBrowser) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
var frame = this.getFrameFromTabBrowserElements(aFrameOrTabBrowser);
|
var frame = this.getFrameFromTabBrowserElements(aFrameOrTabBrowser);
|
||||||
if (!frame) return;
|
if (!frame) return;
|
||||||
@ -265,7 +265,7 @@ var TreeStyleTabService = {
|
|||||||
ownerBrowser.treeStyleTab.treeStructure = null;
|
ownerBrowser.treeStyleTab.treeStructure = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
checkToOpenChildTab : function(aFrameOrTabBrowser) /* PUBLIC API */
|
checkToOpenChildTab : function TSTService_checkToOpenChildTab(aFrameOrTabBrowser) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
var frame = this.getFrameFromTabBrowserElements(aFrameOrTabBrowser);
|
var frame = this.getFrameFromTabBrowserElements(aFrameOrTabBrowser);
|
||||||
if (!frame) return false;
|
if (!frame) return false;
|
||||||
@ -274,7 +274,7 @@ var TreeStyleTabService = {
|
|||||||
return ownerBrowser.treeStyleTab.readiedToAttachNewTab || ownerBrowser.treeStyleTab.readiedToAttachNewTabGroup ? true : false ;
|
return ownerBrowser.treeStyleTab.readiedToAttachNewTab || ownerBrowser.treeStyleTab.readiedToAttachNewTabGroup ? true : false ;
|
||||||
},
|
},
|
||||||
|
|
||||||
checkReadyToOpenNewTab : function(aInfo)
|
checkReadyToOpenNewTab : function TSTService_checkReadyToOpenNewTab(aInfo)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
‹““®‚Ì<EFBFBD>à–¾
|
‹““®‚Ì<EFBFBD>à–¾
|
||||||
@ -358,7 +358,7 @@ var TreeStyleTabService = {
|
|||||||
}
|
}
|
||||||
return openTab;
|
return openTab;
|
||||||
},
|
},
|
||||||
checkReadyToOpenNewTabOnLocationBar : function(aURI, aModifier)
|
checkReadyToOpenNewTabOnLocationBar : function TSTService_checkReadyToOpenNewTabOnLocationBar(aURI, aModifier)
|
||||||
{
|
{
|
||||||
return this.checkReadyToOpenNewTab({
|
return this.checkReadyToOpenNewTab({
|
||||||
uri : aURI,
|
uri : aURI,
|
||||||
@ -374,7 +374,7 @@ var TreeStyleTabService = {
|
|||||||
invert : this.getTreePref('urlbar.invertDefaultBehavior')
|
invert : this.getTreePref('urlbar.invertDefaultBehavior')
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
_getDomainFromURI : function(aURI)
|
_getDomainFromURI : function TSTService__getDomainFromURI(aURI)
|
||||||
{
|
{
|
||||||
if (!aURI) return null;
|
if (!aURI) return null;
|
||||||
|
|
||||||
@ -396,7 +396,7 @@ var TreeStyleTabService = {
|
|||||||
null ;
|
null ;
|
||||||
},
|
},
|
||||||
|
|
||||||
readyToOpenDivertedTab : function(aFrameOrTabBrowser)
|
readyToOpenDivertedTab : function TSTService_readyToOpenDivertedTab(aFrameOrTabBrowser)
|
||||||
{
|
{
|
||||||
var frame = this.getFrameFromTabBrowserElements(aFrameOrTabBrowser);
|
var frame = this.getFrameFromTabBrowserElements(aFrameOrTabBrowser);
|
||||||
if (!frame) return;
|
if (!frame) return;
|
||||||
@ -404,12 +404,12 @@ var TreeStyleTabService = {
|
|||||||
ownerBrowser.treeStyleTab.readiedToOpenDivertedTab = true;
|
ownerBrowser.treeStyleTab.readiedToOpenDivertedTab = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
setTabbarWidth : function(aWidth, aForceExpanded) /* PUBLIC API */
|
setTabbarWidth : function TSTService_setTabbarWidth(aWidth, aForceExpanded) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
gBrowser.treeStyleTab.autoHide.setWidth(aWidth, aForceExpanded);
|
gBrowser.treeStyleTab.autoHide.setWidth(aWidth, aForceExpanded);
|
||||||
},
|
},
|
||||||
|
|
||||||
setContentWidth : function(aWidth, aKeepWindowSize) /* PUBLIC API */
|
setContentWidth : function TSTService_setContentWidth(aWidth, aKeepWindowSize) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
var treeStyleTab = gBrowser.treeStyleTab;
|
var treeStyleTab = gBrowser.treeStyleTab;
|
||||||
var tabbarWidth = treeStyleTab.splitterWidth + (treeStyleTab.isVertical ? gBrowser.mStrip.boxObject.width : 0 );
|
var tabbarWidth = treeStyleTab.splitterWidth + (treeStyleTab.isVertical ? gBrowser.mStrip.boxObject.width : 0 );
|
||||||
@ -428,12 +428,12 @@ var TreeStyleTabService = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleAutoHide : function()
|
toggleAutoHide : function TSTService_toggleAutoHide()
|
||||||
{
|
{
|
||||||
TreeStyleTabBrowserAutoHide.toggleMode();
|
TreeStyleTabBrowserAutoHide.toggleMode();
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleFixed : function()
|
toggleFixed : function TSTService_toggleFixed()
|
||||||
{
|
{
|
||||||
var pos = this.currentTabbarPosition;
|
var pos = this.currentTabbarPosition;
|
||||||
var isVertical = (pos == 'left' || pos == 'right');
|
var isVertical = (pos == 'left' || pos == 'right');
|
||||||
@ -448,7 +448,7 @@ var TreeStyleTabService = {
|
|||||||
this.setTreePref('enableSubtreeIndent.horizontal', !this.getTreePref(pref));
|
this.setTreePref('enableSubtreeIndent.horizontal', !this.getTreePref(pref));
|
||||||
},
|
},
|
||||||
|
|
||||||
changeTabbarPosition : function(aNewPosition) /* PUBLIC API (obsolete, for backward compatibility) */
|
changeTabbarPosition : function TSTService_changeTabbarPosition(aNewPosition) /* PUBLIC API (obsolete, for backward compatibility) */
|
||||||
{
|
{
|
||||||
this.currentTabbarPosition = aNewPosition;
|
this.currentTabbarPosition = aNewPosition;
|
||||||
},
|
},
|
||||||
@ -470,24 +470,24 @@ var TreeStyleTabService = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/* backward compatibility */
|
/* backward compatibility */
|
||||||
getTempTreeStyleTab : function(aTabBrowser)
|
getTempTreeStyleTab : function TSTService_getTempTreeStyleTab(aTabBrowser)
|
||||||
{
|
{
|
||||||
return aTabBrowser.treeStyleTab || new TreeStyleTabBrowser(aTabBrowser);
|
return aTabBrowser.treeStyleTab || new TreeStyleTabBrowser(aTabBrowser);
|
||||||
},
|
},
|
||||||
|
|
||||||
initTabAttributes : function(aTab, aTabBrowser)
|
initTabAttributes : function TSTService_initTabAttributes(aTab, aTabBrowser)
|
||||||
{
|
{
|
||||||
var b = aTabBrowser || this.getTabBrowserFromChild(aTab);
|
var b = aTabBrowser || this.getTabBrowserFromChild(aTab);
|
||||||
this.getTempTreeStyleTab(b).initTabAttributes(aTab);
|
this.getTempTreeStyleTab(b).initTabAttributes(aTab);
|
||||||
},
|
},
|
||||||
|
|
||||||
initTabContents : function(aTab, aTabBrowser)
|
initTabContents : function TSTService_initTabContents(aTab, aTabBrowser)
|
||||||
{
|
{
|
||||||
var b = aTabBrowser || this.getTabBrowserFromChild(aTab);
|
var b = aTabBrowser || this.getTabBrowserFromChild(aTab);
|
||||||
this.getTempTreeStyleTab(b).initTabContents(aTab);
|
this.getTempTreeStyleTab(b).initTabContents(aTab);
|
||||||
},
|
},
|
||||||
|
|
||||||
initTabContentsOrder : function(aTab, aTabBrowser)
|
initTabContentsOrder : function TSTService_initTabContentsOrder(aTab, aTabBrowser)
|
||||||
{
|
{
|
||||||
var b = aTabBrowser || this.getTabBrowserFromChild(aTab);
|
var b = aTabBrowser || this.getTabBrowserFromChild(aTab);
|
||||||
this.getTempTreeStyleTab(b).initTabContentsOrder(aTab);
|
this.getTempTreeStyleTab(b).initTabContentsOrder(aTab);
|
||||||
@ -495,16 +495,16 @@ var TreeStyleTabService = {
|
|||||||
|
|
||||||
/* Utilities */
|
/* Utilities */
|
||||||
|
|
||||||
stopRendering : function()
|
stopRendering : function TSTService_stopRendering()
|
||||||
{
|
{
|
||||||
window['piro.sakura.ne.jp'].stopRendering.stop();
|
window['piro.sakura.ne.jp'].stopRendering.stop();
|
||||||
},
|
},
|
||||||
startRendering : function()
|
startRendering : function TSTService_startRendering()
|
||||||
{
|
{
|
||||||
window['piro.sakura.ne.jp'].stopRendering.start();
|
window['piro.sakura.ne.jp'].stopRendering.start();
|
||||||
},
|
},
|
||||||
|
|
||||||
isEventFiredOnTwisty : function(aEvent)
|
isEventFiredOnTwisty : function TSTService_isEventFiredOnTwisty(aEvent)
|
||||||
{
|
{
|
||||||
var tab = this.getTabFromEvent(aEvent);
|
var tab = this.getTabFromEvent(aEvent);
|
||||||
if (!tab || !this.hasChildTabs(tab)) return false;
|
if (!tab || !this.hasChildTabs(tab)) return false;
|
||||||
@ -519,7 +519,7 @@ var TreeStyleTabService = {
|
|||||||
XPathResult.BOOLEAN_TYPE
|
XPathResult.BOOLEAN_TYPE
|
||||||
).booleanValue;
|
).booleanValue;
|
||||||
},
|
},
|
||||||
canExpandTwistyArea : function(aTabBrowser)
|
canExpandTwistyArea : function TSTService_canExpandTwistyArea(aTabBrowser)
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
this.expandTwistyArea &&
|
this.expandTwistyArea &&
|
||||||
@ -530,7 +530,7 @@ var TreeStyleTabService = {
|
|||||||
},
|
},
|
||||||
expandTwistyArea : true,
|
expandTwistyArea : true,
|
||||||
|
|
||||||
isEventFiredOnClosebox : function(aEvent)
|
isEventFiredOnClosebox : function TSTService_isEventFiredOnClosebox(aEvent)
|
||||||
{
|
{
|
||||||
return this.evaluateXPath(
|
return this.evaluateXPath(
|
||||||
'ancestor-or-self::*[contains(concat(" ", normalize-space(@class), " "), " tab-close-button ")]',
|
'ancestor-or-self::*[contains(concat(" ", normalize-space(@class), " "), " tab-close-button ")]',
|
||||||
@ -539,7 +539,7 @@ var TreeStyleTabService = {
|
|||||||
).booleanValue;
|
).booleanValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
isEventFiredOnClickable : function(aEvent)
|
isEventFiredOnClickable : function TSTService_isEventFiredOnClickable(aEvent)
|
||||||
{
|
{
|
||||||
return this.evaluateXPath(
|
return this.evaluateXPath(
|
||||||
'ancestor-or-self::*[contains(" button toolbarbutton scrollbar popup menupopup panel tooltip ", concat(" ", local-name(), " "))]',
|
'ancestor-or-self::*[contains(" button toolbarbutton scrollbar popup menupopup panel tooltip ", concat(" ", local-name(), " "))]',
|
||||||
@ -548,12 +548,12 @@ var TreeStyleTabService = {
|
|||||||
).booleanValue;
|
).booleanValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
isNewTabAction : function(aEvent)
|
isNewTabAction : function TSTService_isNewTabAction(aEvent)
|
||||||
{
|
{
|
||||||
return aEvent.button == 1 || (aEvent.button == 0 && this.isAccelKeyPressed(aEvent));
|
return aEvent.button == 1 || (aEvent.button == 0 && this.isAccelKeyPressed(aEvent));
|
||||||
},
|
},
|
||||||
|
|
||||||
isAccelKeyPressed : function(aEvent)
|
isAccelKeyPressed : function TSTService_isAccelKeyPressed(aEvent)
|
||||||
{
|
{
|
||||||
var isMac = navigator.platform.toLowerCase().indexOf('mac') > -1;
|
var isMac = navigator.platform.toLowerCase().indexOf('mac') > -1;
|
||||||
var nsIDOMKeyEvent = Components.interfaces.nsIDOMKeyEvent;
|
var nsIDOMKeyEvent = Components.interfaces.nsIDOMKeyEvent;
|
||||||
@ -581,7 +581,7 @@ var TreeStyleTabService = {
|
|||||||
w.gBrowser ;
|
w.gBrowser ;
|
||||||
},
|
},
|
||||||
|
|
||||||
evaluateXPath : function(aExpression, aContext, aType)
|
evaluateXPath : function TSTService_evaluateXPath(aExpression, aContext, aType)
|
||||||
{
|
{
|
||||||
if (!aType) aType = XPathResult.ORDERED_NODE_SNAPSHOT_TYPE;
|
if (!aType) aType = XPathResult.ORDERED_NODE_SNAPSHOT_TYPE;
|
||||||
try {
|
try {
|
||||||
@ -605,7 +605,7 @@ var TreeStyleTabService = {
|
|||||||
return xpathResult;
|
return xpathResult;
|
||||||
},
|
},
|
||||||
|
|
||||||
getArrayFromXPathResult : function(aXPathResult)
|
getArrayFromXPathResult : function TSTService_getArrayFromXPathResult(aXPathResult)
|
||||||
{
|
{
|
||||||
var max = aXPathResult.snapshotLength;
|
var max = aXPathResult.snapshotLength;
|
||||||
var array = new Array(max);
|
var array = new Array(max);
|
||||||
@ -619,17 +619,17 @@ var TreeStyleTabService = {
|
|||||||
return array;
|
return array;
|
||||||
},
|
},
|
||||||
|
|
||||||
getBoxObjectFor : function(aNode)
|
getBoxObjectFor : function TSTService_getBoxObjectFor(aNode)
|
||||||
{
|
{
|
||||||
return window['piro.sakura.ne.jp'].boxObject.getBoxObjectFor(aNode);
|
return window['piro.sakura.ne.jp'].boxObject.getBoxObjectFor(aNode);
|
||||||
},
|
},
|
||||||
|
|
||||||
getTabFromEvent : function(aEvent)
|
getTabFromEvent : function TSTService_getTabFromEvent(aEvent)
|
||||||
{
|
{
|
||||||
return this.getTabFromChild(aEvent.originalTarget || aEvent.target);
|
return this.getTabFromChild(aEvent.originalTarget || aEvent.target);
|
||||||
},
|
},
|
||||||
|
|
||||||
getTabFromFrame : function(aFrame, aTabBrowser)
|
getTabFromFrame : function TSTService_getTabFromFrame(aFrame, aTabBrowser)
|
||||||
{
|
{
|
||||||
var b = aTabBrowser || this.browser;
|
var b = aTabBrowser || this.browser;
|
||||||
var docShell = aFrame.top
|
var docShell = aFrame.top
|
||||||
@ -647,7 +647,7 @@ var TreeStyleTabService = {
|
|||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
getTabFromChild : function(aTab)
|
getTabFromChild : function TSTService_getTabFromChild(aTab)
|
||||||
{
|
{
|
||||||
return this.evaluateXPath(
|
return this.evaluateXPath(
|
||||||
'ancestor-or-self::xul:tab[ancestor::xul:tabbrowser]',
|
'ancestor-or-self::xul:tab[ancestor::xul:tabbrowser]',
|
||||||
@ -656,7 +656,7 @@ var TreeStyleTabService = {
|
|||||||
).singleNodeValue;
|
).singleNodeValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
getTabbarFromEvent : function(aEvent)
|
getTabbarFromEvent : function TSTService_getTabbarFromEvent(aEvent)
|
||||||
{
|
{
|
||||||
return this.evaluateXPath(
|
return this.evaluateXPath(
|
||||||
'ancestor-or-self::*[contains(concat(" ", normalize-space(@class), " "), " tabbrowser-strip ")]',
|
'ancestor-or-self::*[contains(concat(" ", normalize-space(@class), " "), " tabbrowser-strip ")]',
|
||||||
@ -665,7 +665,7 @@ var TreeStyleTabService = {
|
|||||||
).singleNodeValue;
|
).singleNodeValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
getTabBrowserFromChild : function(aTabBrowserChild)
|
getTabBrowserFromChild : function TSTService_getTabBrowserFromChild(aTabBrowserChild)
|
||||||
{
|
{
|
||||||
if (!aTabBrowserChild) return null;
|
if (!aTabBrowserChild) return null;
|
||||||
|
|
||||||
@ -682,7 +682,7 @@ var TreeStyleTabService = {
|
|||||||
).singleNodeValue;
|
).singleNodeValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
getTabBrowserFromFrame : function(aFrame)
|
getTabBrowserFromFrame : function TSTService_getTabBrowserFromFrame(aFrame)
|
||||||
{
|
{
|
||||||
var w = this.browserWindow;
|
var w = this.browserWindow;
|
||||||
return !w ? null :
|
return !w ? null :
|
||||||
@ -690,7 +690,7 @@ var TreeStyleTabService = {
|
|||||||
this.browser ;
|
this.browser ;
|
||||||
},
|
},
|
||||||
|
|
||||||
getFrameFromTabBrowserElements : function(aFrameOrTabBrowser)
|
getFrameFromTabBrowserElements : function TSTService_getFrameFromTabBrowserElements(aFrameOrTabBrowser)
|
||||||
{
|
{
|
||||||
var frame = aFrameOrTabBrowser;
|
var frame = aFrameOrTabBrowser;
|
||||||
if (frame == '[object XULElement]') {
|
if (frame == '[object XULElement]') {
|
||||||
@ -712,12 +712,12 @@ var TreeStyleTabService = {
|
|||||||
return frame;
|
return frame;
|
||||||
},
|
},
|
||||||
|
|
||||||
makeNewId : function()
|
makeNewId : function TSTService_makeNewId()
|
||||||
{
|
{
|
||||||
return 'tab-<'+Date.now()+'-'+parseInt(Math.random() * 65000)+'>';
|
return 'tab-<'+Date.now()+'-'+parseInt(Math.random() * 65000)+'>';
|
||||||
},
|
},
|
||||||
|
|
||||||
makeURIFromSpec : function(aURI)
|
makeURIFromSpec : function TSTService_makeURIFromSpec(aURI)
|
||||||
{
|
{
|
||||||
var newURI;
|
var newURI;
|
||||||
aURI = aURI || '';
|
aURI = aURI || '';
|
||||||
@ -733,7 +733,7 @@ var TreeStyleTabService = {
|
|||||||
return newURI;
|
return newURI;
|
||||||
},
|
},
|
||||||
|
|
||||||
getPropertyPixelValue : function(aElementOrStyle, aProp)
|
getPropertyPixelValue : function TSTService_getPropertyPixelValue(aElementOrStyle, aProp)
|
||||||
{
|
{
|
||||||
var style = aElementOrStyle instanceof Components.interfaces.nsIDOMCSSStyleDeclaration ?
|
var style = aElementOrStyle instanceof Components.interfaces.nsIDOMCSSStyleDeclaration ?
|
||||||
aElementOrStyle :
|
aElementOrStyle :
|
||||||
@ -741,14 +741,14 @@ var TreeStyleTabService = {
|
|||||||
return Number(style.getPropertyValue(aProp).replace(/px$/, ''));
|
return Number(style.getPropertyValue(aProp).replace(/px$/, ''));
|
||||||
},
|
},
|
||||||
|
|
||||||
getGroupTabURI : function(aTitle)
|
getGroupTabURI : function TSTService_getGroupTabURI(aTitle)
|
||||||
{
|
{
|
||||||
return 'about:treestyletab-group'+(aTitle === void(0) ? '' : '?'+encodeURIComponent(aTitle) );
|
return 'about:treestyletab-group'+(aTitle === void(0) ? '' : '?'+encodeURIComponent(aTitle) );
|
||||||
},
|
},
|
||||||
|
|
||||||
/* get tab(s) */
|
/* get tab(s) */
|
||||||
|
|
||||||
getTabById : function(aId, aTabBrowserChildren)
|
getTabById : function TSTService_getTabById(aId, aTabBrowserChildren)
|
||||||
{
|
{
|
||||||
if (!aId) return null;
|
if (!aId) return null;
|
||||||
var b = this.getTabBrowserFromChild(aTabBrowserChildren) || this.browser;
|
var b = this.getTabBrowserFromChild(aTabBrowserChildren) || this.browser;
|
||||||
@ -759,7 +759,7 @@ var TreeStyleTabService = {
|
|||||||
).singleNodeValue;
|
).singleNodeValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
isTabDuplicated : function(aTab)
|
isTabDuplicated : function TSTService_isTabDuplicated(aTab)
|
||||||
{
|
{
|
||||||
if (!aTab) return false;
|
if (!aTab) return false;
|
||||||
var id = this.getTabValue(aTab, this.kID);
|
var id = this.getTabValue(aTab, this.kID);
|
||||||
@ -771,7 +771,7 @@ var TreeStyleTabService = {
|
|||||||
).booleanValue;
|
).booleanValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
getTabs : function(aTabBrowserChild)
|
getTabs : function TSTService_getTabs(aTabBrowserChild)
|
||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
||||||
return this.evaluateXPath(
|
return this.evaluateXPath(
|
||||||
@ -780,7 +780,7 @@ var TreeStyleTabService = {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
getTabsArray : function(aTabBrowserChild)
|
getTabsArray : function TSTService_getTabsArray(aTabBrowserChild)
|
||||||
{
|
{
|
||||||
var tabs = this.getTabs(aTabBrowserChild);
|
var tabs = this.getTabs(aTabBrowserChild);
|
||||||
var array = [];
|
var array = [];
|
||||||
@ -791,7 +791,7 @@ var TreeStyleTabService = {
|
|||||||
return array;
|
return array;
|
||||||
},
|
},
|
||||||
|
|
||||||
getFirstTab : function(aTabBrowserChild)
|
getFirstTab : function TSTService_getFirstTab(aTabBrowserChild)
|
||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
||||||
return this.evaluateXPath(
|
return this.evaluateXPath(
|
||||||
@ -801,7 +801,7 @@ var TreeStyleTabService = {
|
|||||||
).singleNodeValue;
|
).singleNodeValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
getLastTab : function(aTabBrowserChild)
|
getLastTab : function TSTService_getLastTab(aTabBrowserChild)
|
||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
||||||
return this.evaluateXPath(
|
return this.evaluateXPath(
|
||||||
@ -811,7 +811,7 @@ var TreeStyleTabService = {
|
|||||||
).singleNodeValue;
|
).singleNodeValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
getNextTab : function(aTab)
|
getNextTab : function TSTService_getNextTab(aTab)
|
||||||
{
|
{
|
||||||
if (!aTab) return null;
|
if (!aTab) return null;
|
||||||
return this.evaluateXPath(
|
return this.evaluateXPath(
|
||||||
@ -821,7 +821,7 @@ var TreeStyleTabService = {
|
|||||||
).singleNodeValue;
|
).singleNodeValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
getPreviousTab : function(aTab)
|
getPreviousTab : function TSTService_getPreviousTab(aTab)
|
||||||
{
|
{
|
||||||
if (!aTab) return null;
|
if (!aTab) return null;
|
||||||
return this.evaluateXPath(
|
return this.evaluateXPath(
|
||||||
@ -831,7 +831,7 @@ var TreeStyleTabService = {
|
|||||||
).singleNodeValue;
|
).singleNodeValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
getTabIndex : function(aTab)
|
getTabIndex : function TSTService_getTabIndex(aTab)
|
||||||
{
|
{
|
||||||
if (!aTab) return -1;
|
if (!aTab) return -1;
|
||||||
return this.evaluateXPath(
|
return this.evaluateXPath(
|
||||||
@ -841,7 +841,7 @@ var TreeStyleTabService = {
|
|||||||
).numberValue;
|
).numberValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
getNextVisibleTab : function(aTab)
|
getNextVisibleTab : function TSTService_getNextVisibleTab(aTab)
|
||||||
{
|
{
|
||||||
if (!aTab) return null;
|
if (!aTab) return null;
|
||||||
|
|
||||||
@ -855,7 +855,7 @@ var TreeStyleTabService = {
|
|||||||
).singleNodeValue;
|
).singleNodeValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
getPreviousVisibleTab : function(aTab)
|
getPreviousVisibleTab : function TSTService_getPreviousVisibleTab(aTab)
|
||||||
{
|
{
|
||||||
if (!aTab) return null;
|
if (!aTab) return null;
|
||||||
|
|
||||||
@ -869,7 +869,7 @@ var TreeStyleTabService = {
|
|||||||
).singleNodeValue;
|
).singleNodeValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
getLastVisibleTab : function(aTabBrowserChild)
|
getLastVisibleTab : function TSTService_getLastVisibleTab(aTabBrowserChild)
|
||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
||||||
if (!b) return null;
|
if (!b) return null;
|
||||||
@ -884,7 +884,7 @@ var TreeStyleTabService = {
|
|||||||
).singleNodeValue;
|
).singleNodeValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
getVisibleTabs : function(aTabBrowserChild)
|
getVisibleTabs : function TSTService_getVisibleTabs(aTabBrowserChild)
|
||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
||||||
if (!this.canCollapseSubtree(b))
|
if (!this.canCollapseSubtree(b))
|
||||||
@ -897,7 +897,7 @@ var TreeStyleTabService = {
|
|||||||
return xpathResult;
|
return xpathResult;
|
||||||
},
|
},
|
||||||
|
|
||||||
getVisibleIndex : function(aTab)
|
getVisibleIndex : function TSTService_getVisibleIndex(aTab)
|
||||||
{
|
{
|
||||||
if (!aTab) return -1;
|
if (!aTab) return -1;
|
||||||
|
|
||||||
@ -925,13 +925,13 @@ var TreeStyleTabService = {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
canCollapseSubtree : function(aTabBrowser) /* PUBLIC API */
|
canCollapseSubtree : function TSTService_canCollapseSubtree(aTabBrowser) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aTabBrowser) || this.browser;
|
var b = this.getTabBrowserFromChild(aTabBrowser) || this.browser;
|
||||||
return b.getAttribute(this.kALLOW_COLLAPSE) == 'true';
|
return b.getAttribute(this.kALLOW_COLLAPSE) == 'true';
|
||||||
},
|
},
|
||||||
|
|
||||||
isCollapsed : function(aTab) /* PUBLIC API */
|
isCollapsed : function TSTService_isCollapsed(aTab) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
if (!aTab || !this.canCollapseSubtree(aTab))
|
if (!aTab || !this.canCollapseSubtree(aTab))
|
||||||
return false;
|
return false;
|
||||||
@ -939,7 +939,7 @@ var TreeStyleTabService = {
|
|||||||
return aTab.getAttribute(this.kCOLLAPSED) == 'true';
|
return aTab.getAttribute(this.kCOLLAPSED) == 'true';
|
||||||
},
|
},
|
||||||
|
|
||||||
isSubtreeCollapsed : function(aTab) /* PUBLIC API */
|
isSubtreeCollapsed : function TSTService_isSubtreeCollapsed(aTab) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
if (!aTab || !this.canCollapseSubtree(aTab) || !this.hasChildTabs(aTab))
|
if (!aTab || !this.canCollapseSubtree(aTab) || !this.hasChildTabs(aTab))
|
||||||
return false;
|
return false;
|
||||||
@ -947,7 +947,7 @@ var TreeStyleTabService = {
|
|||||||
return aTab.getAttribute(this.kSUBTREE_COLLAPSED) == 'true';
|
return aTab.getAttribute(this.kSUBTREE_COLLAPSED) == 'true';
|
||||||
},
|
},
|
||||||
|
|
||||||
getParentTab : function(aTab) /* PUBLIC API */
|
getParentTab : function TSTService_getParentTab(aTab) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
if (!aTab) return null;
|
if (!aTab) return null;
|
||||||
var id = aTab.getAttribute(this.kID);
|
var id = aTab.getAttribute(this.kID);
|
||||||
@ -959,7 +959,7 @@ var TreeStyleTabService = {
|
|||||||
).singleNodeValue;
|
).singleNodeValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
getRootTab : function(aTab) /* PUBLIC API */
|
getRootTab : function TSTService_getRootTab(aTab) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
var parent = aTab;
|
var parent = aTab;
|
||||||
var root = aTab;
|
var root = aTab;
|
||||||
@ -970,7 +970,7 @@ var TreeStyleTabService = {
|
|||||||
return root;
|
return root;
|
||||||
},
|
},
|
||||||
|
|
||||||
getNextSiblingTab : function(aTab) /* PUBLIC API */
|
getNextSiblingTab : function TSTService_getNextSiblingTab(aTab) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
if (!aTab) return null;
|
if (!aTab) return null;
|
||||||
|
|
||||||
@ -999,7 +999,7 @@ var TreeStyleTabService = {
|
|||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
getPreviousSiblingTab : function(aTab) /* PUBLIC API */
|
getPreviousSiblingTab : function TSTService_getPreviousSiblingTab(aTab) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
if (!aTab) return null;
|
if (!aTab) return null;
|
||||||
|
|
||||||
@ -1028,7 +1028,7 @@ var TreeStyleTabService = {
|
|||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
getChildTabs : function(aTab, aAllTabsArray) /* PUBLIC API */
|
getChildTabs : function TSTService_getChildTabs(aTab, aAllTabsArray) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
var tabs = [];
|
var tabs = [];
|
||||||
if (!aTab) return tabs;
|
if (!aTab) return tabs;
|
||||||
@ -1051,20 +1051,20 @@ var TreeStyleTabService = {
|
|||||||
return tabs;
|
return tabs;
|
||||||
},
|
},
|
||||||
|
|
||||||
hasChildTabs : function(aTab) /* PUBLIC API */
|
hasChildTabs : function TSTService_hasChildTabs(aTab) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
if (!aTab) return false;
|
if (!aTab) return false;
|
||||||
return aTab.hasAttribute(this.kCHILDREN);
|
return aTab.hasAttribute(this.kCHILDREN);
|
||||||
},
|
},
|
||||||
|
|
||||||
getDescendantTabs : function(aTab) /* PUBLIC API */
|
getDescendantTabs : function TSTService_getDescendantTabs(aTab) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
var tabs = [];
|
var tabs = [];
|
||||||
this.getChildTabs(aTab, tabs);
|
this.getChildTabs(aTab, tabs);
|
||||||
return tabs;
|
return tabs;
|
||||||
},
|
},
|
||||||
|
|
||||||
getFirstChildTab : function(aTab) /* PUBLIC API */
|
getFirstChildTab : function TSTService_getFirstChildTab(aTab) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
if (!aTab) return null;
|
if (!aTab) return null;
|
||||||
|
|
||||||
@ -1081,7 +1081,7 @@ var TreeStyleTabService = {
|
|||||||
return firstChild;
|
return firstChild;
|
||||||
},
|
},
|
||||||
|
|
||||||
getLastChildTab : function(aTab) /* PUBLIC API */
|
getLastChildTab : function TSTService_getLastChildTab(aTab) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
if (!aTab) return null;
|
if (!aTab) return null;
|
||||||
|
|
||||||
@ -1098,7 +1098,7 @@ var TreeStyleTabService = {
|
|||||||
return lastChild;
|
return lastChild;
|
||||||
},
|
},
|
||||||
|
|
||||||
getLastDescendantTab : function(aTab) /* PUBLIC API */
|
getLastDescendantTab : function TSTService_getLastDescendantTab(aTab) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
if (!aTab) return null;
|
if (!aTab) return null;
|
||||||
|
|
||||||
@ -1106,7 +1106,7 @@ var TreeStyleTabService = {
|
|||||||
return tabs.length ? tabs[tabs.length-1] : null ;
|
return tabs.length ? tabs[tabs.length-1] : null ;
|
||||||
},
|
},
|
||||||
|
|
||||||
getChildIndex : function(aTab, aParent)
|
getChildIndex : function TSTService_getChildIndex(aTab, aParent)
|
||||||
{
|
{
|
||||||
var parent = this.getParentTab(aTab);
|
var parent = this.getParentTab(aTab);
|
||||||
if (!aParent || !parent || aParent != parent) {
|
if (!aParent || !parent || aParent != parent) {
|
||||||
@ -1140,7 +1140,7 @@ var TreeStyleTabService = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getXOffsetOfTab : function(aTab)
|
getXOffsetOfTab : function TSTService_getXOffsetOfTab(aTab)
|
||||||
{
|
{
|
||||||
var extraCondition = this.canCollapseSubtree(aTab) ?
|
var extraCondition = this.canCollapseSubtree(aTab) ?
|
||||||
'[not(@'+this.kCOLLAPSED+'="true")]' :
|
'[not(@'+this.kCOLLAPSED+'="true")]' :
|
||||||
@ -1152,7 +1152,7 @@ var TreeStyleTabService = {
|
|||||||
XPathResult.NUMBER_TYPE
|
XPathResult.NUMBER_TYPE
|
||||||
).numberValue;
|
).numberValue;
|
||||||
},
|
},
|
||||||
getYOffsetOfTab : function(aTab)
|
getYOffsetOfTab : function TSTService_getYOffsetOfTab(aTab)
|
||||||
{
|
{
|
||||||
var extraCondition = this.canCollapseSubtree(aTab) ?
|
var extraCondition = this.canCollapseSubtree(aTab) ?
|
||||||
'[not(@'+this.kCOLLAPSED+'="true")]' :
|
'[not(@'+this.kCOLLAPSED+'="true")]' :
|
||||||
@ -1165,7 +1165,7 @@ var TreeStyleTabService = {
|
|||||||
).numberValue;
|
).numberValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
isGroupTab : function(aTab, aLazyCheck)
|
isGroupTab : function TSTService_isGroupTab(aTab, aLazyCheck)
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
(aLazyCheck || aTab.linkedBrowser.sessionHistory.count == 1) &&
|
(aLazyCheck || aTab.linkedBrowser.sessionHistory.count == 1) &&
|
||||||
@ -1175,7 +1175,7 @@ var TreeStyleTabService = {
|
|||||||
|
|
||||||
/* Session Store API */
|
/* Session Store API */
|
||||||
|
|
||||||
getTabValue : function(aTab, aKey)
|
getTabValue : function TSTService_getTabValue(aTab, aKey)
|
||||||
{
|
{
|
||||||
var value = '';
|
var value = '';
|
||||||
try {
|
try {
|
||||||
@ -1192,7 +1192,7 @@ var TreeStyleTabService = {
|
|||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
|
|
||||||
setTabValue : function(aTab, aKey, aValue)
|
setTabValue : function TSTService_setTabValue(aTab, aKey, aValue)
|
||||||
{
|
{
|
||||||
if (!aValue) return this.deleteTabValue(aTab, aKey);
|
if (!aValue) return this.deleteTabValue(aTab, aKey);
|
||||||
|
|
||||||
@ -1210,7 +1210,7 @@ var TreeStyleTabService = {
|
|||||||
return aValue;
|
return aValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteTabValue : function(aTab, aKey)
|
deleteTabValue : function TSTService_deleteTabValue(aTab, aKey)
|
||||||
{
|
{
|
||||||
aTab.removeAttribute(aKey);
|
aTab.removeAttribute(aKey);
|
||||||
try {
|
try {
|
||||||
@ -1226,7 +1226,7 @@ var TreeStyleTabService = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// workaround for http://piro.sakura.ne.jp/latest/blosxom/mozilla/extension/treestyletab/2009-09-29_debug.htm
|
// workaround for http://piro.sakura.ne.jp/latest/blosxom/mozilla/extension/treestyletab/2009-09-29_debug.htm
|
||||||
checkCachedSessionDataExpiration : function(aTab)
|
checkCachedSessionDataExpiration : function TSTService_checkCachedSessionDataExpiration(aTab)
|
||||||
{
|
{
|
||||||
if (aTab.linkedBrowser.parentNode.__SS_data &&
|
if (aTab.linkedBrowser.parentNode.__SS_data &&
|
||||||
aTab.linkedBrowser.parentNode.__SS_data._tabStillLoading &&
|
aTab.linkedBrowser.parentNode.__SS_data._tabStillLoading &&
|
||||||
@ -1237,7 +1237,7 @@ var TreeStyleTabService = {
|
|||||||
useTMPSessionAPI : false,
|
useTMPSessionAPI : false,
|
||||||
kTMP_SESSION_DATA_PREFIX : 'tmp-session-data-',
|
kTMP_SESSION_DATA_PREFIX : 'tmp-session-data-',
|
||||||
|
|
||||||
dropLinksOnTabBehavior : function()
|
dropLinksOnTabBehavior : function TSTService_dropLinksOnTabBehavior()
|
||||||
{
|
{
|
||||||
var behavior = this.getTreePref('dropLinksOnTab.behavior');
|
var behavior = this.getTreePref('dropLinksOnTab.behavior');
|
||||||
if (behavior & this.kDROPLINK_FIXED) return behavior;
|
if (behavior & this.kDROPLINK_FIXED) return behavior;
|
||||||
@ -1266,7 +1266,7 @@ var TreeStyleTabService = {
|
|||||||
kDROPLINK_LOAD : 1,
|
kDROPLINK_LOAD : 1,
|
||||||
kDROPLINK_NEWTAB : 2,
|
kDROPLINK_NEWTAB : 2,
|
||||||
|
|
||||||
openGroupBookmarkBehavior : function()
|
openGroupBookmarkBehavior : function TSTService_openGroupBookmarkBehavior()
|
||||||
{
|
{
|
||||||
var behavior = this.getTreePref('openGroupBookmark.behavior');
|
var behavior = this.getTreePref('openGroupBookmark.behavior');
|
||||||
if (behavior & this.kGROUP_BOOKMARK_FIXED) return behavior;
|
if (behavior & this.kGROUP_BOOKMARK_FIXED) return behavior;
|
||||||
@ -1312,7 +1312,7 @@ var TreeStyleTabService = {
|
|||||||
|
|
||||||
/* Initializing */
|
/* Initializing */
|
||||||
|
|
||||||
preInit : function()
|
preInit : function TSTService_preInit()
|
||||||
{
|
{
|
||||||
if (this.preInitialized) return;
|
if (this.preInitialized) return;
|
||||||
this.preInitialized = true;
|
this.preInitialized = true;
|
||||||
@ -1358,7 +1358,7 @@ var TreeStyleTabService = {
|
|||||||
},
|
},
|
||||||
preInitialized : false,
|
preInitialized : false,
|
||||||
|
|
||||||
defaultTabFocusAllowance : function(aBrowser)
|
defaultTabFocusAllowance : function TSTService_defaultTabFocusAllowance(aBrowser)
|
||||||
{
|
{
|
||||||
var tab = aBrowser.selectedTab;
|
var tab = aBrowser.selectedTab;
|
||||||
return (
|
return (
|
||||||
@ -1372,7 +1372,7 @@ var TreeStyleTabService = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
kPREF_VERSION : 4,
|
kPREF_VERSION : 4,
|
||||||
migratePrefs : function()
|
migratePrefs : function TSTService_migratePrefs()
|
||||||
{
|
{
|
||||||
// migrate old prefs
|
// migrate old prefs
|
||||||
var orientalPrefs = [];
|
var orientalPrefs = [];
|
||||||
@ -1440,7 +1440,7 @@ var TreeStyleTabService = {
|
|||||||
this.setTreePref('prefsVersion', this.kPREF_VERSION);
|
this.setTreePref('prefsVersion', this.kPREF_VERSION);
|
||||||
},
|
},
|
||||||
|
|
||||||
init : function()
|
init : function TSTService_init()
|
||||||
{
|
{
|
||||||
if (!('gBrowser' in window)) return;
|
if (!('gBrowser' in window)) return;
|
||||||
|
|
||||||
@ -1489,7 +1489,7 @@ var TreeStyleTabService = {
|
|||||||
this.onPrefChange('extensions.treestyletab.autoCollapseExpandSubTreeOnSelect.whileFocusMovingByShortcut');
|
this.onPrefChange('extensions.treestyletab.autoCollapseExpandSubTreeOnSelect.whileFocusMovingByShortcut');
|
||||||
},
|
},
|
||||||
initialized : false,
|
initialized : false,
|
||||||
initUninstallationListener : function()
|
initUninstallationListener : function TSTService_initUninstallationListener()
|
||||||
{
|
{
|
||||||
var prefs = window['piro.sakura.ne.jp'].prefs;
|
var prefs = window['piro.sakura.ne.jp'].prefs;
|
||||||
var restorePrefs = function() {
|
var restorePrefs = function() {
|
||||||
@ -1514,14 +1514,14 @@ var TreeStyleTabService = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
initTabBrowser : function(aTabBrowser)
|
initTabBrowser : function TSTService_initTabBrowser(aTabBrowser)
|
||||||
{
|
{
|
||||||
if (aTabBrowser.localName != 'tabbrowser') return;
|
if (aTabBrowser.localName != 'tabbrowser') return;
|
||||||
aTabBrowser.treeStyleTab = new TreeStyleTabBrowser(aTabBrowser);
|
aTabBrowser.treeStyleTab = new TreeStyleTabBrowser(aTabBrowser);
|
||||||
aTabBrowser.treeStyleTab.init();
|
aTabBrowser.treeStyleTab.init();
|
||||||
},
|
},
|
||||||
|
|
||||||
updateTabDNDObserver : function(aObserver)
|
updateTabDNDObserver : function TSTService_updateTabDNDObserver(aObserver)
|
||||||
{
|
{
|
||||||
if ('_onDragStart' in aObserver) { // Firefox 3.5 or later
|
if ('_onDragStart' in aObserver) { // Firefox 3.5 or later
|
||||||
eval('aObserver._onDragStart = '+
|
eval('aObserver._onDragStart = '+
|
||||||
@ -1772,7 +1772,7 @@ catch(e) {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
overrideGlobalFunctions : function()
|
overrideGlobalFunctions : function TSTService_overrideGlobalFunctions()
|
||||||
{
|
{
|
||||||
// window.__treestyletab__BrowserCustomizeToolbar = window.BrowserCustomizeToolbar;
|
// window.__treestyletab__BrowserCustomizeToolbar = window.BrowserCustomizeToolbar;
|
||||||
// window.BrowserCustomizeToolbar = function() {
|
// window.BrowserCustomizeToolbar = function() {
|
||||||
@ -2059,7 +2059,7 @@ catch(e) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_splitFunctionNames : function(aString)
|
_splitFunctionNames : function TSTService__splitFunctionNames(aString)
|
||||||
{
|
{
|
||||||
return String(aString)
|
return String(aString)
|
||||||
.split(/\s+/)
|
.split(/\s+/)
|
||||||
@ -2070,7 +2070,7 @@ catch(e) {
|
|||||||
.replace(/^\s+|\s+$/g, '');
|
.replace(/^\s+|\s+$/g, '');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
_getFunctionSource : function(aFunc)
|
_getFunctionSource : function TSTService__getFunctionSource(aFunc)
|
||||||
{
|
{
|
||||||
var func;
|
var func;
|
||||||
try {
|
try {
|
||||||
@ -2082,7 +2082,7 @@ catch(e) {
|
|||||||
return func ? func.toSource() : null ;
|
return func ? func.toSource() : null ;
|
||||||
},
|
},
|
||||||
|
|
||||||
initBar : function()
|
initBar : function TSTService_initBar()
|
||||||
{
|
{
|
||||||
var bar = document.getElementById('urlbar');
|
var bar = document.getElementById('urlbar');
|
||||||
if (!bar) return;
|
if (!bar) return;
|
||||||
@ -2102,7 +2102,7 @@ catch(e) {
|
|||||||
source = null;
|
source = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy : function()
|
destroy : function TSTService_destroy()
|
||||||
{
|
{
|
||||||
window.removeEventListener('unload', this, false);
|
window.removeEventListener('unload', this, false);
|
||||||
|
|
||||||
@ -2124,7 +2124,7 @@ catch(e) {
|
|||||||
this.ObserverService.removeObserver(this, 'sessionstore-windows-restored');
|
this.ObserverService.removeObserver(this, 'sessionstore-windows-restored');
|
||||||
},
|
},
|
||||||
|
|
||||||
destroyTabBrowser : function(aTabBrowser)
|
destroyTabBrowser : function TSTService_destroyTabBrowser(aTabBrowser)
|
||||||
{
|
{
|
||||||
if (aTabBrowser.localName != 'tabbrowser') return;
|
if (aTabBrowser.localName != 'tabbrowser') return;
|
||||||
aTabBrowser.treeStyleTab.destroy();
|
aTabBrowser.treeStyleTab.destroy();
|
||||||
@ -2133,7 +2133,7 @@ catch(e) {
|
|||||||
|
|
||||||
/* Event Handling */
|
/* Event Handling */
|
||||||
|
|
||||||
handleEvent : function(aEvent)
|
handleEvent : function TSTService_handleEvent(aEvent)
|
||||||
{
|
{
|
||||||
switch (aEvent.type)
|
switch (aEvent.type)
|
||||||
{
|
{
|
||||||
@ -2204,7 +2204,7 @@ catch(e) {
|
|||||||
LISTEN_FOR_AUTOHIDE : 1,
|
LISTEN_FOR_AUTOHIDE : 1,
|
||||||
LISTEN_FOR_AUTOEXPAND_BY_FOCUSCHANGE : 2,
|
LISTEN_FOR_AUTOEXPAND_BY_FOCUSCHANGE : 2,
|
||||||
|
|
||||||
startListenKeyEventsFor : function(aReason)
|
startListenKeyEventsFor : function TSTService_startListenKeyEventsFor(aReason)
|
||||||
{
|
{
|
||||||
if (this.keyEventListeningFlags & aReason) return;
|
if (this.keyEventListeningFlags & aReason) return;
|
||||||
if (!this.keyEventListening) {
|
if (!this.keyEventListening) {
|
||||||
@ -2216,7 +2216,7 @@ catch(e) {
|
|||||||
this.keyEventListeningFlags |= aReason;
|
this.keyEventListeningFlags |= aReason;
|
||||||
},
|
},
|
||||||
|
|
||||||
endListenKeyEventsFor : function(aReason)
|
endListenKeyEventsFor : function TSTService_endListenKeyEventsFor(aReason)
|
||||||
{
|
{
|
||||||
if (!(this.keyEventListeningFlags & aReason)) return;
|
if (!(this.keyEventListeningFlags & aReason)) return;
|
||||||
this.keyEventListeningFlags ^= aReason;
|
this.keyEventListeningFlags ^= aReason;
|
||||||
@ -2228,7 +2228,7 @@ catch(e) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onKeyDown : function(aEvent)
|
onKeyDown : function TSTService_onKeyDown(aEvent)
|
||||||
{
|
{
|
||||||
this.accelKeyPressed = this.isAccelKeyPressed(aEvent);
|
this.accelKeyPressed = this.isAccelKeyPressed(aEvent);
|
||||||
|
|
||||||
@ -2240,7 +2240,7 @@ catch(e) {
|
|||||||
},
|
},
|
||||||
accelKeyPressed : false,
|
accelKeyPressed : false,
|
||||||
|
|
||||||
onKeyRelease : function(aEvent)
|
onKeyRelease : function TSTService_onKeyRelease(aEvent)
|
||||||
{
|
{
|
||||||
var b = this.browser;
|
var b = this.browser;
|
||||||
if (!b || !b.treeStyleTab) return;
|
if (!b || !b.treeStyleTab) return;
|
||||||
@ -2325,7 +2325,7 @@ catch(e) {
|
|||||||
this.getPref('browser.ctrlTab.previews');
|
this.getPref('browser.ctrlTab.previews');
|
||||||
},
|
},
|
||||||
|
|
||||||
onTabbarResized : function(aEvent)
|
onTabbarResized : function TSTService_onTabbarResized(aEvent)
|
||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aEvent.currentTarget);
|
var b = this.getTabBrowserFromChild(aEvent.currentTarget);
|
||||||
window.setTimeout(function(aSelf) {
|
window.setTimeout(function(aSelf) {
|
||||||
@ -2343,7 +2343,7 @@ catch(e) {
|
|||||||
b.treeStyleTab.clickedOnTabbarResizerGrippy = false;
|
b.treeStyleTab.clickedOnTabbarResizerGrippy = false;
|
||||||
}, 10, this);
|
}, 10, this);
|
||||||
},
|
},
|
||||||
onTabbarResizerClick : function(aEvent)
|
onTabbarResizerClick : function TSTService_onTabbarResizerClick(aEvent)
|
||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aEvent.currentTarget);
|
var b = this.getTabBrowserFromChild(aEvent.currentTarget);
|
||||||
b.treeStyleTab.clickedOnTabbarResizerGrippy = this.evaluateXPath(
|
b.treeStyleTab.clickedOnTabbarResizerGrippy = this.evaluateXPath(
|
||||||
@ -2353,7 +2353,7 @@ catch(e) {
|
|||||||
).booleanValue;
|
).booleanValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
showHideSubTreeMenuItem : function(aMenuItem, aTabs)
|
showHideSubTreeMenuItem : function TSTService_showHideSubTreeMenuItem(aMenuItem, aTabs)
|
||||||
{
|
{
|
||||||
if (!aMenuItem ||
|
if (!aMenuItem ||
|
||||||
aMenuItem.getAttribute('hidden') == 'true' ||
|
aMenuItem.getAttribute('hidden') == 'true' ||
|
||||||
@ -2374,7 +2374,7 @@ catch(e) {
|
|||||||
aMenuItem.setAttribute('hidden', true);
|
aMenuItem.setAttribute('hidden', true);
|
||||||
},
|
},
|
||||||
|
|
||||||
updateTabWidthPrefs : function(aPrefName)
|
updateTabWidthPrefs : function TSTService_updateTabWidthPrefs(aPrefName)
|
||||||
{
|
{
|
||||||
var expanded = this.getTreePref('tabbar.width');
|
var expanded = this.getTreePref('tabbar.width');
|
||||||
var shrunken = this.getTreePref('tabbar.shrunkenWidth');
|
var shrunken = this.getTreePref('tabbar.shrunkenWidth');
|
||||||
@ -2388,7 +2388,7 @@ catch(e) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleTooltip : function(aEvent, aTab)
|
handleTooltip : function TSTService_handleTooltip(aEvent, aTab)
|
||||||
{
|
{
|
||||||
var label;
|
var label;
|
||||||
var collapsed = this.isSubtreeCollapsed(aTab);
|
var collapsed = this.isSubtreeCollapsed(aTab);
|
||||||
@ -2440,12 +2440,12 @@ catch(e) {
|
|||||||
|
|
||||||
_restoringTabs : [],
|
_restoringTabs : [],
|
||||||
|
|
||||||
onTabRestored : function(aEvent)
|
onTabRestored : function TSTService_onTabRestored(aEvent)
|
||||||
{
|
{
|
||||||
this._restoringTabs.push(aEvent.originalTarget);
|
this._restoringTabs.push(aEvent.originalTarget);
|
||||||
},
|
},
|
||||||
|
|
||||||
processRestoredTabs : function()
|
processRestoredTabs : function TSTService_processRestoredTabs()
|
||||||
{
|
{
|
||||||
this._restoringTabs.forEach(function(aTab) {
|
this._restoringTabs.forEach(function(aTab) {
|
||||||
try {
|
try {
|
||||||
@ -2460,7 +2460,7 @@ catch(e) {
|
|||||||
|
|
||||||
/* Commands */
|
/* Commands */
|
||||||
|
|
||||||
removeTabSubTree : function(aTabOrTabs, aOnlyChildren)
|
removeTabSubTree : function TSTService_removeTabSubTree(aTabOrTabs, aOnlyChildren)
|
||||||
{
|
{
|
||||||
var tabs = this._normalizeToTabs(aTabOrTabs, aOnlyChildren);
|
var tabs = this._normalizeToTabs(aTabOrTabs, aOnlyChildren);
|
||||||
if (!this.warnAboutClosingTabs(tabs.length))
|
if (!this.warnAboutClosingTabs(tabs.length))
|
||||||
@ -2472,7 +2472,7 @@ catch(e) {
|
|||||||
b.removeTab(tabs[i]);
|
b.removeTab(tabs[i]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
warnAboutClosingTabSubTreeOf : function(aTab)
|
warnAboutClosingTabSubTreeOf : function TSTService_warnAboutClosingTabSubTreeOf(aTab)
|
||||||
{
|
{
|
||||||
if (!this.shouldCloseTabSubTreeOf(aTab))
|
if (!this.shouldCloseTabSubTreeOf(aTab))
|
||||||
return true;
|
return true;
|
||||||
@ -2480,7 +2480,7 @@ catch(e) {
|
|||||||
var tabs = [aTab].concat(this.getDescendantTabs(aTab));
|
var tabs = [aTab].concat(this.getDescendantTabs(aTab));
|
||||||
return this.warnAboutClosingTabs(tabs.length);
|
return this.warnAboutClosingTabs(tabs.length);
|
||||||
},
|
},
|
||||||
shouldCloseTabSubTreeOf : function(aTab)
|
shouldCloseTabSubTreeOf : function TSTService_shouldCloseTabSubTreeOf(aTab)
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
this.hasChildTabs(aTab) &&
|
this.hasChildTabs(aTab) &&
|
||||||
@ -2490,7 +2490,7 @@ catch(e) {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
shouldCloseLastTabSubTreeOf : function(aTab)
|
shouldCloseLastTabSubTreeOf : function TSTService_shouldCloseLastTabSubTreeOf(aTab)
|
||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aTab);
|
var b = this.getTabBrowserFromChild(aTab);
|
||||||
return (
|
return (
|
||||||
@ -2498,7 +2498,7 @@ catch(e) {
|
|||||||
this.getDescendantTabs(aTab).length + 1 == this.getTabs(b).snapshotLength
|
this.getDescendantTabs(aTab).length + 1 == this.getTabs(b).snapshotLength
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
warnAboutClosingTabs : function(aTabsCount)
|
warnAboutClosingTabs : function TSTService_warnAboutClosingTabs(aTabsCount)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
aTabsCount <= 1 ||
|
aTabsCount <= 1 ||
|
||||||
@ -2522,7 +2522,7 @@ catch(e) {
|
|||||||
return shouldClose;
|
return shouldClose;
|
||||||
},
|
},
|
||||||
|
|
||||||
_normalizeToTabs : function(aTabOrTabs, aOnlyChildren)
|
_normalizeToTabs : function TSTService__normalizeToTabs(aTabOrTabs, aOnlyChildren)
|
||||||
{
|
{
|
||||||
var tabs = aTabOrTabs;
|
var tabs = aTabOrTabs;
|
||||||
if (!(tabs instanceof Array)) {
|
if (!(tabs instanceof Array)) {
|
||||||
@ -2544,7 +2544,7 @@ catch(e) {
|
|||||||
return tabs;
|
return tabs;
|
||||||
},
|
},
|
||||||
|
|
||||||
cleanUpTabsArray : function(aTabs)
|
cleanUpTabsArray : function TSTService_cleanUpTabsArray(aTabs)
|
||||||
{
|
{
|
||||||
var newTabs = [];
|
var newTabs = [];
|
||||||
aTabs.forEach(function(aTab) {
|
aTabs.forEach(function(aTab) {
|
||||||
@ -2555,12 +2555,12 @@ catch(e) {
|
|||||||
return newTabs;
|
return newTabs;
|
||||||
},
|
},
|
||||||
|
|
||||||
sortTabsByOrder : function(aA, aB)
|
sortTabsByOrder : function TSTService_sortTabsByOrder(aA, aB)
|
||||||
{
|
{
|
||||||
return aA._tPos - aB._tPos;
|
return aA._tPos - aB._tPos;
|
||||||
},
|
},
|
||||||
|
|
||||||
reloadTabSubTree : function(aTabOrTabs, aOnlyChildren)
|
reloadTabSubTree : function TSTService_reloadTabSubTree(aTabOrTabs, aOnlyChildren)
|
||||||
{
|
{
|
||||||
var tabs = this._normalizeToTabs(aTabOrTabs, aOnlyChildren);
|
var tabs = this._normalizeToTabs(aTabOrTabs, aOnlyChildren);
|
||||||
var b = this.getTabBrowserFromChild(tabs[0]);
|
var b = this.getTabBrowserFromChild(tabs[0]);
|
||||||
@ -2570,7 +2570,7 @@ catch(e) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
createSubTree : function(aTabs)
|
createSubTree : function TSTService_createSubTree(aTabs)
|
||||||
{
|
{
|
||||||
aTabs = this.getRootTabs(aTabs);
|
aTabs = this.getRootTabs(aTabs);
|
||||||
if (!aTabs.length) return;
|
if (!aTabs.length) return;
|
||||||
@ -2604,7 +2604,7 @@ catch(e) {
|
|||||||
}, 0, this);
|
}, 0, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
canCreateSubTree : function(aTabs)
|
canCreateSubTree : function TSTService_canCreateSubTree(aTabs)
|
||||||
{
|
{
|
||||||
aTabs = this.getRootTabs(aTabs);
|
aTabs = this.getRootTabs(aTabs);
|
||||||
if (aTabs.length < 2) return false;
|
if (aTabs.length < 2) return false;
|
||||||
@ -2619,7 +2619,7 @@ catch(e) {
|
|||||||
return this.getChildTabs(lastParent).length != aTabs.length;
|
return this.getChildTabs(lastParent).length != aTabs.length;
|
||||||
},
|
},
|
||||||
|
|
||||||
getRootTabs : function(aTabs)
|
getRootTabs : function TSTService_getRootTabs(aTabs)
|
||||||
{
|
{
|
||||||
var roots = [];
|
var roots = [];
|
||||||
if (!aTabs || !aTabs.length) return roots;
|
if (!aTabs || !aTabs.length) return roots;
|
||||||
@ -2632,7 +2632,7 @@ catch(e) {
|
|||||||
return roots;
|
return roots;
|
||||||
},
|
},
|
||||||
|
|
||||||
collapseExpandAllSubtree : function(aCollapse)
|
collapseExpandAllSubtree : function TSTService_collapseExpandAllSubtree(aCollapse)
|
||||||
{
|
{
|
||||||
this.ObserverService.notifyObservers(
|
this.ObserverService.notifyObservers(
|
||||||
window,
|
window,
|
||||||
@ -2641,7 +2641,7 @@ catch(e) {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
promoteTab : function(aTab) /* PUBLIC API */
|
promoteTab : function TSTService_promoteTab(aTab) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aTab);
|
var b = this.getTabBrowserFromChild(aTab);
|
||||||
var sv = b.treeStyleTab;
|
var sv = b.treeStyleTab;
|
||||||
@ -2664,12 +2664,12 @@ catch(e) {
|
|||||||
b.moveTabTo(aTab, index);
|
b.moveTabTo(aTab, index);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
promoteCurrentTab : function() /* PUBLIC API */
|
promoteCurrentTab : function TSTService_promoteCurrentTab() /* PUBLIC API */
|
||||||
{
|
{
|
||||||
this.promoteTab(this.browser.selectedTab);
|
this.promoteTab(this.browser.selectedTab);
|
||||||
},
|
},
|
||||||
|
|
||||||
demoteTab : function(aTab) /* PUBLIC API */
|
demoteTab : function TSTService_demoteTab(aTab) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aTab);
|
var b = this.getTabBrowserFromChild(aTab);
|
||||||
var sv = b.treeStyleTab;
|
var sv = b.treeStyleTab;
|
||||||
@ -2678,7 +2678,7 @@ catch(e) {
|
|||||||
if (previous)
|
if (previous)
|
||||||
sv.attachTabTo(aTab, previous);
|
sv.attachTabTo(aTab, previous);
|
||||||
},
|
},
|
||||||
demoteCurrentTab : function() /* PUBLIC API */
|
demoteCurrentTab : function TSTService_demoteCurrentTab() /* PUBLIC API */
|
||||||
{
|
{
|
||||||
this.demoteTab(this.browser.selectedTab);
|
this.demoteTab(this.browser.selectedTab);
|
||||||
},
|
},
|
||||||
@ -2699,26 +2699,26 @@ catch(e) {
|
|||||||
},
|
},
|
||||||
_treeViewEnabled : true,
|
_treeViewEnabled : true,
|
||||||
|
|
||||||
expandTreeAfterKeyReleased : function(aTab)
|
expandTreeAfterKeyReleased : function TSTService_expandTreeAfterKeyReleased(aTab)
|
||||||
{
|
{
|
||||||
if (this.getTreePref('autoCollapseExpandSubTreeOnSelect.whileFocusMovingByShortcut')) return;
|
if (this.getTreePref('autoCollapseExpandSubTreeOnSelect.whileFocusMovingByShortcut')) return;
|
||||||
this._tabShouldBeExpandedAfterKeyReleased = aTab || null;
|
this._tabShouldBeExpandedAfterKeyReleased = aTab || null;
|
||||||
},
|
},
|
||||||
_tabShouldBeExpandedAfterKeyReleased : null,
|
_tabShouldBeExpandedAfterKeyReleased : null,
|
||||||
|
|
||||||
registerTabFocusAllowance : function(aProcess) /* PUBLIC API */
|
registerTabFocusAllowance : function TSTService_registerTabFocusAllowance(aProcess) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
this._tabFocusAllowance.push(aProcess);
|
this._tabFocusAllowance.push(aProcess);
|
||||||
},
|
},
|
||||||
_tabFocusAllowance : [],
|
_tabFocusAllowance : [],
|
||||||
|
|
||||||
registerExpandTwistyAreaAllowance : function(aProcess) /* PUBLIC API */
|
registerExpandTwistyAreaAllowance : function TSTService_registerExpandTwistyAreaAllowance(aProcess) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
this._expandTwistyAreaAllowance.push(aProcess);
|
this._expandTwistyAreaAllowance.push(aProcess);
|
||||||
},
|
},
|
||||||
_expandTwistyAreaAllowance : [],
|
_expandTwistyAreaAllowance : [],
|
||||||
|
|
||||||
tearOffSubTreeFromRemote : function()
|
tearOffSubTreeFromRemote : function TSTService_tearOffSubTreeFromRemote()
|
||||||
{
|
{
|
||||||
var remoteTab = window.arguments[0];
|
var remoteTab = window.arguments[0];
|
||||||
var remoteWindow = remoteTab.ownerDocument.defaultView;
|
var remoteWindow = remoteTab.ownerDocument.defaultView;
|
||||||
@ -2753,7 +2753,7 @@ catch(e) {
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
observe : function(aSubject, aTopic, aData)
|
observe : function TSTService_observe(aSubject, aTopic, aData)
|
||||||
{
|
{
|
||||||
switch (aTopic)
|
switch (aTopic)
|
||||||
{
|
{
|
||||||
@ -2773,7 +2773,7 @@ catch(e) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
restoringWindow : false,
|
restoringWindow : false,
|
||||||
getRestoringTabsCount : function()
|
getRestoringTabsCount : function TSTService_getRestoringTabsCount()
|
||||||
{
|
{
|
||||||
return this.getTabsArray(this.browser)
|
return this.getTabsArray(this.browser)
|
||||||
.filter(function(aTab) {
|
.filter(function(aTab) {
|
||||||
@ -2796,7 +2796,7 @@ catch(e) {
|
|||||||
'browser.ctrlTab.previews'
|
'browser.ctrlTab.previews'
|
||||||
],
|
],
|
||||||
|
|
||||||
onPrefChange : function(aPrefName)
|
onPrefChange : function TSTService_onPrefChange(aPrefName)
|
||||||
{
|
{
|
||||||
var value = this.getPref(aPrefName);
|
var value = this.getPref(aPrefName);
|
||||||
switch (aPrefName)
|
switch (aPrefName)
|
||||||
@ -2888,17 +2888,17 @@ catch(e) {
|
|||||||
|
|
||||||
/* Save/Load Prefs */
|
/* Save/Load Prefs */
|
||||||
|
|
||||||
getTreePref : function(aPrefstring)
|
getTreePref : function TSTService_getTreePref(aPrefstring)
|
||||||
{
|
{
|
||||||
return this.getPref('extensions.treestyletab.'+aPrefstring);
|
return this.getPref('extensions.treestyletab.'+aPrefstring);
|
||||||
},
|
},
|
||||||
|
|
||||||
setTreePref : function(aPrefstring, aNewValue)
|
setTreePref : function TSTService_setTreePref(aPrefstring, aNewValue)
|
||||||
{
|
{
|
||||||
return this.setPref('extensions.treestyletab.'+aPrefstring, aNewValue);
|
return this.setPref('extensions.treestyletab.'+aPrefstring, aNewValue);
|
||||||
},
|
},
|
||||||
|
|
||||||
clearTreePref : function(aPrefstring)
|
clearTreePref : function TSTService_clearTreePref(aPrefstring)
|
||||||
{
|
{
|
||||||
return this.clearPref('extensions.treestyletab.'+aPrefstring);
|
return this.clearPref('extensions.treestyletab.'+aPrefstring);
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
/* get tab contents */
|
/* get tab contents */
|
||||||
|
|
||||||
getTabLabel : function(aTab)
|
getTabLabel : function TSTBrowser_getTabLabel(aTab)
|
||||||
{
|
{
|
||||||
var label = document.getAnonymousElementByAttribute(aTab, 'class', 'tab-text-stack') || // Mac OS X
|
var label = document.getAnonymousElementByAttribute(aTab, 'class', 'tab-text-stack') || // Mac OS X
|
||||||
( // Tab Mix Plus
|
( // Tab Mix Plus
|
||||||
@ -90,7 +90,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
return label;
|
return label;
|
||||||
},
|
},
|
||||||
|
|
||||||
getTabClosebox : function(aTab)
|
getTabClosebox : function TSTBrowser_getTabClosebox(aTab)
|
||||||
{
|
{
|
||||||
var close = ( // Tab Mix Plus
|
var close = ( // Tab Mix Plus
|
||||||
this.getTreePref('compatibility.TMP') &&
|
this.getTreePref('compatibility.TMP') &&
|
||||||
@ -110,7 +110,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
return (box.getAttribute('orient') || window.getComputedStyle(box, '').getPropertyValue('-moz-box-orient')) == 'vertical';
|
return (box.getAttribute('orient') || window.getComputedStyle(box, '').getPropertyValue('-moz-box-orient')) == 'vertical';
|
||||||
},
|
},
|
||||||
|
|
||||||
isTabInViewport : function(aTab)
|
isTabInViewport : function TSTBrowser_isTabInViewport(aTab)
|
||||||
{
|
{
|
||||||
if (!aTab) return false;
|
if (!aTab) return false;
|
||||||
var tabBox = aTab.boxObject;
|
var tabBox = aTab.boxObject;
|
||||||
@ -123,14 +123,14 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
tabBox.screenY + yOffset + tabBox.height <= barBox.screenY + barBox.height);
|
tabBox.screenY + yOffset + tabBox.height <= barBox.screenY + barBox.height);
|
||||||
},
|
},
|
||||||
|
|
||||||
isMultiRow : function()
|
isMultiRow : function TSTBrowser_isMultiRow()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
/* initialize */
|
/* initialize */
|
||||||
|
|
||||||
init : function()
|
init : function TSTBrowser_init()
|
||||||
{
|
{
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
|
|
||||||
@ -586,7 +586,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
b = null;
|
b = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
initTab : function(aTab)
|
initTab : function TSTBrowser_initTab(aTab)
|
||||||
{
|
{
|
||||||
if (!aTab.hasAttribute(this.kID)) {
|
if (!aTab.hasAttribute(this.kID)) {
|
||||||
var id = this.getTabValue(aTab, this.kID) || this.makeNewId();
|
var id = this.getTabValue(aTab, this.kID) || this.makeNewId();
|
||||||
@ -605,13 +605,13 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
aTab.setAttribute(this.kNEST, 0);
|
aTab.setAttribute(this.kNEST, 0);
|
||||||
},
|
},
|
||||||
ensureTabInitialized : function(aTab)
|
ensureTabInitialized : function TSTBrowser_ensureTabInitialized(aTab)
|
||||||
{
|
{
|
||||||
if (!aTab || aTab.getAttribute(this.kID)) return;
|
if (!aTab || aTab.getAttribute(this.kID)) return;
|
||||||
this.initTab(aTab);
|
this.initTab(aTab);
|
||||||
},
|
},
|
||||||
|
|
||||||
initTabAttributes : function(aTab)
|
initTabAttributes : function TSTBrowser_initTabAttributes(aTab)
|
||||||
{
|
{
|
||||||
var pos = this.mTabBrowser.getAttribute(this.kTABBAR_POSITION);
|
var pos = this.mTabBrowser.getAttribute(this.kTABBAR_POSITION);
|
||||||
if (pos == 'left' || pos == 'right') {
|
if (pos == 'left' || pos == 'right') {
|
||||||
@ -638,7 +638,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
initTabContents : function(aTab)
|
initTabContents : function TSTBrowser_initTabContents(aTab)
|
||||||
{
|
{
|
||||||
var icon = document.getAnonymousElementByAttribute(aTab, 'class', 'tab-icon');
|
var icon = document.getAnonymousElementByAttribute(aTab, 'class', 'tab-icon');
|
||||||
var label = this.getTabLabel(aTab);
|
var label = this.getTabLabel(aTab);
|
||||||
@ -678,7 +678,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.initTabContentsOrder(aTab);
|
this.initTabContentsOrder(aTab);
|
||||||
},
|
},
|
||||||
|
|
||||||
initTabContentsOrder : function(aTab)
|
initTabContentsOrder : function TSTBrowser_initTabContentsOrder(aTab)
|
||||||
{
|
{
|
||||||
var label = this.getTabLabel(aTab);
|
var label = this.getTabLabel(aTab);
|
||||||
var close = this.getTabClosebox(aTab);
|
var close = this.getTabClosebox(aTab);
|
||||||
@ -725,7 +725,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}, this);
|
}, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
updateInvertedTabContentsOrder : function(aAll)
|
updateInvertedTabContentsOrder : function TSTBrowser_updateInvertedTabContentsOrder(aAll)
|
||||||
{
|
{
|
||||||
if (!this.getTreePref('tabbar.invertTabContents')) return;
|
if (!this.getTreePref('tabbar.invertTabContents')) return;
|
||||||
window.setTimeout(function(aSelf) {
|
window.setTimeout(function(aSelf) {
|
||||||
@ -739,7 +739,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}, 0, this);
|
}, 0, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
initTabbar : function(aPosition)
|
initTabbar : function TSTBrowser_initTabbar(aPosition)
|
||||||
{
|
{
|
||||||
this.stopRendering();
|
this.stopRendering();
|
||||||
|
|
||||||
@ -951,7 +951,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.startRendering();
|
this.startRendering();
|
||||||
},
|
},
|
||||||
|
|
||||||
_ensureNewSplitter : function()
|
_ensureNewSplitter : function TSTBrowser__ensureNewSplitter()
|
||||||
{
|
{
|
||||||
var splitter = document.getAnonymousElementByAttribute(this.mTabBrowser, 'class', this.kSPLITTER);
|
var splitter = document.getAnonymousElementByAttribute(this.mTabBrowser, 'class', this.kSPLITTER);
|
||||||
|
|
||||||
@ -976,7 +976,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
return splitter;
|
return splitter;
|
||||||
},
|
},
|
||||||
|
|
||||||
updateTabbarState : function()
|
updateTabbarState : function TSTBrowser_updateTabbarState()
|
||||||
{
|
{
|
||||||
this.stopRendering();
|
this.stopRendering();
|
||||||
|
|
||||||
@ -1023,7 +1023,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.updateAllTabsIndent();
|
this.updateAllTabsIndent();
|
||||||
},
|
},
|
||||||
|
|
||||||
updateTabbarOverflow : function()
|
updateTabbarOverflow : function TSTBrowser_updateTabbarOverflow()
|
||||||
{
|
{
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
b.mTabContainer.removeAttribute('overflow'); // Firefox 3.0.x
|
b.mTabContainer.removeAttribute('overflow'); // Firefox 3.0.x
|
||||||
@ -1056,7 +1056,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}, 100);
|
}, 100);
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy : function()
|
destroy : function TSTBrowser_destroy()
|
||||||
{
|
{
|
||||||
this.autoHide.destroy();
|
this.autoHide.destroy();
|
||||||
delete this._autoHide;
|
delete this._autoHide;
|
||||||
@ -1117,7 +1117,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
delete this._scrollBox;
|
delete this._scrollBox;
|
||||||
},
|
},
|
||||||
|
|
||||||
destroyTab : function(aTab)
|
destroyTab : function TSTBrowser_destroyTab(aTab)
|
||||||
{
|
{
|
||||||
delete aTab.__treestyletab__linkedTabBrowser;
|
delete aTab.__treestyletab__linkedTabBrowser;
|
||||||
},
|
},
|
||||||
@ -1128,7 +1128,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
'extensions.treestyletab.'
|
'extensions.treestyletab.'
|
||||||
],
|
],
|
||||||
|
|
||||||
observe : function(aSubject, aTopic, aData)
|
observe : function TSTBrowser_observe(aSubject, aTopic, aData)
|
||||||
{
|
{
|
||||||
switch (aTopic)
|
switch (aTopic)
|
||||||
{
|
{
|
||||||
@ -1160,7 +1160,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onPrefChange : function(aPrefName)
|
onPrefChange : function TSTBrowser_onPrefChange(aPrefName)
|
||||||
{
|
{
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
var value = this.getPref(aPrefName);
|
var value = this.getPref(aPrefName);
|
||||||
@ -1295,7 +1295,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
/* DOM Event Handling */
|
/* DOM Event Handling */
|
||||||
|
|
||||||
handleEvent : function(aEvent)
|
handleEvent : function TSTBrowser_handleEvent(aEvent)
|
||||||
{
|
{
|
||||||
switch (aEvent.type)
|
switch (aEvent.type)
|
||||||
{
|
{
|
||||||
@ -1405,7 +1405,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
lastScrollX : -1,
|
lastScrollX : -1,
|
||||||
lastScrollY : -1,
|
lastScrollY : -1,
|
||||||
|
|
||||||
updateLastScrollPosition : function()
|
updateLastScrollPosition : function TSTBrowser_updateLastScrollPosition()
|
||||||
{
|
{
|
||||||
if (!this.isVertical) return;
|
if (!this.isVertical) return;
|
||||||
var x = {}, y = {};
|
var x = {}, y = {};
|
||||||
@ -1416,7 +1416,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.lastScrollY = y.value;
|
this.lastScrollY = y.value;
|
||||||
},
|
},
|
||||||
|
|
||||||
onTabAdded : function(aEvent)
|
onTabAdded : function TSTBrowser_onTabAdded(aEvent)
|
||||||
{
|
{
|
||||||
var tab = aEvent.originalTarget;
|
var tab = aEvent.originalTarget;
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
@ -1509,7 +1509,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
},
|
},
|
||||||
_checkRestoringWindowTimerOnTabAdded : null,
|
_checkRestoringWindowTimerOnTabAdded : null,
|
||||||
|
|
||||||
onTabRemoved : function(aEvent)
|
onTabRemoved : function TSTBrowser_onTabRemoved(aEvent)
|
||||||
{
|
{
|
||||||
var tab = aEvent.originalTarget;
|
var tab = aEvent.originalTarget;
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
@ -1709,13 +1709,13 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
CLOSE_PARENT_BEHAVIOR_CLOSE : 2,
|
CLOSE_PARENT_BEHAVIOR_CLOSE : 2,
|
||||||
CLOSE_ROOT_BEHAVIOR_PROMOTE_FIRST : 3,
|
CLOSE_ROOT_BEHAVIOR_PROMOTE_FIRST : 3,
|
||||||
CLOSE_ROOT_BEHAVIOR_DETACH : 1,
|
CLOSE_ROOT_BEHAVIOR_DETACH : 1,
|
||||||
getNextFocusedTab : function(aTab)
|
getNextFocusedTab : function TSTBrowser_getNextFocusedTab(aTab)
|
||||||
{
|
{
|
||||||
return this.getNextSiblingTab(aTab) ||
|
return this.getNextSiblingTab(aTab) ||
|
||||||
this.getPreviousVisibleTab(aTab);
|
this.getPreviousVisibleTab(aTab);
|
||||||
},
|
},
|
||||||
|
|
||||||
onTabMove : function(aEvent)
|
onTabMove : function TSTBrowser_onTabMove(aEvent)
|
||||||
{
|
{
|
||||||
var tab = aEvent.originalTarget;
|
var tab = aEvent.originalTarget;
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
@ -1779,7 +1779,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.attachTabFromPosition(tab, aEvent.detail);
|
this.attachTabFromPosition(tab, aEvent.detail);
|
||||||
},
|
},
|
||||||
|
|
||||||
attachTabFromPosition : function(aTab, aOldPosition)
|
attachTabFromPosition : function TSTBrowser_attachTabFromPosition(aTab, aOldPosition)
|
||||||
{
|
{
|
||||||
var parent = this.getParentTab(aTab);
|
var parent = this.getParentTab(aTab);
|
||||||
|
|
||||||
@ -1844,7 +1844,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
updateChildrenArray : function(aTab)
|
updateChildrenArray : function TSTBrowser_updateChildrenArray(aTab)
|
||||||
{
|
{
|
||||||
var children = this.getChildTabs(aTab);
|
var children = this.getChildTabs(aTab);
|
||||||
children.sort(this.sortTabsByOrder);
|
children.sort(this.sortTabsByOrder);
|
||||||
@ -1859,11 +1859,11 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
onTabRestoring : function(aEvent)
|
onTabRestoring : function TSTBrowser_onTabRestoring(aEvent)
|
||||||
{
|
{
|
||||||
this.restoreStructure(aEvent.originalTarget);
|
this.restoreStructure(aEvent.originalTarget);
|
||||||
},
|
},
|
||||||
restoreStructure : function(aTab)
|
restoreStructure : function TSTBrowser_restoreStructure(aTab)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
ウィンドウの復元では以下の順に処理が走る。
|
ウィンドウの復元では以下の順に処理が走る。
|
||||||
@ -2043,7 +2043,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
if (mayBeDuplicated) this.clearRedirectionTable();
|
if (mayBeDuplicated) this.clearRedirectionTable();
|
||||||
},
|
},
|
||||||
correctChildTabsOrderWithDelay : function(aTab)
|
correctChildTabsOrderWithDelay : function TSTBrowser_correctChildTabsOrderWithDelay(aTab)
|
||||||
{
|
{
|
||||||
if (aTab.correctChildTabsOrderWithDelayTimer)
|
if (aTab.correctChildTabsOrderWithDelayTimer)
|
||||||
window.clearTimeout(aTab.correctChildTabsOrderWithDelayTimer);
|
window.clearTimeout(aTab.correctChildTabsOrderWithDelayTimer);
|
||||||
@ -2052,7 +2052,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
aSelf.correctChildTabsOrder(aTab);
|
aSelf.correctChildTabsOrder(aTab);
|
||||||
}, 10, this);
|
}, 10, this);
|
||||||
},
|
},
|
||||||
correctChildTabsOrder : function(aTab)
|
correctChildTabsOrder : function TSTBrowser_correctChildTabsOrder(aTab)
|
||||||
{
|
{
|
||||||
var restoringChildren = aTab.getAttribute(this.kCHILDREN_RESTORING);
|
var restoringChildren = aTab.getAttribute(this.kCHILDREN_RESTORING);
|
||||||
if (!restoringChildren) return;
|
if (!restoringChildren) return;
|
||||||
@ -2086,7 +2086,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
aTab.correctChildTabsOrderWithDelayTimer = null;
|
aTab.correctChildTabsOrderWithDelayTimer = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
redirectId : function(aId)
|
redirectId : function TSTBrowser_redirectId(aId)
|
||||||
{
|
{
|
||||||
if (!(aId in this._redirectionTable))
|
if (!(aId in this._redirectionTable))
|
||||||
this._redirectionTable[aId] = this.makeNewId();
|
this._redirectionTable[aId] = this.makeNewId();
|
||||||
@ -2094,7 +2094,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
},
|
},
|
||||||
_redirectionTable : {},
|
_redirectionTable : {},
|
||||||
|
|
||||||
clearRedirectionTable : function()
|
clearRedirectionTable : function TSTBrowser_clearRedirectionTable()
|
||||||
{
|
{
|
||||||
if (this._clearRedirectionTableTimer) {
|
if (this._clearRedirectionTableTimer) {
|
||||||
window.clearTimeout(this._clearRedirectionTableTimer);
|
window.clearTimeout(this._clearRedirectionTableTimer);
|
||||||
@ -2106,14 +2106,14 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
},
|
},
|
||||||
_clearRedirectionTableTimer : null,
|
_clearRedirectionTableTimer : null,
|
||||||
|
|
||||||
onTabRestored : function(aEvent)
|
onTabRestored : function TSTBrowser_onTabRestored(aEvent)
|
||||||
{
|
{
|
||||||
// update the status for the next restoring
|
// update the status for the next restoring
|
||||||
if (!this.useTMPSessionAPI && TreeStyleTabService.restoringWindow)
|
if (!this.useTMPSessionAPI && TreeStyleTabService.restoringWindow)
|
||||||
TreeStyleTabService.restoringWindow = TreeStyleTabService.getRestoringTabsCount() > 0;
|
TreeStyleTabService.restoringWindow = TreeStyleTabService.getRestoringTabsCount() > 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
onTabSelect : function(aEvent)
|
onTabSelect : function TSTBrowser_onTabSelect(aEvent)
|
||||||
{
|
{
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
var tab = b.selectedTab
|
var tab = b.selectedTab
|
||||||
@ -2159,7 +2159,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.updateInvertedTabContentsOrder();
|
this.updateInvertedTabContentsOrder();
|
||||||
},
|
},
|
||||||
|
|
||||||
onTabClick : function(aEvent)
|
onTabClick : function TSTBrowser_onTabClick(aEvent)
|
||||||
{
|
{
|
||||||
if (aEvent.button == 1) {
|
if (aEvent.button == 1) {
|
||||||
let tab = this.getTabFromEvent(aEvent);
|
let tab = this.getTabFromEvent(aEvent);
|
||||||
@ -2199,7 +2199,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getTabFromTabbarEvent : function(aEvent)
|
getTabFromTabbarEvent : function TSTBrowser_getTabFromTabbarEvent(aEvent)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
!this.shouldDetectClickOnIndentSpaces ||
|
!this.shouldDetectClickOnIndentSpaces ||
|
||||||
@ -2221,7 +2221,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
return tab;
|
return tab;
|
||||||
},
|
},
|
||||||
|
|
||||||
onDblClick : function(aEvent)
|
onDblClick : function TSTBrowser_onDblClick(aEvent)
|
||||||
{
|
{
|
||||||
var tab = this.getTabFromEvent(aEvent);
|
var tab = this.getTabFromEvent(aEvent);
|
||||||
if (tab &&
|
if (tab &&
|
||||||
@ -2233,7 +2233,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onMouseDown : function(aEvent)
|
onMouseDown : function TSTBrowser_onMouseDown(aEvent)
|
||||||
{
|
{
|
||||||
if (aEvent.button != 0 ||
|
if (aEvent.button != 0 ||
|
||||||
!this.isEventFiredOnTwisty(aEvent))
|
!this.isEventFiredOnTwisty(aEvent))
|
||||||
@ -2242,7 +2242,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.getTabFromEvent(aEvent).__treestyletab__preventSelect = true;
|
this.getTabFromEvent(aEvent).__treestyletab__preventSelect = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
onScroll : function(aEvent)
|
onScroll : function TSTBrowser_onScroll(aEvent)
|
||||||
{
|
{
|
||||||
if (this.lastScrollX < 0 || this.lastScrollY < 0) return;
|
if (this.lastScrollX < 0 || this.lastScrollY < 0) return;
|
||||||
var x = {}, y = {};
|
var x = {}, y = {};
|
||||||
@ -2254,7 +2254,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.lastScrollY = -1;
|
this.lastScrollY = -1;
|
||||||
},
|
},
|
||||||
|
|
||||||
onTabbarOverflow : function(aEvent)
|
onTabbarOverflow : function TSTBrowser_onTabbarOverflow(aEvent)
|
||||||
{
|
{
|
||||||
var tabs = this.mTabBrowser.mTabContainer;
|
var tabs = this.mTabBrowser.mTabContainer;
|
||||||
var horizontal = tabs.orient == 'horizontal';
|
var horizontal = tabs.orient == 'horizontal';
|
||||||
@ -2270,7 +2270,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onPopupShowing : function(aEvent)
|
onPopupShowing : function TSTBrowser_onPopupShowing(aEvent)
|
||||||
{
|
{
|
||||||
if (aEvent.target != aEvent.currentTarget) return;
|
if (aEvent.target != aEvent.currentTarget) return;
|
||||||
switch (aEvent.target.getAttribute('anonid'))
|
switch (aEvent.target.getAttribute('anonid'))
|
||||||
@ -2284,7 +2284,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
initTabContextMenu : function(aEvent)
|
initTabContextMenu : function TSTBrowser_initTabContextMenu(aEvent)
|
||||||
{
|
{
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
var sep, items = {};
|
var sep, items = {};
|
||||||
@ -2403,7 +2403,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
initAllTabsPopup : function(aEvent)
|
initAllTabsPopup : function TSTBrowser_initAllTabsPopup(aEvent)
|
||||||
{
|
{
|
||||||
if (!this.getTreePref('enableSubtreeIndent.allTabsPopup')) return;
|
if (!this.getTreePref('enableSubtreeIndent.allTabsPopup')) return;
|
||||||
var items = aEvent.target.childNodes;
|
var items = aEvent.target.childNodes;
|
||||||
@ -2426,7 +2426,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
return this._panelDNDObserver || (this._panelDNDObserver = new TreeStyleTabBrowserTabpanelDNDObserver(this));
|
return this._panelDNDObserver || (this._panelDNDObserver = new TreeStyleTabBrowserTabpanelDNDObserver(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
getCurrentDragSession : function()
|
getCurrentDragSession : function TSTBrowser_getCurrentDragSession()
|
||||||
{
|
{
|
||||||
return Components
|
return Components
|
||||||
.classes['@mozilla.org/widget/dragservice;1']
|
.classes['@mozilla.org/widget/dragservice;1']
|
||||||
@ -2434,7 +2434,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
.getCurrentSession();
|
.getCurrentSession();
|
||||||
},
|
},
|
||||||
|
|
||||||
getDropAction : function(aEvent, aDragSession)
|
getDropAction : function TSTBrowser_getDropAction(aEvent, aDragSession)
|
||||||
{
|
{
|
||||||
if (!aDragSession)
|
if (!aDragSession)
|
||||||
aDragSession = this.getCurrentDragSession();
|
aDragSession = this.getCurrentDragSession();
|
||||||
@ -2485,7 +2485,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
return info;
|
return info;
|
||||||
},
|
},
|
||||||
|
|
||||||
getDropActionInternal : function(aEvent, aSourceTab)
|
getDropActionInternal : function TSTBrowser_getDropActionInternal(aEvent, aSourceTab)
|
||||||
{
|
{
|
||||||
var tab = aEvent.target;
|
var tab = aEvent.target;
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
@ -2619,7 +2619,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
return info;
|
return info;
|
||||||
},
|
},
|
||||||
|
|
||||||
performDrop : function(aInfo, aDraggedTab)
|
performDrop : function TSTBrowser_performDrop(aInfo, aDraggedTab)
|
||||||
{
|
{
|
||||||
var tabsInfo = this.getDraggedTabsInfoFromOneTab(aInfo, aDraggedTab);
|
var tabsInfo = this.getDraggedTabsInfoFromOneTab(aInfo, aDraggedTab);
|
||||||
if (!tabsInfo.draggedTab) return false;
|
if (!tabsInfo.draggedTab) return false;
|
||||||
@ -2767,7 +2767,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
getDraggedTabsInfoFromOneTab : function(aInfo, aTab)
|
getDraggedTabsInfoFromOneTab : function TSTBrowser_getDraggedTabsInfoFromOneTab(aInfo, aTab)
|
||||||
{
|
{
|
||||||
aTab = this.getTabFromChild(aTab);
|
aTab = this.getTabFromChild(aTab);
|
||||||
if (!aTab)
|
if (!aTab)
|
||||||
@ -2824,7 +2824,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
attachTabsOnDrop : function(aTabs, aParent)
|
attachTabsOnDrop : function TSTBrowser_attachTabsOnDrop(aTabs, aParent)
|
||||||
{
|
{
|
||||||
this.mTabBrowser.movingSelectedTabs = true; // Multiple Tab Handler
|
this.mTabBrowser.movingSelectedTabs = true; // Multiple Tab Handler
|
||||||
aTabs.forEach(function(aTab) {
|
aTabs.forEach(function(aTab) {
|
||||||
@ -2838,7 +2838,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.mTabBrowser.movingSelectedTabs = false; // Multiple Tab Handler
|
this.mTabBrowser.movingSelectedTabs = false; // Multiple Tab Handler
|
||||||
},
|
},
|
||||||
|
|
||||||
partTabsOnDrop : function(aTabs)
|
partTabsOnDrop : function TSTBrowser_partTabsOnDrop(aTabs)
|
||||||
{
|
{
|
||||||
this.mTabBrowser.movingSelectedTabs = true; // Multiple Tab Handler
|
this.mTabBrowser.movingSelectedTabs = true; // Multiple Tab Handler
|
||||||
aTabs.forEach(function(aTab) {
|
aTabs.forEach(function(aTab) {
|
||||||
@ -2849,7 +2849,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.mTabBrowser.movingSelectedTabs = false; // Multiple Tab Handler
|
this.mTabBrowser.movingSelectedTabs = false; // Multiple Tab Handler
|
||||||
},
|
},
|
||||||
|
|
||||||
closeOwner : function(aTabOwner)
|
closeOwner : function TSTBrowser_closeOwner(aTabOwner)
|
||||||
{
|
{
|
||||||
var w = aTabOwner.ownerDocument.defaultView;
|
var w = aTabOwner.ownerDocument.defaultView;
|
||||||
if (!w) return;
|
if (!w) return;
|
||||||
@ -2866,7 +2866,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
w.close();
|
w.close();
|
||||||
},
|
},
|
||||||
|
|
||||||
clearDropPosition : function()
|
clearDropPosition : function TSTBrowser_clearDropPosition()
|
||||||
{
|
{
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
var xpathResult = this.evaluateXPath(
|
var xpathResult = this.evaluateXPath(
|
||||||
@ -2879,7 +2879,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
isDraggingAllTabs : function(aTab)
|
isDraggingAllTabs : function TSTBrowser_isDraggingAllTabs(aTab)
|
||||||
{
|
{
|
||||||
var actionInfo = {
|
var actionInfo = {
|
||||||
action : this.kACTIONS_FOR_DESTINATION | this.kACTION_IMPORT
|
action : this.kACTIONS_FOR_DESTINATION | this.kACTION_IMPORT
|
||||||
@ -2892,7 +2892,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
/* reset */
|
/* reset */
|
||||||
|
|
||||||
resetTab : function(aTab, aPartChildren)
|
resetTab : function TSTBrowser_resetTab(aTab, aPartChildren)
|
||||||
{
|
{
|
||||||
if (aPartChildren)
|
if (aPartChildren)
|
||||||
this.partAllChildren(aTab, {
|
this.partAllChildren(aTab, {
|
||||||
@ -2916,7 +2916,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.updateTabsIndent([aTab], undefined, undefined, true);
|
this.updateTabsIndent([aTab], undefined, undefined, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
resetAllTabs : function(aPartChildren)
|
resetAllTabs : function TSTBrowser_resetAllTabs(aPartChildren)
|
||||||
{
|
{
|
||||||
this.getTabsArray(this.mTabBrowser).forEach(function(aTab) {
|
this.getTabsArray(this.mTabBrowser).forEach(function(aTab) {
|
||||||
this.resetTab(aTab, aPartChildren);
|
this.resetTab(aTab, aPartChildren);
|
||||||
@ -2948,7 +2948,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
/* attach/part */
|
/* attach/part */
|
||||||
|
|
||||||
attachTabTo : function(aChild, aParent, aInfo) /* PUBLIC API */
|
attachTabTo : function TSTBrowser_attachTabTo(aChild, aParent, aInfo) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
var currentParent;
|
var currentParent;
|
||||||
if (
|
if (
|
||||||
@ -3070,13 +3070,13 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
aChild.dispatchEvent(event);
|
aChild.dispatchEvent(event);
|
||||||
},
|
},
|
||||||
|
|
||||||
shouldTabAutoExpanded : function(aTab)
|
shouldTabAutoExpanded : function TSTBrowser_shouldTabAutoExpanded(aTab)
|
||||||
{
|
{
|
||||||
return this.hasChildTabs(aTab) &&
|
return this.hasChildTabs(aTab) &&
|
||||||
this.isSubtreeCollapsed(aTab);
|
this.isSubtreeCollapsed(aTab);
|
||||||
},
|
},
|
||||||
|
|
||||||
partTab : function(aChild, aInfo) /* PUBLIC API */
|
partTab : function TSTBrowser_partTab(aChild, aInfo) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
if (!aChild) return;
|
if (!aChild) return;
|
||||||
if (!aInfo) aInfo = {};
|
if (!aInfo) aInfo = {};
|
||||||
@ -3117,19 +3117,19 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}, 0, this.getTabBrowserFromChild(parentTab));
|
}, 0, this.getTabBrowserFromChild(parentTab));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
detachTab : function(aChild, aInfo) // alias (unstable API!)
|
detachTab : function TSTBrowser_detachTab(aChild, aInfo) // alias (unstable API!)
|
||||||
{
|
{
|
||||||
return this.partTab(aChild, aInfo);
|
return this.partTab(aChild, aInfo);
|
||||||
},
|
},
|
||||||
|
|
||||||
partAllChildren : function(aTab, aInfo)
|
partAllChildren : function TSTBrowser_partAllChildren(aTab, aInfo)
|
||||||
{
|
{
|
||||||
this.getChildTabs(aTab).forEach(function(aTab) {
|
this.getChildTabs(aTab).forEach(function(aTab) {
|
||||||
this.partTab(aTab, aInfo);
|
this.partTab(aTab, aInfo);
|
||||||
}, this);
|
}, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
updateTabsIndent : function(aTabs, aLevel, aTarget, aJustNow)
|
updateTabsIndent : function TSTBrowser_updateTabsIndent(aTabs, aLevel, aTarget, aJustNow)
|
||||||
{
|
{
|
||||||
if (!aTabs || !aTabs.length || !this._treeViewEnabled) return;
|
if (!aTabs || !aTabs.length || !this._treeViewEnabled) return;
|
||||||
|
|
||||||
@ -3164,7 +3164,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.updateTabsIndent(this.getChildTabs(aTab), aLevel+1, aTarget, aJustNow);
|
this.updateTabsIndent(this.getChildTabs(aTab), aLevel+1, aTarget, aJustNow);
|
||||||
}, this);
|
}, this);
|
||||||
},
|
},
|
||||||
updateTabsIndentWithDelay : function(aTabs)
|
updateTabsIndentWithDelay : function TSTBrowser_updateTabsIndentWithDelay(aTabs)
|
||||||
{
|
{
|
||||||
if (this.updateTabsIndentWithDelayTimer)
|
if (this.updateTabsIndentWithDelayTimer)
|
||||||
window.clearTimeout(this.updateTabsIndentWithDelayTimer);
|
window.clearTimeout(this.updateTabsIndentWithDelayTimer);
|
||||||
@ -3185,7 +3185,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
updateTabsIndentWithDelayTabs : [],
|
updateTabsIndentWithDelayTabs : [],
|
||||||
updateTabsIndentWithDelayTimer : null,
|
updateTabsIndentWithDelayTimer : null,
|
||||||
|
|
||||||
updateTabIndent : function(aTab, aIndent, aTarget, aJustNow)
|
updateTabIndent : function TSTBrowser_updateTabIndent(aTab, aIndent, aTarget, aJustNow)
|
||||||
{
|
{
|
||||||
this.stopTabIndentAnimation(aTab);
|
this.stopTabIndentAnimation(aTab);
|
||||||
|
|
||||||
@ -3263,14 +3263,14 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
0, 0, this.indentDuration
|
0, 0, this.indentDuration
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
stopTabIndentAnimation : function(aTab)
|
stopTabIndentAnimation : function TSTBrowser_stopTabIndentAnimation(aTab)
|
||||||
{
|
{
|
||||||
window['piro.sakura.ne.jp'].animationManager.removeTask(
|
window['piro.sakura.ne.jp'].animationManager.removeTask(
|
||||||
aTab.__treestyletab__updateTabIndentTask
|
aTab.__treestyletab__updateTabIndentTask
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
inheritTabIndent : function(aNewTab, aExistingTab)
|
inheritTabIndent : function TSTBrowser_inheritTabIndent(aNewTab, aExistingTab)
|
||||||
{
|
{
|
||||||
var regexp = this.indentRulesRegExp;
|
var regexp = this.indentRulesRegExp;
|
||||||
var indents = (aExistingTab.getAttribute('style') || '').match(regexp) || [];
|
var indents = (aExistingTab.getAttribute('style') || '').match(regexp) || [];
|
||||||
@ -3281,13 +3281,13 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
updateAllTabsIndent : function()
|
updateAllTabsIndent : function TSTBrowser_updateAllTabsIndent()
|
||||||
{
|
{
|
||||||
this.updateTabsIndent(this.rootTabs, 0);
|
this.updateTabsIndent(this.rootTabs, 0);
|
||||||
// this.checkTabsIndentOverflow();
|
// this.checkTabsIndentOverflow();
|
||||||
},
|
},
|
||||||
|
|
||||||
checkTabsIndentOverflow : function()
|
checkTabsIndentOverflow : function TSTBrowser_checkTabsIndentOverflow()
|
||||||
{
|
{
|
||||||
if (this.checkTabsIndentOverflowTimer) {
|
if (this.checkTabsIndentOverflowTimer) {
|
||||||
window.clearTimeout(this.checkTabsIndentOverflowTimer);
|
window.clearTimeout(this.checkTabsIndentOverflowTimer);
|
||||||
@ -3298,7 +3298,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}, 100, this);
|
}, 100, this);
|
||||||
},
|
},
|
||||||
checkTabsIndentOverflowTimer : null,
|
checkTabsIndentOverflowTimer : null,
|
||||||
checkTabsIndentOverflowCallback : function()
|
checkTabsIndentOverflowCallback : function TSTBrowser_checkTabsIndentOverflowCallback()
|
||||||
{
|
{
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
var tabs = this.getArrayFromXPathResult(this.evaluateXPath(
|
var tabs = this.getArrayFromXPathResult(this.evaluateXPath(
|
||||||
@ -3342,7 +3342,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
},
|
},
|
||||||
_horizontalTabMaxIndentBase : 0,
|
_horizontalTabMaxIndentBase : 0,
|
||||||
|
|
||||||
updateTabsCount : function(aTab, aDontUpdateAncestor)
|
updateTabsCount : function TSTBrowser_updateTabsCount(aTab, aDontUpdateAncestor)
|
||||||
{
|
{
|
||||||
var count = document.getAnonymousElementByAttribute(aTab, 'class', this.kCOUNTER);
|
var count = document.getAnonymousElementByAttribute(aTab, 'class', this.kCOUNTER);
|
||||||
if (count) {
|
if (count) {
|
||||||
@ -3355,7 +3355,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
/* move */
|
/* move */
|
||||||
|
|
||||||
moveTabSubTreeTo : function(aTab, aIndex)
|
moveTabSubTreeTo : function TSTBrowser_moveTabSubTreeTo(aTab, aIndex)
|
||||||
{
|
{
|
||||||
if (!aTab) return;
|
if (!aTab) return;
|
||||||
|
|
||||||
@ -3377,7 +3377,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.subTreeMovingCount--;
|
this.subTreeMovingCount--;
|
||||||
},
|
},
|
||||||
|
|
||||||
moveTabLevel : function(aEvent)
|
moveTabLevel : function TSTBrowser_moveTabLevel(aEvent)
|
||||||
{
|
{
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
var parentTab = this.getParentTab(b.mCurrentTab);
|
var parentTab = this.getParentTab(b.mCurrentTab);
|
||||||
@ -3419,7 +3419,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
/* collapse/expand */
|
/* collapse/expand */
|
||||||
|
|
||||||
collapseExpandSubtree : function(aTab, aCollapse, aJustNow) /* PUBLIC API */
|
collapseExpandSubtree : function TSTBrowser_collapseExpandSubtree(aTab, aCollapse, aJustNow) /* PUBLIC API */
|
||||||
{
|
{
|
||||||
if (!aTab) return;
|
if (!aTab) return;
|
||||||
|
|
||||||
@ -3440,7 +3440,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.doingCollapseExpand = false;
|
this.doingCollapseExpand = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
collapseExpandTab : function(aTab, aCollapse, aJustNow)
|
collapseExpandTab : function TSTBrowser_collapseExpandTab(aTab, aCollapse, aJustNow)
|
||||||
{
|
{
|
||||||
if (!aTab || !this.getParentTab(aTab)) return;
|
if (!aTab || !this.getParentTab(aTab)) return;
|
||||||
|
|
||||||
@ -3472,7 +3472,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}, this);
|
}, this);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateTabCollapsed : function(aTab, aCollapsed, aJustNow)
|
updateTabCollapsed : function TSTBrowser_updateTabCollapsed(aTab, aCollapsed, aJustNow)
|
||||||
{
|
{
|
||||||
this.stopTabCollapseAnimation(aTab);
|
this.stopTabCollapseAnimation(aTab);
|
||||||
|
|
||||||
@ -3611,14 +3611,14 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
kOPACITY_RULE_REGEXP : /opacity\s*:[^;]+;?/,
|
kOPACITY_RULE_REGEXP : /opacity\s*:[^;]+;?/,
|
||||||
stopTabCollapseAnimation : function(aTab)
|
stopTabCollapseAnimation : function TSTBrowser_stopTabCollapseAnimation(aTab)
|
||||||
{
|
{
|
||||||
window['piro.sakura.ne.jp'].animationManager.removeTask(
|
window['piro.sakura.ne.jp'].animationManager.removeTask(
|
||||||
aTab.__treestyletab__updateTabCollapsedTask
|
aTab.__treestyletab__updateTabCollapsedTask
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
collapseExpandTreesIntelligentlyFor : function(aTab, aJustNow)
|
collapseExpandTreesIntelligentlyFor : function TSTBrowser_collapseExpandTreesIntelligentlyFor(aTab, aJustNow)
|
||||||
{
|
{
|
||||||
if (!aTab ||
|
if (!aTab ||
|
||||||
this.doingCollapseExpand ||
|
this.doingCollapseExpand ||
|
||||||
@ -3668,7 +3668,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
this.collapseExpandSubtree(aTab, false, aJustNow);
|
this.collapseExpandSubtree(aTab, false, aJustNow);
|
||||||
},
|
},
|
||||||
collapseExpandTreesIntelligentlyWithDelayFor : function(aTab)
|
collapseExpandTreesIntelligentlyWithDelayFor : function TSTBrowser_collapseExpandTreesIntelligentlyWithDelayFor(aTab)
|
||||||
{
|
{
|
||||||
if (this.doingCollapseExpand) return;
|
if (this.doingCollapseExpand) return;
|
||||||
if (this.cETIWDFTimer)
|
if (this.cETIWDFTimer)
|
||||||
@ -3681,7 +3681,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
},
|
},
|
||||||
cETIWDFTimer : null,
|
cETIWDFTimer : null,
|
||||||
|
|
||||||
collapseExpandAllSubtree : function(aCollapse, aJustNow)
|
collapseExpandAllSubtree : function TSTBrowser_collapseExpandAllSubtree(aCollapse, aJustNow)
|
||||||
{
|
{
|
||||||
var xpathResult = this.evaluateXPath(
|
var xpathResult = this.evaluateXPath(
|
||||||
'child::xul:tab[@'+this.kID+' and @'+this.kCHILDREN+
|
'child::xul:tab[@'+this.kID+' and @'+this.kCHILDREN+
|
||||||
@ -3701,7 +3701,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
/* scroll */
|
/* scroll */
|
||||||
|
|
||||||
scrollTo : function(aEndX, aEndY)
|
scrollTo : function TSTBrowser_scrollTo(aEndX, aEndY)
|
||||||
{
|
{
|
||||||
if (this.animationEnabled || this.smoothScrollEnabled) {
|
if (this.animationEnabled || this.smoothScrollEnabled) {
|
||||||
this.smoothScrollTo(aEndX, aEndY);
|
this.smoothScrollTo(aEndX, aEndY);
|
||||||
@ -3715,7 +3715,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
smoothScrollTo : function(aEndX, aEndY)
|
smoothScrollTo : function TSTBrowser_smoothScrollTo(aEndX, aEndY)
|
||||||
{
|
{
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
window['piro.sakura.ne.jp'].animationManager.removeTask(this.smoothScrollTask);
|
window['piro.sakura.ne.jp'].animationManager.removeTask(this.smoothScrollTask);
|
||||||
@ -3768,7 +3768,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
},
|
},
|
||||||
smoothScrollTask : null,
|
smoothScrollTask : null,
|
||||||
|
|
||||||
scrollToTab : function(aTab)
|
scrollToTab : function TSTBrowser_scrollToTab(aTab)
|
||||||
{
|
{
|
||||||
if (!aTab || this.isTabInViewport(aTab)) return;
|
if (!aTab || this.isTabInViewport(aTab)) return;
|
||||||
|
|
||||||
@ -3800,7 +3800,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.scrollTo(targetX, targetY);
|
this.scrollTo(targetX, targetY);
|
||||||
},
|
},
|
||||||
|
|
||||||
scrollToTabSubTree : function(aTab)
|
scrollToTabSubTree : function TSTBrowser_scrollToTabSubTree(aTab)
|
||||||
{
|
{
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
var descendant = this.getDescendantTabs(aTab);
|
var descendant = this.getDescendantTabs(aTab);
|
||||||
@ -3875,31 +3875,31 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
get autoHideMode() { return this.autoHide.mode; },
|
get autoHideMode() { return this.autoHide.mode; },
|
||||||
set autoHideMode(aValue) { return this.autoHide.mode = aValue; },
|
set autoHideMode(aValue) { return this.autoHide.mode = aValue; },
|
||||||
|
|
||||||
updateAutoHideMode : function() { this.autoHide.updateAutoHideMode(); },
|
updateAutoHideMode : function TSTBrowser_updateAutoHideMode() { this.autoHide.updateAutoHideMode(); },
|
||||||
showHideTabbarInternal : function(aReason) { this.autoHide.showHideInternal(aReason); },
|
showHideTabbarInternal : function TSTBrowser_showHideTabbarInternal(aReason) { this.autoHide.showHideInternal(aReason); },
|
||||||
showTabbar : function(aReason) { this.autoHide.show(aReason); },
|
showTabbar : function TSTBrowser_showTabbar(aReason) { this.autoHide.show(aReason); },
|
||||||
hideTabbar : function(aReason) { this.autoHide.hide(aReason); },
|
hideTabbar : function TSTBrowser_hideTabbar(aReason) { this.autoHide.hide(aReason); },
|
||||||
redrawContentArea : function() { this.autoHide.redrawContentArea(); },
|
redrawContentArea : function TSTBrowser_redrawContentArea() { this.autoHide.redrawContentArea(); },
|
||||||
drawTabbarCanvas : function() { this.autoHide.drawBG(); },
|
drawTabbarCanvas : function TSTBrowser_drawTabbarCanvas() { this.autoHide.drawBG(); },
|
||||||
get splitterBorderColor() { this.autoHide.splitterBorderColor; },
|
get splitterBorderColor() { this.autoHide.splitterBorderColor; },
|
||||||
clearTabbarCanvas : function() { this.autoHide.clearBG(); },
|
clearTabbarCanvas : function TSTBrowser_clearTabbarCanvas() { this.autoHide.clearBG(); },
|
||||||
updateTabbarTransparency : function() { this.autoHide.updateTransparency(); },
|
updateTabbarTransparency : function TSTBrowser_updateTabbarTransparency() { this.autoHide.updateTransparency(); },
|
||||||
|
|
||||||
get autoHideEnabled() { return this.autoHide.enabled; },
|
get autoHideEnabled() { return this.autoHide.enabled; },
|
||||||
set autoHideEnabled(aValue) { return this.autoHide.enabled = aValue; },
|
set autoHideEnabled(aValue) { return this.autoHide.enabled = aValue; },
|
||||||
startAutoHide : function() { this.autoHide.start(); },
|
startAutoHide : function TSTBrowser_startAutoHide() { this.autoHide.start(); },
|
||||||
endAutoHide : function() { this.autoHide.end(); },
|
endAutoHide : function TSTBrowser_endAutoHide() { this.autoHide.end(); },
|
||||||
startAutoHideForFullScreen : function() { this.autoHide.startForFullScreen(); },
|
startAutoHideForFullScreen : function TSTBrowser_startAutoHideForFullScreen() { this.autoHide.startForFullScreen(); },
|
||||||
endAutoHideForFullScreen : function() { this.autoHide.endForFullScreen(); },
|
endAutoHideForFullScreen : function TSTBrowser_endAutoHideForFullScreen() { this.autoHide.endForFullScreen(); },
|
||||||
|
|
||||||
startListenMouseMove : function() { this.autoHide.startListenMouseMove(); },
|
startListenMouseMove : function TSTBrowser_startListenMouseMove() { this.autoHide.startListenMouseMove(); },
|
||||||
endListenMouseMove : function() { this.autoHide.endListenMouseMove(); },
|
endListenMouseMove : function TSTBrowser_endListenMouseMove() { this.autoHide.endListenMouseMove(); },
|
||||||
get shouldListenMouseMove() { return this.autoHide.shouldListenMouseMove; },
|
get shouldListenMouseMove() { return this.autoHide.shouldListenMouseMove; },
|
||||||
showHideTabbarOnMousemove : function() { this.autoHide.showHideOnMousemove(); },
|
showHideTabbarOnMousemove : function TSTBrowser_showHideTabbarOnMousemove() { this.autoHide.showHideOnMousemove(); },
|
||||||
cancelShowHideTabbarOnMousemove : function() { this.autoHide.cancelShowHideOnMousemove(); },
|
cancelShowHideTabbarOnMousemove : function TSTBrowser_cancelShowHideTabbarOnMousemove() { this.autoHide.cancelShowHideOnMousemove(); },
|
||||||
showTabbarForFeedback : function() { this.autoHide.showForFeedback(); },
|
showTabbarForFeedback : function TSTBrowser_showTabbarForFeedback() { this.autoHide.showForFeedback(); },
|
||||||
delayedShowTabbarForFeedback : function() { this.autoHide.delayedShowForFeedback(); },
|
delayedShowTabbarForFeedback : function TSTBrowser_delayedShowTabbarForFeedback() { this.autoHide.delayedShowForFeedback(); },
|
||||||
cancelHideTabbarForFeedback : function() { this.autoHide.cancelHideForFeedback(); }
|
cancelHideTabbarForFeedback : function TSTBrowser_cancelHideTabbarForFeedback() { this.autoHide.cancelHideForFeedback(); }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
return this.state == this.kSTATE_HIDDEN;
|
return this.state == this.kSTATE_HIDDEN;
|
||||||
},
|
},
|
||||||
|
|
||||||
updateMode : function()
|
updateMode : function TSTAutoHide_updateMode()
|
||||||
{
|
{
|
||||||
this.end();
|
this.end();
|
||||||
// update internal property after the appearance of the tab bar is updated.
|
// update internal property after the appearance of the tab bar is updated.
|
||||||
@ -95,7 +95,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
return this.height;
|
return this.height;
|
||||||
},
|
},
|
||||||
|
|
||||||
start : function()
|
start : function TSTAutoHide_start()
|
||||||
{
|
{
|
||||||
if (this.enabled) return;
|
if (this.enabled) return;
|
||||||
this.enabled = true;
|
this.enabled = true;
|
||||||
@ -118,7 +118,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
this.showHideInternal();
|
this.showHideInternal();
|
||||||
},
|
},
|
||||||
|
|
||||||
end : function()
|
end : function TSTAutoHide_end()
|
||||||
{
|
{
|
||||||
if (!this.enabled) return;
|
if (!this.enabled) return;
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
@ -148,7 +148,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
|
|
||||||
// fullscreen
|
// fullscreen
|
||||||
|
|
||||||
startForFullScreen : function()
|
startForFullScreen : function TSTAutoHide_startForFullScreen()
|
||||||
{
|
{
|
||||||
this.mode = this.getTreePref('tabbar.autoHide.mode');
|
this.mode = this.getTreePref('tabbar.autoHide.mode');
|
||||||
this.end();
|
this.end();
|
||||||
@ -163,7 +163,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
endForFullScreen : function()
|
endForFullScreen : function TSTAutoHide_endForFullScreen()
|
||||||
{
|
{
|
||||||
this.mode = this.getTreePref('tabbar.autoHide.mode.fullscreen');
|
this.mode = this.getTreePref('tabbar.autoHide.mode.fullscreen');
|
||||||
this.end();
|
this.end();
|
||||||
@ -175,14 +175,14 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
|
|
||||||
// mousemove
|
// mousemove
|
||||||
|
|
||||||
startListenMouseMove : function()
|
startListenMouseMove : function TSTAutoHide_startListenMouseMove()
|
||||||
{
|
{
|
||||||
if (this.mouseMoveListening) return;
|
if (this.mouseMoveListening) return;
|
||||||
this.mOwner.mTabBrowser.addEventListener('mousemove', this, true);
|
this.mOwner.mTabBrowser.addEventListener('mousemove', this, true);
|
||||||
this.mouseMoveListening = true;
|
this.mouseMoveListening = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
endListenMouseMove : function()
|
endListenMouseMove : function TSTAutoHide_endListenMouseMove()
|
||||||
{
|
{
|
||||||
if (!this.mouseMoveListening) return;
|
if (!this.mouseMoveListening) return;
|
||||||
this.mOwner.mTabBrowser.removeEventListener('mousemove', this, true);
|
this.mOwner.mTabBrowser.removeEventListener('mousemove', this, true);
|
||||||
@ -197,7 +197,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
this.getTreePref('tabbar.autoShow.feedback');
|
this.getTreePref('tabbar.autoShow.feedback');
|
||||||
},
|
},
|
||||||
|
|
||||||
showHideOnMousemove : function(aEvent)
|
showHideOnMousemove : function TSTAutoHide_showHideOnMousemove(aEvent)
|
||||||
{
|
{
|
||||||
if ('gestureInProgress' in window && window.gestureInProgress) return;
|
if ('gestureInProgress' in window && window.gestureInProgress) return;
|
||||||
|
|
||||||
@ -278,7 +278,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
shouldKeepShown = null;
|
shouldKeepShown = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
cancelShowHideOnMousemove : function()
|
cancelShowHideOnMousemove : function TSTAutoHide_cancelShowHideOnMousemove()
|
||||||
{
|
{
|
||||||
if (this.showHideOnMousemoveTimer) {
|
if (this.showHideOnMousemoveTimer) {
|
||||||
window.clearTimeout(this.showHideOnMousemoveTimer);
|
window.clearTimeout(this.showHideOnMousemoveTimer);
|
||||||
@ -288,7 +288,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
|
|
||||||
// feedback
|
// feedback
|
||||||
|
|
||||||
showForFeedback : function()
|
showForFeedback : function TSTAutoHide_showForFeedback()
|
||||||
{
|
{
|
||||||
if (!this.enabled ||
|
if (!this.enabled ||
|
||||||
!this.getTreePref('tabbar.autoShow.feedback'))
|
!this.getTreePref('tabbar.autoShow.feedback'))
|
||||||
@ -309,7 +309,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
delayedShowForFeedback : function()
|
delayedShowForFeedback : function TSTAutoHide_delayedShowForFeedback()
|
||||||
{
|
{
|
||||||
this.show(this.kSHOWN_BY_FEEDBACK);
|
this.show(this.kSHOWN_BY_FEEDBACK);
|
||||||
this.cancelHideForFeedback();
|
this.cancelHideForFeedback();
|
||||||
@ -324,7 +324,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
cancelHideForFeedback : function()
|
cancelHideForFeedback : function TSTAutoHide_cancelHideForFeedback()
|
||||||
{
|
{
|
||||||
if (this.delayedHideTabbarForFeedbackTimer) {
|
if (this.delayedHideTabbarForFeedbackTimer) {
|
||||||
window.clearTimeout(this.delayedHideTabbarForFeedbackTimer);
|
window.clearTimeout(this.delayedHideTabbarForFeedbackTimer);
|
||||||
@ -332,7 +332,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
setWidth : function(aWidth, aForceExpanded)
|
setWidth : function TSTAutoHide_setWidth(aWidth, aForceExpanded)
|
||||||
{
|
{
|
||||||
if (aForceExpanded ||
|
if (aForceExpanded ||
|
||||||
this.expanded ||
|
this.expanded ||
|
||||||
@ -342,7 +342,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
this.setTreePref('tabbar.shrunkenWidth', aWidth);
|
this.setTreePref('tabbar.shrunkenWidth', aWidth);
|
||||||
},
|
},
|
||||||
|
|
||||||
updateMenuItem : function(aNode)
|
updateMenuItem : function TSTAutoHide_updateMenuItem(aNode)
|
||||||
{
|
{
|
||||||
if (this.mode != this.kMODE_DISABLED)
|
if (this.mode != this.kMODE_DISABLED)
|
||||||
aNode.setAttribute('checked', true);
|
aNode.setAttribute('checked', true);
|
||||||
@ -402,7 +402,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
},
|
},
|
||||||
_splitterWidth : 0,
|
_splitterWidth : 0,
|
||||||
|
|
||||||
showHideInternal : function(aReason)
|
showHideInternal : function TSTAutoHide_showHideInternal(aReason)
|
||||||
{
|
{
|
||||||
this.stopRendering();
|
this.stopRendering();
|
||||||
|
|
||||||
@ -436,19 +436,19 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
}, 0, this);
|
}, 0, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
show : function(aReason)
|
show : function TSTAutoHide_show(aReason)
|
||||||
{
|
{
|
||||||
if (!this.expanded)
|
if (!this.expanded)
|
||||||
this.showHideInternal(aReason);
|
this.showHideInternal(aReason);
|
||||||
},
|
},
|
||||||
|
|
||||||
hide : function(aReason)
|
hide : function TSTAutoHide_hide(aReason)
|
||||||
{
|
{
|
||||||
if (this.expanded)
|
if (this.expanded)
|
||||||
this.showHideInternal(aReason);
|
this.showHideInternal(aReason);
|
||||||
},
|
},
|
||||||
|
|
||||||
onShowing : function()
|
onShowing : function TSTAutoHide_onShowing()
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
var b = sv.mTabBrowser;
|
var b = sv.mTabBrowser;
|
||||||
@ -485,7 +485,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onHiding : function()
|
onHiding : function TSTAutoHide_onHiding()
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
var b = sv.mTabBrowser;
|
var b = sv.mTabBrowser;
|
||||||
@ -513,7 +513,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
fireStateChangingEvent : function()
|
fireStateChangingEvent : function TSTAutoHide_fireStateChangingEvent()
|
||||||
{
|
{
|
||||||
/* PUBLIC API */
|
/* PUBLIC API */
|
||||||
var event = document.createEvent('Events');
|
var event = document.createEvent('Events');
|
||||||
@ -523,7 +523,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
this.mOwner.mTabBrowser.dispatchEvent(event);
|
this.mOwner.mTabBrowser.dispatchEvent(event);
|
||||||
},
|
},
|
||||||
|
|
||||||
fireStateChangeEvent : function()
|
fireStateChangeEvent : function TSTAutoHide_fireStateChangeEvent()
|
||||||
{
|
{
|
||||||
/* PUBLIC API */
|
/* PUBLIC API */
|
||||||
var event = document.createEvent('Events');
|
var event = document.createEvent('Events');
|
||||||
@ -535,7 +535,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
this.mOwner.mTabBrowser.dispatchEvent(event);
|
this.mOwner.mTabBrowser.dispatchEvent(event);
|
||||||
},
|
},
|
||||||
|
|
||||||
redrawContentArea : function()
|
redrawContentArea : function TSTAutoHide_redrawContentArea()
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
var pos = sv.mTabBrowser.getAttribute(sv.kTABBAR_POSITION);
|
var pos = sv.mTabBrowser.getAttribute(sv.kTABBAR_POSITION);
|
||||||
@ -577,7 +577,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
return this.enabled && this.expanded;
|
return this.enabled && this.expanded;
|
||||||
},
|
},
|
||||||
|
|
||||||
drawBG : function()
|
drawBG : function TSTAutoHide_drawBG()
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
|
|
||||||
@ -709,7 +709,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
].join(',')+')';
|
].join(',')+')';
|
||||||
},
|
},
|
||||||
|
|
||||||
getZoomForFrame : function(aFrame)
|
getZoomForFrame : function TSTAutoHide_getZoomForFrame(aFrame)
|
||||||
{
|
{
|
||||||
var zoom = aFrame
|
var zoom = aFrame
|
||||||
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||||
@ -721,7 +721,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
return (zoom * 1000 % 1) ? zoom+0.025 : zoom ;
|
return (zoom * 1000 % 1) ? zoom+0.025 : zoom ;
|
||||||
},
|
},
|
||||||
|
|
||||||
clearBG : function()
|
clearBG : function TSTAutoHide_clearBG()
|
||||||
{
|
{
|
||||||
if (!this.tabbarCanvas) return;
|
if (!this.tabbarCanvas) return;
|
||||||
|
|
||||||
@ -732,7 +732,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
this.tabbarCanvas.width = this.tabbarCanvas.height = 1;
|
this.tabbarCanvas.width = this.tabbarCanvas.height = 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
updateTransparency : function()
|
updateTransparency : function TSTAutoHide_updateTransparency()
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
var b = sv.mTabBrowser;
|
var b = sv.mTabBrowser;
|
||||||
@ -756,7 +756,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
|
|
||||||
// event handling
|
// event handling
|
||||||
|
|
||||||
observe : function(aSubject, aTopic, aData)
|
observe : function TSTAutoHide_observe(aSubject, aTopic, aData)
|
||||||
{
|
{
|
||||||
switch (aTopic)
|
switch (aTopic)
|
||||||
{
|
{
|
||||||
@ -774,7 +774,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
'browser.fullscreen.autohide'
|
'browser.fullscreen.autohide'
|
||||||
],
|
],
|
||||||
|
|
||||||
onPrefChange : function(aPrefName)
|
onPrefChange : function TSTAutoHide_onPrefChange(aPrefName)
|
||||||
{
|
{
|
||||||
var value = this.getPref(aPrefName);
|
var value = this.getPref(aPrefName);
|
||||||
switch (aPrefName)
|
switch (aPrefName)
|
||||||
@ -825,7 +825,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleEvent : function(aEvent)
|
handleEvent : function TSTAutoHide_handleEvent(aEvent)
|
||||||
{
|
{
|
||||||
switch (aEvent.type)
|
switch (aEvent.type)
|
||||||
{
|
{
|
||||||
@ -910,7 +910,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onMouseDown : function(aEvent)
|
onMouseDown : function TSTAutoHide_onMouseDown(aEvent)
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
if (
|
if (
|
||||||
@ -957,7 +957,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
this.lastMouseDownTarget = aEvent.originalTarget.localName;
|
this.lastMouseDownTarget = aEvent.originalTarget.localName;
|
||||||
},
|
},
|
||||||
|
|
||||||
onMouseUp : function(aEvent)
|
onMouseUp : function TSTAutoHide_onMouseUp(aEvent)
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
if (aEvent.originalTarget &&
|
if (aEvent.originalTarget &&
|
||||||
@ -978,7 +978,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
this.lastMouseDownTarget = null;
|
this.lastMouseDownTarget = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
handleMouseMove : function(aEvent)
|
handleMouseMove : function TSTAutoHide_handleMouseMove(aEvent)
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
if (this.isResizing &&
|
if (this.isResizing &&
|
||||||
@ -996,7 +996,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
onResize : function(aEvent)
|
onResize : function TSTAutoHide_onResize(aEvent)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
!aEvent.originalTarget ||
|
!aEvent.originalTarget ||
|
||||||
@ -1027,7 +1027,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
this.redrawContentArea();
|
this.redrawContentArea();
|
||||||
},
|
},
|
||||||
|
|
||||||
onScroll : function(aEvent)
|
onScroll : function TSTAutoHide_onScroll(aEvent)
|
||||||
{
|
{
|
||||||
var node = aEvent.originalTarget;
|
var node = aEvent.originalTarget;
|
||||||
if ((node && node.ownerDocument == document) || !this.shouldRedraw) return;
|
if ((node && node.ownerDocument == document) || !this.shouldRedraw) return;
|
||||||
@ -1047,7 +1047,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
this.redrawContentArea();
|
this.redrawContentArea();
|
||||||
},
|
},
|
||||||
|
|
||||||
onKeyDown : function(aEvent)
|
onKeyDown : function TSTAutoHide_onKeyDown(aEvent)
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
var b = sv.mTabBrowser;
|
var b = sv.mTabBrowser;
|
||||||
@ -1084,7 +1084,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
cancelDelayedShowForShortcut : function()
|
cancelDelayedShowForShortcut : function TSTAutoHide_cancelDelayedShowForShortcut()
|
||||||
{
|
{
|
||||||
if (this.delayedShowForShortcutTimer) {
|
if (this.delayedShowForShortcutTimer) {
|
||||||
window.clearTimeout(this.delayedShowForShortcutTimer);
|
window.clearTimeout(this.delayedShowForShortcutTimer);
|
||||||
@ -1095,7 +1095,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
delayedShowForShortcutTimer : null,
|
delayedShowForShortcutTimer : null,
|
||||||
delayedShowForShortcutDone : true,
|
delayedShowForShortcutDone : true,
|
||||||
|
|
||||||
init : function()
|
init : function TSTAutoHide_init()
|
||||||
{
|
{
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
this.mouseMoveListening = false;
|
this.mouseMoveListening = false;
|
||||||
@ -1138,7 +1138,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
|||||||
stack = null;
|
stack = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy : function()
|
destroy : function TSTAutoHide_destroy()
|
||||||
{
|
{
|
||||||
this.end();
|
this.end();
|
||||||
this.removePrefListener(this);
|
this.removePrefListener(this);
|
||||||
@ -1176,7 +1176,7 @@ TreeStyleTabBrowserAutoHide.__defineSetter__('mode', function(aValue) {
|
|||||||
|
|
||||||
TreeStyleTabBrowserAutoHide.mMode = TreeStyleTabBrowserAutoHide.prototype.kMODE_HIDE;
|
TreeStyleTabBrowserAutoHide.mMode = TreeStyleTabBrowserAutoHide.prototype.kMODE_HIDE;
|
||||||
|
|
||||||
TreeStyleTabBrowserAutoHide.toggleMode = function() {
|
TreeStyleTabBrowserAutoHide.toggleMode = function TSTAutoHide_toggleMode() {
|
||||||
TreeStyleTabService.setTreePref('tabbar.autoHide.mode',
|
TreeStyleTabService.setTreePref('tabbar.autoHide.mode',
|
||||||
TreeStyleTabService.getTreePref('tabbar.autoHide.mode') == this.prototype.kMODE_DISABLED ?
|
TreeStyleTabService.getTreePref('tabbar.autoHide.mode') == this.prototype.kMODE_DISABLED ?
|
||||||
TreeStyleTabService.getTreePref('tabbar.autoHide.mode.toggle') :
|
TreeStyleTabService.getTreePref('tabbar.autoHide.mode.toggle') :
|
||||||
@ -1186,7 +1186,7 @@ TreeStyleTabBrowserAutoHide.toggleMode = function() {
|
|||||||
|
|
||||||
// for shortcuts
|
// for shortcuts
|
||||||
|
|
||||||
TreeStyleTabBrowserAutoHide.updateKeyListeners = function() {
|
TreeStyleTabBrowserAutoHide.updateKeyListeners = function TSTAutoHide_updateKeyListeners() {
|
||||||
if (
|
if (
|
||||||
TreeStyleTabService.getTreePref('tabbar.autoHide.mode') &&
|
TreeStyleTabService.getTreePref('tabbar.autoHide.mode') &&
|
||||||
this.shouldListenKeyEvents
|
this.shouldListenKeyEvents
|
||||||
|
@ -7,7 +7,7 @@ function TreeStyleTabBrowserTabbarDNDObserver(aOwner)
|
|||||||
|
|
||||||
TreeStyleTabBrowserTabbarDNDObserver.prototype = {
|
TreeStyleTabBrowserTabbarDNDObserver.prototype = {
|
||||||
|
|
||||||
onDragStart : function(aEvent, aTransferData, aDragAction)
|
onDragStart : function TSTTabbarDND_onDragStart(aEvent, aTransferData, aDragAction)
|
||||||
{
|
{
|
||||||
if (!this.canDragTabbar(aEvent))
|
if (!this.canDragTabbar(aEvent))
|
||||||
return false;
|
return false;
|
||||||
@ -27,7 +27,7 @@ TreeStyleTabBrowserTabbarDNDObserver.prototype = {
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
canDragTabbar : function(aEvent)
|
canDragTabbar : function TSTTabbarDND_canDragTabbar(aEvent)
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
|
|
||||||
@ -91,21 +91,21 @@ TreeStyleTabBrowserTabbarDNDObserver.prototype = {
|
|||||||
return this._SSS;
|
return this._SSS;
|
||||||
},
|
},
|
||||||
|
|
||||||
readyToStartDrag : function()
|
readyToStartDrag : function TSTTabbarDND_readyToStartDrag()
|
||||||
{
|
{
|
||||||
var sheet = this.mOwner.makeURIFromSpec('chrome://treestyletab/content/hide-embed.css');
|
var sheet = this.mOwner.makeURIFromSpec('chrome://treestyletab/content/hide-embed.css');
|
||||||
if (!this.SSS.sheetRegistered(sheet, this.SSS.AGENT_SHEET))
|
if (!this.SSS.sheetRegistered(sheet, this.SSS.AGENT_SHEET))
|
||||||
this.SSS.loadAndRegisterSheet(sheet, this.SSS.AGENT_SHEET);
|
this.SSS.loadAndRegisterSheet(sheet, this.SSS.AGENT_SHEET);
|
||||||
},
|
},
|
||||||
|
|
||||||
readyToEndDrag : function()
|
readyToEndDrag : function TSTTabbarDND_readyToEndDrag()
|
||||||
{
|
{
|
||||||
var sheet = this.mOwner.makeURIFromSpec('chrome://treestyletab/content/hide-embed.css');
|
var sheet = this.mOwner.makeURIFromSpec('chrome://treestyletab/content/hide-embed.css');
|
||||||
if (this.SSS.sheetRegistered(sheet, this.SSS.AGENT_SHEET))
|
if (this.SSS.sheetRegistered(sheet, this.SSS.AGENT_SHEET))
|
||||||
this.SSS.unregisterSheet(sheet, this.SSS.AGENT_SHEET);
|
this.SSS.unregisterSheet(sheet, this.SSS.AGENT_SHEET);
|
||||||
},
|
},
|
||||||
|
|
||||||
onDragEnter : function(aEvent, aDragSession)
|
onDragEnter : function TSTTabbarDND_onDragEnter(aEvent, aDragSession)
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
var tab = aEvent.target;
|
var tab = aEvent.target;
|
||||||
@ -137,13 +137,13 @@ TreeStyleTabBrowserTabbarDNDObserver.prototype = {
|
|||||||
tab = null;
|
tab = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
onDragExit : function(aEvent, aDragSession)
|
onDragExit : function TSTTabbarDND_onDragExit(aEvent, aDragSession)
|
||||||
{
|
{
|
||||||
window.clearTimeout(this.mAutoExpandTimer);
|
window.clearTimeout(this.mAutoExpandTimer);
|
||||||
this.mAutoExpandTimer = null;
|
this.mAutoExpandTimer = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
onDragEnd : function(aEvent)
|
onDragEnd : function TSTTabbarDND_onDragEnd(aEvent)
|
||||||
{
|
{
|
||||||
window.setTimeout(function(aSelf) {
|
window.setTimeout(function(aSelf) {
|
||||||
aSelf.readyToEndDrag();
|
aSelf.readyToEndDrag();
|
||||||
@ -152,11 +152,11 @@ TreeStyleTabBrowserTabbarDNDObserver.prototype = {
|
|||||||
aEvent.stopPropagation();
|
aEvent.stopPropagation();
|
||||||
},
|
},
|
||||||
|
|
||||||
onDragOver : function(aEvent, aFlavour, aDragSession)
|
onDragOver : function TSTTabbarDND_onDragOver(aEvent, aFlavour, aDragSession)
|
||||||
{
|
{
|
||||||
},
|
},
|
||||||
|
|
||||||
onDrop : function(aEvent, aXferData, aDragSession)
|
onDrop : function TSTTabbarDND_onDrop(aEvent, aXferData, aDragSession)
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
if (!this.mAutoExpandedTabs.length) return;
|
if (!this.mAutoExpandedTabs.length) return;
|
||||||
@ -168,7 +168,7 @@ TreeStyleTabBrowserTabbarDNDObserver.prototype = {
|
|||||||
this.mAutoExpandedTabs = [];
|
this.mAutoExpandedTabs = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
canDrop : function(aEvent, aDragSession)
|
canDrop : function TSTTabbarDND_canDrop(aEvent, aDragSession)
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
var tooltip = sv.mTabBrowser.mStrip.firstChild;
|
var tooltip = sv.mTabBrowser.mStrip.firstChild;
|
||||||
@ -191,7 +191,7 @@ TreeStyleTabBrowserTabbarDNDObserver.prototype = {
|
|||||||
return dropAction.canDrop;
|
return dropAction.canDrop;
|
||||||
},
|
},
|
||||||
|
|
||||||
getSupportedFlavours : function()
|
getSupportedFlavours : function TSTTabbarDND_getSupportedFlavours()
|
||||||
{
|
{
|
||||||
var flavourSet = new FlavourSet();
|
var flavourSet = new FlavourSet();
|
||||||
flavourSet.appendFlavour('application/x-moz-tabbrowser-tab');
|
flavourSet.appendFlavour('application/x-moz-tabbrowser-tab');
|
||||||
@ -202,7 +202,7 @@ TreeStyleTabBrowserTabbarDNDObserver.prototype = {
|
|||||||
return flavourSet;
|
return flavourSet;
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy : function()
|
destroy : function TSTTabbarDND_destroy()
|
||||||
{
|
{
|
||||||
delete this.mOwner;
|
delete this.mOwner;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ function TreeStyleTabBrowserTabpanelDNDObserver(aOwner)
|
|||||||
|
|
||||||
TreeStyleTabBrowserTabpanelDNDObserver.prototype = {
|
TreeStyleTabBrowserTabpanelDNDObserver.prototype = {
|
||||||
|
|
||||||
onDragExit : function(aEvent, aDragSession)
|
onDragExit : function TSTTabpanelDND_onDragExit(aEvent, aDragSession)
|
||||||
{
|
{
|
||||||
if (!this.canDrop(aEvent, aDragSession)) return;
|
if (!this.canDrop(aEvent, aDragSession)) return;
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
@ -13,7 +13,7 @@ TreeStyleTabBrowserTabpanelDNDObserver.prototype = {
|
|||||||
sv.mTabBrowser.setAttribute(sv.kDROP_POSITION, sv.kDROP_POSITION_UNKNOWN);
|
sv.mTabBrowser.setAttribute(sv.kDROP_POSITION, sv.kDROP_POSITION_UNKNOWN);
|
||||||
},
|
},
|
||||||
|
|
||||||
onDragOver : function(aEvent, aFlavour, aDragSession)
|
onDragOver : function TSTTabpanelDND_onDragOver(aEvent, aFlavour, aDragSession)
|
||||||
{
|
{
|
||||||
if (!this.canDrop(aEvent, aDragSession)) return;
|
if (!this.canDrop(aEvent, aDragSession)) return;
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
@ -23,7 +23,7 @@ TreeStyleTabBrowserTabpanelDNDObserver.prototype = {
|
|||||||
sv.mTabBrowser.setAttribute(sv.kDROP_POSITION, position);
|
sv.mTabBrowser.setAttribute(sv.kDROP_POSITION, position);
|
||||||
},
|
},
|
||||||
|
|
||||||
onDrop : function(aEvent, aXferData, aDragSession)
|
onDrop : function TSTTabpanelDND_onDrop(aEvent, aXferData, aDragSession)
|
||||||
{
|
{
|
||||||
var sv = this.mOwner;
|
var sv = this.mOwner;
|
||||||
var position = this.getDropPosition(aEvent);
|
var position = this.getDropPosition(aEvent);
|
||||||
@ -40,7 +40,7 @@ TreeStyleTabBrowserTabpanelDNDObserver.prototype = {
|
|||||||
aEvent.stopPropagation();
|
aEvent.stopPropagation();
|
||||||
},
|
},
|
||||||
|
|
||||||
getDropPosition : function(aEvent)
|
getDropPosition : function TSTTabpanelDND_getDropPosition(aEvent)
|
||||||
{
|
{
|
||||||
var box = this.mOwner.mTabBrowser.boxObject;
|
var box = this.mOwner.mTabBrowser.boxObject;
|
||||||
var W = box.width;
|
var W = box.width;
|
||||||
@ -64,7 +64,7 @@ TreeStyleTabBrowserTabpanelDNDObserver.prototype = {
|
|||||||
'right' ;
|
'right' ;
|
||||||
},
|
},
|
||||||
|
|
||||||
canDrop : function(aEvent, aDragSession)
|
canDrop : function TSTTabpanelDND_canDrop(aEvent, aDragSession)
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
aDragSession &&
|
aDragSession &&
|
||||||
@ -73,14 +73,14 @@ TreeStyleTabBrowserTabpanelDNDObserver.prototype = {
|
|||||||
) ? true : false ;
|
) ? true : false ;
|
||||||
},
|
},
|
||||||
|
|
||||||
getSupportedFlavours : function()
|
getSupportedFlavours : function TSTTabpanelDND_getSupportedFlavours()
|
||||||
{
|
{
|
||||||
var flavourSet = new FlavourSet();
|
var flavourSet = new FlavourSet();
|
||||||
flavourSet.appendFlavour(this.mOwner.kDRAG_TYPE_TABBAR);
|
flavourSet.appendFlavour(this.mOwner.kDRAG_TYPE_TABBAR);
|
||||||
return flavourSet;
|
return flavourSet;
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy : function()
|
destroy : function TSTTabpanelDND_destroy()
|
||||||
{
|
{
|
||||||
delete this.mOwner;
|
delete this.mOwner;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user