mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Backed out changeset 77f53f9d3099 (bug 935784) on suspicion of causing shutdown hangs on OS X
This commit is contained in:
parent
7de91970da
commit
db7e2dea98
@ -10,22 +10,6 @@ Cu.import("resource://gre/modules/Services.jsm");
|
|||||||
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
|
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
|
||||||
Cu.import("resource://gre/modules/RemoteAddonsChild.jsm");
|
Cu.import("resource://gre/modules/RemoteAddonsChild.jsm");
|
||||||
|
|
||||||
let SyncHandler = {
|
|
||||||
init: function() {
|
|
||||||
sendAsyncMessage("SetSyncHandler", {}, {handler: this});
|
|
||||||
},
|
|
||||||
|
|
||||||
getFocusedElementAndWindow: function() {
|
|
||||||
let fm = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager);
|
|
||||||
|
|
||||||
let focusedWindow = {};
|
|
||||||
let elt = fm.getFocusedElementForWindow(content, true, focusedWindow);
|
|
||||||
return [elt, focusedWindow.value];
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
SyncHandler.init();
|
|
||||||
|
|
||||||
let WebProgressListener = {
|
let WebProgressListener = {
|
||||||
init: function() {
|
init: function() {
|
||||||
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
@ -49,8 +33,10 @@ let WebProgressListener = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_setupObjects: function setupObjects(aWebProgress) {
|
_setupObjects: function setupObjects(aWebProgress) {
|
||||||
|
let win = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
|
.getInterface(Ci.nsIDOMWindow);
|
||||||
return {
|
return {
|
||||||
contentWindow: content,
|
contentWindow: win,
|
||||||
// DOMWindow is not necessarily the content-window with subframes.
|
// DOMWindow is not necessarily the content-window with subframes.
|
||||||
DOMWindow: aWebProgress.DOMWindow
|
DOMWindow: aWebProgress.DOMWindow
|
||||||
};
|
};
|
||||||
|
@ -679,15 +679,11 @@
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
let elt = document.commandDispatcher.focusedElement;
|
let elt = document.commandDispatcher.focusedElement;
|
||||||
let win = document.commandDispatcher.focusedWindow;
|
|
||||||
|
|
||||||
// Temporary fix for e10s.
|
// Temporary fix for e10s.
|
||||||
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
if (elt instanceof XULElement && elt.tagName == "xul:browser" &&
|
||||||
if (elt instanceof XULElement &&
|
|
||||||
elt.localName == "browser" &&
|
|
||||||
elt.namespaceURI == XUL_NS &&
|
|
||||||
elt.getAttribute("remote")) {
|
elt.getAttribute("remote")) {
|
||||||
[elt, win] = elt.syncHandler.getFocusedElementAndWindow();
|
elt = elt.contentDocument.activeElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elt) {
|
if (elt) {
|
||||||
@ -701,6 +697,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let win = document.commandDispatcher.focusedWindow;
|
||||||
if (win && !this._mimeTypeIsTextBased(win.document.contentType))
|
if (win && !this._mimeTypeIsTextBased(win.document.contentType))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -107,12 +107,6 @@
|
|||||||
onget="return this.contentWindow ? this.contentWindow.document : null"
|
onget="return this.contentWindow ? this.contentWindow.document : null"
|
||||||
readonly="true"/>
|
readonly="true"/>
|
||||||
|
|
||||||
<field name="_syncHandler">null</field>
|
|
||||||
|
|
||||||
<property name="syncHandler"
|
|
||||||
onget="return this._syncHandler"
|
|
||||||
readonly="true"/>
|
|
||||||
|
|
||||||
<field name="_imageDocument">null</field>
|
<field name="_imageDocument">null</field>
|
||||||
|
|
||||||
<property name="imageDocument"
|
<property name="imageDocument"
|
||||||
@ -127,7 +121,6 @@
|
|||||||
|
|
||||||
this.messageManager.addMessageListener("DOMTitleChanged", this);
|
this.messageManager.addMessageListener("DOMTitleChanged", this);
|
||||||
this.messageManager.addMessageListener("ImageDocumentLoaded", this);
|
this.messageManager.addMessageListener("ImageDocumentLoaded", this);
|
||||||
this.messageManager.addMessageListener("SetSyncHandler", this);
|
|
||||||
this.messageManager.loadFrameScript("chrome://global/content/browser-child.js", true);
|
this.messageManager.loadFrameScript("chrome://global/content/browser-child.js", true);
|
||||||
|
|
||||||
if (this.hasAttribute("selectpopup")) {
|
if (this.hasAttribute("selectpopup")) {
|
||||||
@ -166,10 +159,6 @@
|
|||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "SetSyncHandler":
|
|
||||||
this._syncHandler = aMessage.objects.handler;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "Forms:ShowDropDown": {
|
case "Forms:ShowDropDown": {
|
||||||
Cu.import("resource://gre/modules/SelectParentHelper.jsm");
|
Cu.import("resource://gre/modules/SelectParentHelper.jsm");
|
||||||
let dropdown = document.getElementById(this.getAttribute("selectpopup"));
|
let dropdown = document.getElementById(this.getAttribute("selectpopup"));
|
||||||
|
Loading…
Reference in New Issue
Block a user