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