From 3b692b4de47526a27771a638cd32b17c98a57826 Mon Sep 17 00:00:00 2001 From: Piro / YUKI Hiroshi Date: Sun, 23 Sep 2012 16:11:03 +0900 Subject: [PATCH] Reduce usecases of evaluateXPath() --- content/treestyletab/treestyletab.xul | 16 ++---- modules/browser.js | 77 ++++++++------------------- 2 files changed, 26 insertions(+), 67 deletions(-) diff --git a/content/treestyletab/treestyletab.xul b/content/treestyletab/treestyletab.xul index 83a9b7dc..8d936727 100644 --- a/content/treestyletab/treestyletab.xul +++ b/content/treestyletab/treestyletab.xul @@ -65,9 +65,7 @@ event.stopPropagation(); this.parentNode.hidePopup(); }" - multipletab-insertafter="TreeStyleTabService.evaluateXPath( - "descendant::*[starts-with(@id, 'context_reloadTab')][1]" - , tabContextMenu, XPathResult.FIRST_ORDERED_NODE_TYPE).singleNodeValue"/> + multipletab-insertafter="tabContextMenu.querySelector("*[id^='context_reloadTab']")"/> + multipletab-insertafter="tabContextMenu.querySelector("*[id^='context-item-reloadTabSubtree']")"/> + multipletab-insertafter="tabContextMenu.querySelector("*[id^='context-item-removeTabSubtree']")"/> + multipletab-insertafter="tabContextMenu.querySelector("*[id^='context_closeOtherTabs']")"/>