mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 781320 - Part 1: Sync iframe name down from parent to child in <iframe mozbrowser>. r=smaug
This commit is contained in:
parent
0c3ea3ef65
commit
37bc18bddb
@ -70,6 +70,10 @@ BrowserElementChild.prototype = {
|
||||
debug("Starting up.");
|
||||
sendAsyncMsg("hello");
|
||||
|
||||
// Set the docshell's name according to our <iframe>'s name attribute.
|
||||
docShell.QueryInterface(Ci.nsIDocShellTreeItem).name =
|
||||
sendSyncMsg('get-name')[0];
|
||||
|
||||
BrowserElementPromptService.mapWindowToBrowserElementChild(content, this);
|
||||
|
||||
docShell.QueryInterface(Ci.nsIWebProgress)
|
||||
|
@ -157,6 +157,7 @@ function BrowserElementParent(frameLoader, hasRemoteFrame) {
|
||||
}
|
||||
|
||||
addMessageListener("hello", this._recvHello);
|
||||
addMessageListener("get-name", this._recvGetName);
|
||||
addMessageListener("contextmenu", this._fireCtxMenuEvent);
|
||||
addMessageListener("locationchange", this._fireEventFromMsg);
|
||||
addMessageListener("loadstart", this._fireEventFromMsg);
|
||||
@ -261,6 +262,10 @@ BrowserElementParent.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
_recvGetName: function(data) {
|
||||
return this._frameElement.getAttribute('name');
|
||||
},
|
||||
|
||||
_fireCtxMenuEvent: function(data) {
|
||||
let evtName = data.name.substring('browser-element-api:'.length);
|
||||
let detail = data.json;
|
||||
|
Loading…
Reference in New Issue
Block a user