Bug 662500. Drop support for pref that forces OOP tabs. r=bsmedberg

This commit is contained in:
Felipe Gomes 2011-06-07 12:23:15 -07:00
parent 0b8f8e4aff
commit 091d656e1b
3 changed files with 10 additions and 28 deletions

View File

@ -1340,36 +1340,19 @@ nsFrameLoader::SetOwnerContent(nsIContent* aContent)
bool
nsFrameLoader::ShouldUseRemoteProcess()
{
// Check for *disabled* multi-process first: environment, prefs, attribute
// Then check for *enabled* multi-process pref: attribute, prefs
// 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")) {
if (PR_GetEnv("MOZ_DISABLE_OOP_TABS") ||
Preferences::GetBool("dom.ipc.tabs.disabled", PR_FALSE)) {
return false;
}
PRBool remoteDisabled =
Preferences::GetBool("dom.ipc.tabs.disabled", PR_FALSE);
if (remoteDisabled) {
return false;
}
static nsIAtom* const *const remoteValues[] = {
&nsGkAtoms::_false,
&nsGkAtoms::_true,
nsnull
};
switch (mOwnerContent->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::Remote,
remoteValues, eCaseMatters)) {
case 0:
return false;
case 1:
return true;
}
PRBool remoteEnabled = Preferences::GetBool("dom.ipc.tabs.enabled", PR_FALSE);
return (bool) remoteEnabled;
return (bool) mOwnerContent->AttrValueIs(kNameSpaceID_None,
nsGkAtoms::Remote,
nsGkAtoms::_true,
eCaseMatters);
}
nsresult

View File

@ -460,8 +460,8 @@ function getVisibleRect() {
<box>
<html:div style="position: relative; overflow: hidden; max-width: 0px; max-height: 0px; visibility: hidden;">
<html:div id="browsers" style="position: absolute;">
<!-- <browser id="googlenews" src="http://www.webhamster.com/" type="content" style="width: 1024px; height: 614px"/> -->
<iframe id="googlenews" src="http://news.google.com/" type="content" style="width: 1024px; height: 614px"/>
<!-- <browser id="googlenews" src="http://www.webhamster.com/" type="content" remote="true" style="width: 1024px; height: 614px"/> -->
<iframe id="googlenews" src="http://news.google.com/" type="content" remote="true" style="width: 1024px; height: 614px"/>
</html:div>
</html:div>
</box>

View File

@ -2,4 +2,3 @@ pref("toolkit.defaultChromeURI", "chrome://tile/content/foo.xul");
pref("javascript.options.tracejit.chrome", true);
pref("javascript.options.tracejit.content", false);
pref("browser.dom.window.dump.enabled", true);
pref("dom.ipc.tabs.enabled", true);