зеркало из https://github.com/mozilla/gecko-dev.git
Bug 897194: Use outer window ID to match toolbox to tab rather than assuming the currently-selected tab. r=bgrins
This commit is contained in:
Родитель
c09c677beb
Коммит
960780453b
|
@ -306,7 +306,20 @@ TabTarget.prototype = {
|
|||
this._client.connect((aType, aTraits) => {
|
||||
this._client.listTabs(aResponse => {
|
||||
this._root = aResponse;
|
||||
this._form = aResponse.tabs[aResponse.selected];
|
||||
|
||||
let windowUtils = this.window
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils);
|
||||
let outerWindow = windowUtils.outerWindowID;
|
||||
aResponse.tabs.some((tab) => {
|
||||
if (tab.outerWindowID === outerWindow) {
|
||||
this._form = tab;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (!this._form) {
|
||||
this._form = aResponse.tabs[aResponse.selected];
|
||||
}
|
||||
attachTab();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -583,10 +583,15 @@ BrowserTabActor.prototype = {
|
|||
dbg_assert(this.actorID,
|
||||
"tab should have an actorID.");
|
||||
|
||||
let windowUtils = this.window
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils);
|
||||
|
||||
let response = {
|
||||
actor: this.actorID,
|
||||
title: this.title,
|
||||
url: this.url
|
||||
url: this.url,
|
||||
outerWindowID: windowUtils.outerWindowID
|
||||
};
|
||||
|
||||
// Walk over tab actors added by extensions and add them to a new ActorPool.
|
||||
|
|
Загрузка…
Ссылка в новой задаче