From 017e6a2601660f46925b16d4ff3c14d1916e3f0f Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Thu, 19 Apr 2012 20:06:34 -0700 Subject: [PATCH] Back out dd82458147fd (bug 714861) for mochitest-3 failures and Linux mochitest-chrome leaks --- b2g/app/b2g.js | 3 +- content/base/src/nsFrameLoader.cpp | 91 ++++++---------------- content/base/src/nsFrameLoader.h | 6 -- content/events/src/nsEventStateManager.cpp | 32 ++------ dom/ipc/ContentChild.cpp | 4 +- dom/ipc/ContentChild.h | 4 +- dom/ipc/TabParent.cpp | 38 ++------- dom/ipc/TabParent.h | 2 - layout/ipc/RenderFrameParent.cpp | 4 +- 9 files changed, 44 insertions(+), 140 deletions(-) diff --git a/b2g/app/b2g.js b/b2g/app/b2g.js index acffe315b5f..eeb59563720 100644 --- a/b2g/app/b2g.js +++ b/b2g/app/b2g.js @@ -422,10 +422,9 @@ pref("browser.link.open_newwindow", 3); // 2: don't divert window.open with features pref("browser.link.open_newwindow.restriction", 0); -// Enable browser frames, but not OOP. +// Enable browser frame pref("dom.mozBrowserFramesEnabled", true); pref("dom.mozBrowserFramesWhitelist", "http://homescreen.gaiamobile.org,http://browser.gaiamobile.org"); -pref("dom.ipc.tabs.disabled", true); // Temporary permission hack for WebSMS pref("dom.sms.enabled", true); diff --git a/content/base/src/nsFrameLoader.cpp b/content/base/src/nsFrameLoader.cpp index cd788dbb3f5..b5edfe1f8dd 100644 --- a/content/base/src/nsFrameLoader.cpp +++ b/content/base/src/nsFrameLoader.cpp @@ -457,13 +457,8 @@ nsFrameLoader::ReallyStartLoadingInternal() } } - if (mRemoteBrowserShown || ShowRemoteFrame(nsIntSize(0, 0))) { - // FIXME get error codes from child - mRemoteBrowser->LoadURL(mURIToLoad); - } else { - NS_WARNING("[nsFrameLoader] ReallyStartLoadingInternal tried but couldn't show remote browser.\n"); - } - + // FIXME get error codes from child + mRemoteBrowser->LoadURL(mURIToLoad); return NS_OK; } @@ -917,18 +912,6 @@ nsFrameLoader::ShowRemoteFrame(const nsIntSize& size) // cross-process layers; need to figure out what behavior we really // want here. For now, hack. if (!mRemoteBrowserShown) { - if (!mOwnerContent || - !mOwnerContent->GetCurrentDoc()) { - return false; - } - - nsRefPtr layerManager = - nsContentUtils::LayerManagerForDocument(mOwnerContent->GetCurrentDoc()); - if (!layerManager) { - // This is just not going to work. - return false; - } - mRemoteBrowser->Show(size); mRemoteBrowserShown = true; @@ -1372,27 +1355,19 @@ nsFrameLoader::SetOwnerContent(Element* aContent) } } -bool -nsFrameLoader::OwnerIsBrowserFrame() -{ - nsCOMPtr browserFrame = do_QueryInterface(mOwnerContent); - bool isBrowser = false; - if (browserFrame) { - browserFrame->GetReallyIsBrowser(&isBrowser); - } - return isBrowser; -} - bool nsFrameLoader::ShouldUseRemoteProcess() { + // Check for *disabled* multi-process first: environment, pref + // Then check for *enabled* multi-process attribute + // Default is not-remote. + if (PR_GetEnv("MOZ_DISABLE_OOP_TABS") || Preferences::GetBool("dom.ipc.tabs.disabled", false)) { return false; } - return OwnerIsBrowserFrame() || - (bool) mOwnerContent->AttrValueIs(kNameSpaceID_None, + return (bool) mOwnerContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::Remote, nsGkAtoms::_true, eCaseMatters); @@ -1867,27 +1842,24 @@ nsFrameLoader::TryRemoteBrowser() nsCOMPtr parentAsItem(do_QueryInterface(parentAsWebNav)); - //