mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changesets a7fc463961ce and 65061e971eb8 (bug 935793) for breaking Travis testing (bug 950441).
This commit is contained in:
parent
2ef1ad3911
commit
00161f8da9
@ -118,8 +118,8 @@ this.AccessFu = {
|
||||
Output.start();
|
||||
TouchAdapter.start();
|
||||
|
||||
Services.obs.addObserver(this, 'remote-browser-shown', false);
|
||||
Services.obs.addObserver(this, 'inprocess-browser-shown', false);
|
||||
Services.obs.addObserver(this, 'remote-browser-frame-shown', false);
|
||||
Services.obs.addObserver(this, 'in-process-browser-or-app-frame-shown', false);
|
||||
Services.obs.addObserver(this, 'Accessibility:NextObject', false);
|
||||
Services.obs.addObserver(this, 'Accessibility:PreviousObject', false);
|
||||
Services.obs.addObserver(this, 'Accessibility:Focus', false);
|
||||
@ -162,8 +162,8 @@ this.AccessFu = {
|
||||
Utils.win.removeEventListener('TabClose', this);
|
||||
Utils.win.removeEventListener('TabSelect', this);
|
||||
|
||||
Services.obs.removeObserver(this, 'remote-browser-shown');
|
||||
Services.obs.removeObserver(this, 'inprocess-browser-shown');
|
||||
Services.obs.removeObserver(this, 'remote-browser-frame-shown');
|
||||
Services.obs.removeObserver(this, 'in-process-browser-or-app-frame-shown');
|
||||
Services.obs.removeObserver(this, 'Accessibility:NextObject');
|
||||
Services.obs.removeObserver(this, 'Accessibility:PreviousObject');
|
||||
Services.obs.removeObserver(this, 'Accessibility:Focus');
|
||||
@ -304,15 +304,11 @@ this.AccessFu = {
|
||||
case 'Accessibility:MoveByGranularity':
|
||||
this.Input.moveByGranularity(JSON.parse(aData));
|
||||
break;
|
||||
case 'remote-browser-shown':
|
||||
case 'inprocess-browser-shown':
|
||||
case 'remote-browser-frame-shown':
|
||||
case 'in-process-browser-or-app-frame-shown':
|
||||
{
|
||||
// Ignore notifications that aren't from a BrowserOrApp
|
||||
let frameLoader = aSubject.QueryInterface(Ci.nsIFrameLoader);
|
||||
if (!frameLoader.ownerIsBrowserOrAppFrame) {
|
||||
return;
|
||||
}
|
||||
this._handleMessageManager(frameLoader.messageManager);
|
||||
let mm = aSubject.QueryInterface(Ci.nsIFrameLoader).messageManager;
|
||||
this._handleMessageManager(mm);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -150,16 +150,12 @@ let ErrorPage = {
|
||||
},
|
||||
|
||||
init: function errorPageInit() {
|
||||
Services.obs.addObserver(this, 'inprocess-browser-shown', false);
|
||||
Services.obs.addObserver(this, 'remote-browser-shown', false);
|
||||
Services.obs.addObserver(this, 'in-process-browser-or-app-frame-shown', false);
|
||||
Services.obs.addObserver(this, 'remote-browser-frame-shown', false);
|
||||
},
|
||||
|
||||
observe: function errorPageObserve(aSubject, aTopic, aData) {
|
||||
let frameLoader = aSubject.QueryInterface(Ci.nsIFrameLoader);
|
||||
// Ignore notifications that aren't from a BrowserOrApp
|
||||
if (!frameLoader.ownerIsBrowserOrAppFrame) {
|
||||
return;
|
||||
}
|
||||
let mm = frameLoader.messageManager;
|
||||
|
||||
// This won't happen from dom/ipc/preload.js in non-OOP builds.
|
||||
|
@ -111,7 +111,7 @@ interface nsIContentViewManager : nsISupports
|
||||
readonly attribute nsIContentView rootContentView;
|
||||
};
|
||||
|
||||
[scriptable, builtinclass, uuid(a723673b-a26e-4cc6-ae23-ec70df9d97c9)]
|
||||
[scriptable, builtinclass, uuid(5b9949dc-56f1-47b6-b6d2-3785bb90ed6d)]
|
||||
interface nsIFrameLoader : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -272,11 +272,6 @@ interface nsIFrameLoader : nsISupports
|
||||
* have a notion of visibility in the parent process when frames are OOP.
|
||||
*/
|
||||
[infallible] attribute boolean visible;
|
||||
|
||||
/**
|
||||
* Find out whether the owner content really is a browser or app frame
|
||||
*/
|
||||
readonly attribute boolean ownerIsBrowserOrAppFrame;
|
||||
};
|
||||
|
||||
%{C++
|
||||
|
@ -948,9 +948,9 @@ nsFrameLoader::ShowRemoteFrame(const nsIntSize& size,
|
||||
EnsureMessageManager();
|
||||
|
||||
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
|
||||
if (os && !mRemoteBrowserInitialized) {
|
||||
if (OwnerIsBrowserOrAppFrame() && os && !mRemoteBrowserInitialized) {
|
||||
os->NotifyObservers(NS_ISUPPORTS_CAST(nsIFrameLoader*, this),
|
||||
"remote-browser-shown", nullptr);
|
||||
"remote-browser-frame-shown", nullptr);
|
||||
mRemoteBrowserInitialized = true;
|
||||
}
|
||||
} else {
|
||||
@ -1409,14 +1409,6 @@ nsFrameLoader::OwnerIsBrowserOrAppFrame()
|
||||
return browserFrame ? browserFrame->GetReallyIsBrowserOrApp() : false;
|
||||
}
|
||||
|
||||
// The xpcom getter version
|
||||
NS_IMETHODIMP
|
||||
nsFrameLoader::GetOwnerIsBrowserOrAppFrame(bool* aResult)
|
||||
{
|
||||
*aResult = OwnerIsBrowserOrAppFrame();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
nsFrameLoader::OwnerIsAppFrame()
|
||||
{
|
||||
@ -1685,16 +1677,18 @@ nsFrameLoader::MaybeCreateDocShell()
|
||||
mDocShell->SetIsBrowserInsideApp(containingAppId);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
|
||||
if (os) {
|
||||
os->NotifyObservers(NS_ISUPPORTS_CAST(nsIFrameLoader*, this),
|
||||
"inprocess-browser-shown", nullptr);
|
||||
}
|
||||
if (OwnerIsBrowserOrAppFrame()) {
|
||||
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
|
||||
if (os) {
|
||||
os->NotifyObservers(NS_ISUPPORTS_CAST(nsIFrameLoader*, this),
|
||||
"in-process-browser-or-app-frame-shown", nullptr);
|
||||
}
|
||||
|
||||
if (OwnerIsBrowserOrAppFrame() && mMessageManager) {
|
||||
mMessageManager->LoadFrameScript(
|
||||
NS_LITERAL_STRING("chrome://global/content/BrowserElementChild.js"),
|
||||
/* allowDelayedLoad = */ true);
|
||||
if (mMessageManager) {
|
||||
mMessageManager->LoadFrameScript(
|
||||
NS_LITERAL_STRING("chrome://global/content/BrowserElementChild.js"),
|
||||
/* allowDelayedLoad = */ true);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -65,8 +65,8 @@ BrowserElementParentFactory.prototype = {
|
||||
// alive for as long as its frame element lives.
|
||||
this._bepMap = new WeakMap();
|
||||
|
||||
Services.obs.addObserver(this, 'remote-browser-shown', /* ownsWeak = */ true);
|
||||
Services.obs.addObserver(this, 'inprocess-browser-shown', /* ownsWeak = */ true);
|
||||
Services.obs.addObserver(this, 'remote-browser-frame-shown', /* ownsWeak = */ true);
|
||||
Services.obs.addObserver(this, 'in-process-browser-or-app-frame-shown', /* ownsWeak = */ true);
|
||||
},
|
||||
|
||||
_browserFramesPrefEnabled: function() {
|
||||
@ -79,19 +79,11 @@ BrowserElementParentFactory.prototype = {
|
||||
},
|
||||
|
||||
_observeInProcessBrowserFrameShown: function(frameLoader) {
|
||||
// Ignore notifications that aren't from a BrowserOrApp
|
||||
if (!frameLoader.QueryInterface(Ci.nsIFrameLoader).ownerIsBrowserOrAppFrame) {
|
||||
return;
|
||||
}
|
||||
debug("In-process browser frame shown " + frameLoader);
|
||||
this._createBrowserElementParent(frameLoader, /* hasRemoteFrame = */ false);
|
||||
},
|
||||
|
||||
_observeRemoteBrowserFrameShown: function(frameLoader) {
|
||||
// Ignore notifications that aren't from a BrowserOrApp
|
||||
if (!frameLoader.QueryInterface(Ci.nsIFrameLoader).ownerIsBrowserOrAppFrame) {
|
||||
return;
|
||||
}
|
||||
debug("Remote browser frame shown " + frameLoader);
|
||||
this._createBrowserElementParent(frameLoader, /* hasRemoteFrame = */ true);
|
||||
},
|
||||
@ -111,10 +103,10 @@ BrowserElementParentFactory.prototype = {
|
||||
this._init();
|
||||
}
|
||||
break;
|
||||
case 'remote-browser-shown':
|
||||
case 'remote-browser-frame-shown':
|
||||
this._observeRemoteBrowserFrameShown(subject);
|
||||
break;
|
||||
case 'inprocess-browser-shown':
|
||||
case 'in-process-browser-or-app-frame-shown':
|
||||
this._observeInProcessBrowserFrameShown(subject);
|
||||
break;
|
||||
case 'content-document-global-created':
|
||||
|
@ -44,8 +44,8 @@ this.Keyboard = {
|
||||
},
|
||||
|
||||
init: function keyboardInit() {
|
||||
Services.obs.addObserver(this, 'inprocess-browser-shown', false);
|
||||
Services.obs.addObserver(this, 'remote-browser-shown', false);
|
||||
Services.obs.addObserver(this, 'in-process-browser-or-app-frame-shown', false);
|
||||
Services.obs.addObserver(this, 'remote-browser-frame-shown', false);
|
||||
Services.obs.addObserver(this, 'oop-frameloader-crashed', false);
|
||||
|
||||
for (let name of this._messageNames)
|
||||
@ -63,10 +63,6 @@ this.Keyboard = {
|
||||
ppmm.broadcastAsyncMessage('Keyboard:FocusChange', { 'type': 'blur' });
|
||||
}
|
||||
} else {
|
||||
// Ignore notifications that aren't from a BrowserOrApp
|
||||
if (!frameLoader.ownerIsBrowserOrAppFrame) {
|
||||
return;
|
||||
}
|
||||
this.initFormsFrameScript(mm);
|
||||
}
|
||||
},
|
||||
|
@ -602,7 +602,7 @@ ParticularProcessPriorityManager::Init()
|
||||
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
|
||||
if (os) {
|
||||
os->AddObserver(this, "audio-channel-process-changed", /* ownsWeak */ true);
|
||||
os->AddObserver(this, "remote-browser-shown", /* ownsWeak */ true);
|
||||
os->AddObserver(this, "remote-browser-frame-shown", /* ownsWeak */ true);
|
||||
os->AddObserver(this, "ipc:browser-destroyed", /* ownsWeak */ true);
|
||||
os->AddObserver(this, "frameloader-visible-changed", /* ownsWeak */ true);
|
||||
}
|
||||
@ -674,7 +674,7 @@ ParticularProcessPriorityManager::Observe(nsISupports* aSubject,
|
||||
|
||||
if (topic.EqualsLiteral("audio-channel-process-changed")) {
|
||||
OnAudioChannelProcessChanged(aSubject);
|
||||
} else if (topic.EqualsLiteral("remote-browser-shown")) {
|
||||
} else if (topic.EqualsLiteral("remote-browser-frame-shown")) {
|
||||
OnRemoteBrowserFrameShown(aSubject);
|
||||
} else if (topic.EqualsLiteral("ipc:browser-destroyed")) {
|
||||
OnTabParentDestroyed(aSubject);
|
||||
@ -747,13 +747,6 @@ ParticularProcessPriorityManager::OnRemoteBrowserFrameShown(nsISupports* aSubjec
|
||||
nsCOMPtr<nsIFrameLoader> fl = do_QueryInterface(aSubject);
|
||||
NS_ENSURE_TRUE_VOID(fl);
|
||||
|
||||
// Ignore notifications that aren't from a BrowserOrApp
|
||||
bool isBrowserOrApp;
|
||||
fl->GetOwnerIsBrowserOrAppFrame(&isBrowserOrApp);
|
||||
if (!isBrowserOrApp) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsITabParent> tp;
|
||||
fl->GetTabParent(getter_AddRefs(tp));
|
||||
NS_ENSURE_TRUE_VOID(tp);
|
||||
|
Loading…
Reference in New Issue
Block a user