From 6addd2dffd915b2868b50280fc369d947258b211 Mon Sep 17 00:00:00 2001 From: SHIMODA Hiroshi Date: Wed, 6 Apr 2011 14:02:00 +0900 Subject: [PATCH] use Ci.nsIDOMXPathResult instead of XPathResult --- content/treestyletab/treestyletab.js | 4 +--- content/treestyletab/treestyletabbrowser.js | 14 +++++++------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index d88f9552..671e6417 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -1315,9 +1315,7 @@ var TreeStyleTabService = { 'local-name() = "tooltip" or local-name() ="panel" or '+ 'parent::*/ancestor-or-self::*[local-name()="popup" or local-name()="menupopup"]', aPopup, - XPathResult.BOOLEAN_TYPE - - + Ci.nsIDOMXPathResult.BOOLEAN_TYPE ).booleanValue) return; diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 3abada8d..37a8a30f 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -86,7 +86,7 @@ TreeStyleTabBrowser.prototype = { get tabTooltip() { return document.getElementById('tabbrowser-tab-tooltip') || // Firefox 4.0- - this.evaluateXPath('descendant::xul:tooltip', this.browser.mStrip, XPathResult.FIRST_ORDERED_NODE_TYPE).singleNodeValue; // -Firefox 3.6 + this.evaluateXPath('descendant::xul:tooltip', this.browser.mStrip, Ci.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE).singleNodeValue; // -Firefox 3.6 }, /* properties */ @@ -241,7 +241,7 @@ TreeStyleTabBrowser.prototype = { return this.evaluateXPath( 'ancestor-or-self::xul:toolbar[1]', this.mTabBrowser.tabContainer, - XPathResult.FIRST_ORDERED_NODE_TYPE + Ci.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE ).singleNodeValue; }, @@ -3388,7 +3388,7 @@ TreeStyleTabBrowser.prototype = { (aDir < 0 ? 'last()' : '1' )+ ']', aTabbar, - XPathResult.FIRST_ORDERED_NODE_TYPE + Ci.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE ).singleNodeValue; } if (nextTab && nextTab != aTabbar.selectedItem) @@ -3638,7 +3638,7 @@ TreeStyleTabBrowser.prototype = { let item = this.evaluateXPath( 'descendant::xul:*[starts-with(@id, "'+aID+'")]', aEvent.currentTarget, - XPathResult.FIRST_ORDERED_NODE_TYPE + Ci.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE ).singleNodeValue; items[aID] = item; if (this.getTreePref('show.'+aID)) @@ -3667,7 +3667,7 @@ TreeStyleTabBrowser.prototype = { 'descendant::xul:menuseparator[starts-with(@id, "'+this.kMENUITEM_COLLAPSEEXPAND_SEPARATOR+'")]', aEvent.currentTarget, - XPathResult.FIRST_ORDERED_NODE_TYPE + Ci.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE ).singleNodeValue; let collapseItem = items[this.kMENUITEM_COLLAPSE]; let expanndItem = items[this.kMENUITEM_EXPAND]; @@ -3737,7 +3737,7 @@ TreeStyleTabBrowser.prototype = { sep = this.evaluateXPath( 'descendant::xul:menuseparator[starts-with(@id, "'+this.kMENUITEM_AUTOHIDE_SEPARATOR+'")]', aEvent.currentTarget, - XPathResult.FIRST_ORDERED_NODE_TYPE + Ci.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE ).singleNodeValue; if (autohide.getAttribute('hidden') != 'true' || fixed.getAttribute('hidden') != 'true') { @@ -4836,7 +4836,7 @@ TreeStyleTabBrowser.prototype = { self.evaluateXPath( 'child::xul:tab[@'+self.kCOLLAPSING_PHASE+'="'+self.kCOLLAPSING_PHASE_TO_BE_EXPANDED+'"]', self.mTabBrowser.mTabContainer, - XPathResult.BOOLEAN_TYPE + Ci.nsIDOMXPathResult.BOOLEAN_TYPE ).booleanValue ) self.smoothScrollTo(aEndX, aEndY, parseInt(aDuration * 0.5));