on Minefield, tabs opened from links didn't become children of the current tab. this is caused by XRayWrapper...

This commit is contained in:
SHIMODA Hiroshi 2010-11-12 10:42:06 +09:00
parent 387016339d
commit a00e64c4fc

View File

@ -852,14 +852,11 @@ var TreeStyleTabUtils = {
getTabFromFrame : function TSTUtils_getTabFromFrame(aFrame, aTabBrowser) getTabFromFrame : function TSTUtils_getTabFromFrame(aFrame, aTabBrowser)
{ {
var b = aTabBrowser || this.browser; var b = aTabBrowser || this.browser;
var docShell = aFrame.top var top = aFrame.top;
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShell);
var tabs = this.getAllTabsArray(b); var tabs = this.getAllTabsArray(b);
for each (var tab in tabs) for each (var tab in tabs)
{ {
if (tab.linkedBrowser.docShell == docShell) if (tab.linkedBrowser.contentWindow == top)
return tab; return tab;
} }
return null; return null;