mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 12:37:37 +00:00
merge m-c to fx-team
This commit is contained in:
commit
9fe19cfeb5
@ -72,12 +72,15 @@ var gPluginHandler = {
|
|||||||
if (aName == "Shockwave Flash")
|
if (aName == "Shockwave Flash")
|
||||||
return "Adobe Flash";
|
return "Adobe Flash";
|
||||||
|
|
||||||
// Clean up the plugin name by stripping off any trailing version numbers
|
// Clean up the plugin name by stripping off parenthetical clauses,
|
||||||
// or "plugin". EG, "Foo Bar Plugin 1.23_02" --> "Foo Bar"
|
// trailing version numbers or "plugin".
|
||||||
|
// EG, "Foo Bar (Linux) Plugin 1.23_02" --> "Foo Bar"
|
||||||
// Do this by first stripping the numbers, etc. off the end, and then
|
// Do this by first stripping the numbers, etc. off the end, and then
|
||||||
// removing "Plugin" (and then trimming to get rid of any whitespace).
|
// removing "Plugin" (and then trimming to get rid of any whitespace).
|
||||||
// (Otherwise, something like "Java(TM) Plug-in 1.7.0_07" gets mangled)
|
// (Otherwise, something like "Java(TM) Plug-in 1.7.0_07" gets mangled)
|
||||||
let newName = aName.replace(/[\s\d\.\-\_\(\)]+$/, "").replace(/\bplug-?in\b/i, "").trim();
|
let newName = aName.replace(/\(.*?\)/g, "").
|
||||||
|
replace(/[\s\d\.\-\_\(\)]+$/, "").
|
||||||
|
replace(/\bplug-?in\b/i, "").trim();
|
||||||
return newName;
|
return newName;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3243,10 +3243,22 @@ function OpenBrowserWindow(options)
|
|||||||
doc != document &&
|
doc != document &&
|
||||||
doc.defaultView == win) {
|
doc.defaultView == win) {
|
||||||
Services.obs.removeObserver(newDocumentShown, "document-shown");
|
Services.obs.removeObserver(newDocumentShown, "document-shown");
|
||||||
|
Services.obs.removeObserver(windowClosed, "domwindowclosed");
|
||||||
TelemetryStopwatch.finish("FX_NEW_WINDOW_MS", telemetryObj);
|
TelemetryStopwatch.finish("FX_NEW_WINDOW_MS", telemetryObj);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
function windowClosed(subject) {
|
||||||
|
if (subject == win) {
|
||||||
|
Services.obs.removeObserver(newDocumentShown, "document-shown");
|
||||||
|
Services.obs.removeObserver(windowClosed, "domwindowclosed");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure to remove the 'document-shown' observer in case the window
|
||||||
|
// is being closed right after it was opened to avoid leaking.
|
||||||
Services.obs.addObserver(newDocumentShown, "document-shown", false);
|
Services.obs.addObserver(newDocumentShown, "document-shown", false);
|
||||||
|
Services.obs.addObserver(windowClosed, "domwindowclosed", false);
|
||||||
|
|
||||||
var charsetArg = new String();
|
var charsetArg = new String();
|
||||||
var handler = Components.classes["@mozilla.org/browser/clh;1"]
|
var handler = Components.classes["@mozilla.org/browser/clh;1"]
|
||||||
|
@ -95,5 +95,6 @@ function part8() {
|
|||||||
ok(objLoadingContent.activated, "plugin should be activated now");
|
ok(objLoadingContent.activated, "plugin should be activated now");
|
||||||
|
|
||||||
gNewWindow.close();
|
gNewWindow.close();
|
||||||
|
gNewWindow = null;
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,14 @@ function finishTest() {
|
|||||||
gPermissionManager.remove("127.0.0.1:8888", gSecondTestPermissionString);
|
gPermissionManager.remove("127.0.0.1:8888", gSecondTestPermissionString);
|
||||||
Services.prefs.clearUserPref("plugins.click_to_play");
|
Services.prefs.clearUserPref("plugins.click_to_play");
|
||||||
gBrowser.removeCurrentTab();
|
gBrowser.removeCurrentTab();
|
||||||
finish();
|
|
||||||
|
gPageInfo = null;
|
||||||
|
gNextTest = null;
|
||||||
|
gTestBrowser = null;
|
||||||
|
gPluginHost = null;
|
||||||
|
gPermissionManager = null;
|
||||||
|
|
||||||
|
executeSoon(finish);
|
||||||
}
|
}
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
function test() {
|
function test() {
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
var privateWin = OpenBrowserWindow({private: true});
|
var privateWin = OpenBrowserWindow({private: true});
|
||||||
privateWin.addEventListener("load", function onload() {
|
|
||||||
privateWin.removeEventListener("load", onload, false);
|
|
||||||
ok(true, "Load listener called");
|
|
||||||
|
|
||||||
|
whenDelayedStartupFinished(privateWin, function () {
|
||||||
privateWin.BrowserOpenTab();
|
privateWin.BrowserOpenTab();
|
||||||
privateWin.BrowserTryToCloseWindow();
|
privateWin.BrowserTryToCloseWindow();
|
||||||
ok(true, "didn't prompt");
|
ok(true, "didn't prompt");
|
||||||
finish();
|
|
||||||
}, false);
|
executeSoon(finish);
|
||||||
|
});
|
||||||
}
|
}
|
@ -1287,15 +1287,47 @@ BrowserGlue.prototype = {
|
|||||||
_migrateUI: function BG__migrateUI() {
|
_migrateUI: function BG__migrateUI() {
|
||||||
const UI_VERSION = 14;
|
const UI_VERSION = 14;
|
||||||
const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
|
const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
|
||||||
|
|
||||||
|
let wasCustomizedAndOnAustralis = Services.prefs.prefHasUserValue("browser.uiCustomization.state");
|
||||||
let currentUIVersion = 0;
|
let currentUIVersion = 0;
|
||||||
try {
|
try {
|
||||||
currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
|
currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
|
||||||
} catch(ex) {}
|
} catch(ex) {}
|
||||||
if (currentUIVersion >= UI_VERSION)
|
if (!wasCustomizedAndOnAustralis && currentUIVersion >= UI_VERSION)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._rdf = Cc["@mozilla.org/rdf/rdf-service;1"].getService(Ci.nsIRDFService);
|
this._rdf = Cc["@mozilla.org/rdf/rdf-service;1"].getService(Ci.nsIRDFService);
|
||||||
this._dataSource = this._rdf.GetDataSource("rdf:local-store");
|
this._dataSource = this._rdf.GetDataSource("rdf:local-store");
|
||||||
|
|
||||||
|
// No version check for this as this code should run until we have Australis everywhere:
|
||||||
|
if (wasCustomizedAndOnAustralis) {
|
||||||
|
// This profile's been on australis! If it's missing the back/fwd button
|
||||||
|
// or go/stop/reload button, then put them back:
|
||||||
|
let currentsetResource = this._rdf.GetResource("currentset");
|
||||||
|
let toolbarResource = this._rdf.GetResource(BROWSER_DOCURL + "nav-bar");
|
||||||
|
let currentset = this._getPersist(toolbarResource, currentsetResource);
|
||||||
|
if (currentset.indexOf("unified-back-forward-button") == -1) {
|
||||||
|
currentset = currentset.replace("urlbar-container",
|
||||||
|
"unified-back-forward-button,urlbar-container");
|
||||||
|
}
|
||||||
|
if (currentset.indexOf("reload-button") == -1) {
|
||||||
|
currentset = currentset.replace("urlbar-container", "urlbar-container,reload-button");
|
||||||
|
}
|
||||||
|
if (currentset.indexOf("stop-button") == -1) {
|
||||||
|
currentset = currentset.replace("reload-button", "reload-button,stop-button");
|
||||||
|
}
|
||||||
|
this._setPersist(toolbarResource, currentsetResource, currentset);
|
||||||
|
Services.prefs.clearUserPref("browser.uiCustomization.state");
|
||||||
|
|
||||||
|
// If we don't have anything else to do, we can bail here:
|
||||||
|
if (currentUIVersion >= UI_VERSION) {
|
||||||
|
delete this._rdf;
|
||||||
|
delete this._dataSource;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this._dirty = false;
|
this._dirty = false;
|
||||||
|
|
||||||
if (currentUIVersion < 2) {
|
if (currentUIVersion < 2) {
|
||||||
|
Loading…
Reference in New Issue
Block a user