Remove XPath-based method to find the last descendant tab.
It seems to be too complex for "last descendant". This will solve the issue #888.
This commit is contained in:
parent
710ca20510
commit
a1a519f189
@ -2089,19 +2089,8 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
|
|||||||
if (!aTab)
|
if (!aTab)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (this.tabsHash) { // XPath-less implementation
|
|
||||||
let tabs = this.getDescendantTabs(aTab);
|
let tabs = this.getDescendantTabs(aTab);
|
||||||
return tabs.length ? tabs[tabs.length-1] : null ;
|
return tabs.length ? tabs[tabs.length-1] : null ;
|
||||||
}
|
|
||||||
|
|
||||||
var parent = aTab.getAttribute(this.kPARENT);
|
|
||||||
return this.evaluateXPath(
|
|
||||||
'following-sibling::xul:tab['+
|
|
||||||
(parent ? '@'+this.kPARENT+'="'+parent+'"' : 'not(@'+this.kPARENT+')' )+
|
|
||||||
'][1]/preceding-sibling::xul:tab[1][not(@'+this.kID+'="'+aTab.getAttribute(this.kID)+'")]',
|
|
||||||
aTab,
|
|
||||||
Ci.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE
|
|
||||||
).singleNodeValue;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
collectRootTabs : function TSTBase_collectRootTabs(aTabs) /* PUBLIC API */
|
collectRootTabs : function TSTBase_collectRootTabs(aTabs) /* PUBLIC API */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user