From d676abf0127749b5a249a23c05a7e4ea10b92216 Mon Sep 17 00:00:00 2001 From: SHIMODA Hiroshi Date: Thu, 16 Jun 2011 11:53:52 +0900 Subject: [PATCH] update for Firefox 7 --- content/treestyletab/windowHelper.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/treestyletab/windowHelper.js b/content/treestyletab/windowHelper.js index b12826bf..7e8909b9 100644 --- a/content/treestyletab/windowHelper.js +++ b/content/treestyletab/windowHelper.js @@ -430,8 +430,9 @@ var TreeStyleTabWindowHelper = { tabbar.addEventListener('click', this.service, true); var newTabButton = document.getElementById('new-tab-button'); + const nsIDOMNode = Ci.nsIDOM3Node || Ci.nsIDOMNode; // on Firefox 7, nsIDOM3Node was merged to nsIDOMNode. if (newTabButton && - !(tabbar.compareDocumentPosition(newTabButton) & Ci.nsIDOM3Node.DOCUMENT_POSITION_CONTAINED_BY)) + !(tabbar.compareDocumentPosition(newTabButton) & nsIDOMNode.DOCUMENT_POSITION_CONTAINED_BY)) newTabButton.parentNode.addEventListener('click', this.service, true); // for Firefox 4.0 or later @@ -453,8 +454,9 @@ var TreeStyleTabWindowHelper = { tabbar.removeEventListener('click', this.service, true); var newTabButton = document.getElementById('new-tab-button'); + const nsIDOMNode = Ci.nsIDOM3Node || Ci.nsIDOMNode; // on Firefox 7, nsIDOM3Node was merged to nsIDOMNode. if (newTabButton && - !(tabbar.compareDocumentPosition(newTabButton) & Ci.nsIDOM3Node.DOCUMENT_POSITION_CONTAINED_BY)) + !(tabbar.compareDocumentPosition(newTabButton) & Ci.nsIDOMNode.DOCUMENT_POSITION_CONTAINED_BY)) newTabButton.parentNode.removeEventListener('click', this.service, true); // Firefox 4.0 or later (restore original position)