summaryrefslogtreecommitdiffstats
path: root/browser/components
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components')
-rw-r--r--browser/components/about/AboutRedirector.cpp124
-rw-r--r--browser/components/build/nsModule.cpp1
-rw-r--r--browser/components/moz.build5
-rw-r--r--browser/components/nsBrowserContentHandler.js2
-rw-r--r--browser/components/nsBrowserGlue.js13
-rw-r--r--browser/components/places/content/editBookmarkOverlay.js72
-rw-r--r--browser/components/preferences/in-content/advanced.js3
-rw-r--r--browser/components/preferences/in-content/advanced.xul23
8 files changed, 136 insertions, 107 deletions
diff --git a/browser/components/about/AboutRedirector.cpp b/browser/components/about/AboutRedirector.cpp
index a09932d95..717ae9c48 100644
--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -35,75 +35,117 @@ struct RedirEntry {
URI_SAFE_FOR_UNTRUSTED_CONTENT.
*/
static RedirEntry kRedirMap[] = {
- { "blocked", "chrome://browser/content/blockedSite.xhtml",
+ {
+ "basilisk", "chrome://global/content/memoriam.xhtml",
+ nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
+ nsIAboutModule::HIDE_FROM_ABOUTABOUT
+ },
+ {
+ "blocked", "chrome://browser/content/blockedSite.xhtml",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::URI_CAN_LOAD_IN_CHILD |
nsIAboutModule::ALLOW_SCRIPT |
- nsIAboutModule::HIDE_FROM_ABOUTABOUT },
- { "certerror", "chrome://browser/content/aboutNetError.xhtml",
+ nsIAboutModule::HIDE_FROM_ABOUTABOUT
+ },
+ {
+ "certerror", "chrome://browser/content/aboutNetError.xhtml",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::URI_CAN_LOAD_IN_CHILD |
nsIAboutModule::ALLOW_SCRIPT |
- nsIAboutModule::HIDE_FROM_ABOUTABOUT },
- { "socialerror", "chrome://browser/content/aboutSocialError.xhtml",
+ nsIAboutModule::HIDE_FROM_ABOUTABOUT
+ },
+ {
+ "socialerror", "chrome://browser/content/aboutSocialError.xhtml",
nsIAboutModule::ALLOW_SCRIPT |
- nsIAboutModule::HIDE_FROM_ABOUTABOUT },
- { "providerdirectory", "chrome://browser/content/aboutProviderDirectory.xhtml",
+ nsIAboutModule::HIDE_FROM_ABOUTABOUT
+ },
+ {
+ "providerdirectory", "chrome://browser/content/aboutProviderDirectory.xhtml",
nsIAboutModule::ALLOW_SCRIPT |
- nsIAboutModule::HIDE_FROM_ABOUTABOUT },
- { "tabcrashed", "chrome://browser/content/aboutTabCrashed.xhtml",
+ nsIAboutModule::HIDE_FROM_ABOUTABOUT
+ },
+ {
+ "tabcrashed", "chrome://browser/content/aboutTabCrashed.xhtml",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::ALLOW_SCRIPT |
- nsIAboutModule::HIDE_FROM_ABOUTABOUT },
- { "feeds", "chrome://browser/content/feeds/subscribe.xhtml",
+ nsIAboutModule::HIDE_FROM_ABOUTABOUT
+ },
+ {
+ "feeds", "chrome://browser/content/feeds/subscribe.xhtml",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::ALLOW_SCRIPT |
- nsIAboutModule::HIDE_FROM_ABOUTABOUT },
- { "privatebrowsing", "chrome://browser/content/aboutPrivateBrowsing.xhtml",
+ nsIAboutModule::HIDE_FROM_ABOUTABOUT
+ },
+ {
+ "privatebrowsing", "chrome://browser/content/aboutPrivateBrowsing.xhtml",
nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
- nsIAboutModule::ALLOW_SCRIPT },
- { "rights",
- "chrome://global/content/aboutRights.xhtml",
+ nsIAboutModule::ALLOW_SCRIPT
+ },
+ {
+ "rights", "chrome://global/content/aboutRights.xhtml",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::MAKE_LINKABLE |
- nsIAboutModule::ALLOW_SCRIPT },
- { "robots", "chrome://browser/content/aboutRobots.xhtml",
+ nsIAboutModule::ALLOW_SCRIPT
+ },
+ {
+ "robots", "chrome://browser/content/aboutRobots.xhtml",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
- nsIAboutModule::ALLOW_SCRIPT },
- { "searchreset", "chrome://browser/content/search/searchReset.xhtml",
+ nsIAboutModule::ALLOW_SCRIPT
+ },
+ {
+ "searchreset", "chrome://browser/content/search/searchReset.xhtml",
nsIAboutModule::ALLOW_SCRIPT |
- nsIAboutModule::HIDE_FROM_ABOUTABOUT },
- { "sessionrestore", "chrome://browser/content/aboutSessionRestore.xhtml",
- nsIAboutModule::ALLOW_SCRIPT },
- { "welcomeback", "chrome://browser/content/aboutWelcomeBack.xhtml",
- nsIAboutModule::ALLOW_SCRIPT },
- { "sync-tabs", "chrome://browser/content/sync/aboutSyncTabs.xul",
- nsIAboutModule::ALLOW_SCRIPT },
- // Linkable because of indexeddb use (bug 1228118)
+ nsIAboutModule::HIDE_FROM_ABOUTABOUT
+ },
+ {
+ "sessionrestore", "chrome://browser/content/aboutSessionRestore.xhtml",
+ nsIAboutModule::ALLOW_SCRIPT
+ },
+ {
+ "welcomeback", "chrome://browser/content/aboutWelcomeBack.xhtml",
+ nsIAboutModule::ALLOW_SCRIPT
+ },
+ {
+ "sync-tabs", "chrome://browser/content/sync/aboutSyncTabs.xul",
+ nsIAboutModule::ALLOW_SCRIPT
+ },
{ "home", "chrome://browser/content/abouthome/aboutHome.xhtml",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
nsIAboutModule::ALLOW_SCRIPT |
+ // Linkable because of indexeddb use (bug 1228118)
nsIAboutModule::MAKE_LINKABLE |
nsIAboutModule::ENABLE_INDEXED_DB },
- // the newtab's actual URL will be determined when the channel is created
- { "newtab", "about:blank",
- nsIAboutModule::ALLOW_SCRIPT },
- { "preferences", "chrome://browser/content/preferences/in-content/preferences.xul",
- nsIAboutModule::ALLOW_SCRIPT },
- { "downloads", "chrome://browser/content/downloads/contentAreaDownloadsView.xul",
- nsIAboutModule::ALLOW_SCRIPT },
+ {
+ // the newtab's actual URL will be determined when the channel is created
+ "newtab", "about:blank",
+ nsIAboutModule::ALLOW_SCRIPT
+ },
+ {
+ "preferences", "chrome://browser/content/preferences/in-content/preferences.xul",
+ nsIAboutModule::ALLOW_SCRIPT
+ },
+ {
+ "downloads", "chrome://browser/content/downloads/contentAreaDownloadsView.xul",
+ nsIAboutModule::ALLOW_SCRIPT
+ },
#ifdef MOZ_SERVICES_HEALTHREPORT
- { "healthreport", "chrome://browser/content/abouthealthreport/abouthealth.xhtml",
- nsIAboutModule::ALLOW_SCRIPT },
+ {
+ "healthreport", "chrome://browser/content/abouthealthreport/abouthealth.xhtml",
+ nsIAboutModule::ALLOW_SCRIPT
+ },
#endif
- { "accounts", "chrome://browser/content/aboutaccounts/aboutaccounts.xhtml",
- nsIAboutModule::ALLOW_SCRIPT },
- { "reader", "chrome://global/content/reader/aboutReader.html",
+ {
+ "accounts", "chrome://browser/content/aboutaccounts/aboutaccounts.xhtml",
+ nsIAboutModule::ALLOW_SCRIPT
+ },
+ {
+ "reader", "chrome://global/content/reader/aboutReader.html",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::ALLOW_SCRIPT |
nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
- nsIAboutModule::HIDE_FROM_ABOUTABOUT },
+ nsIAboutModule::HIDE_FROM_ABOUTABOUT
+ },
};
static const int kRedirTotal = ArrayLength(kRedirMap);
diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp
index f85d8812c..1fad0ce68 100644
--- a/browser/components/build/nsModule.cpp
+++ b/browser/components/build/nsModule.cpp
@@ -85,6 +85,7 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
{ NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
#endif
{ NS_FEEDSNIFFER_CONTRACTID, &kNS_FEEDSNIFFER_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "basilisk", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "blocked", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "certerror", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "socialerror", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
diff --git a/browser/components/moz.build b/browser/components/moz.build
index 0393b6e92..a49580200 100644
--- a/browser/components/moz.build
+++ b/browser/components/moz.build
@@ -37,11 +37,8 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'browsercompsbase'
-EXTRA_PP_COMPONENTS += [
- 'BrowserComponents.manifest',
-]
-
EXTRA_COMPONENTS += [
+ 'BrowserComponents.manifest',
'nsBrowserContentHandler.js',
'nsBrowserGlue.js',
]
diff --git a/browser/components/nsBrowserContentHandler.js b/browser/components/nsBrowserContentHandler.js
index b366c3f81..74144fc1b 100644
--- a/browser/components/nsBrowserContentHandler.js
+++ b/browser/components/nsBrowserContentHandler.js
@@ -558,7 +558,7 @@ nsBrowserContentHandler.prototype = {
if (overridePage && startPage && !willRestoreSession && !skipStartPage)
return overridePage + "|" + startPage;
- return overridePage || startPage || "about:blank";
+ return overridePage || startPage || "about:blank" || "about:logopage";
},
get startPage() {
diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js
index f97c173a0..448bb910d 100644
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -70,15 +70,6 @@ XPCOMUtils.defineLazyServiceGetter(this, "AlertsService", "@mozilla.org/alerts-s
["webrtcUI", "resource:///modules/webrtcUI.jsm"],
].forEach(([name, resource]) => XPCOMUtils.defineLazyModuleGetter(this, name, resource));
-if (AppConstants.MOZ_CRASHREPORTER) {
- XPCOMUtils.defineLazyModuleGetter(this, "PluginCrashReporter",
- "resource:///modules/ContentCrashHandlers.jsm");
- XPCOMUtils.defineLazyModuleGetter(this, "UnsubmittedCrashHandler",
- "resource:///modules/ContentCrashHandlers.jsm");
- XPCOMUtils.defineLazyModuleGetter(this, "CrashSubmit",
- "resource://gre/modules/CrashSubmit.jsm");
-}
-
XPCOMUtils.defineLazyGetter(this, "gBrandBundle", function() {
return Services.strings.createBundle('chrome://branding/locale/brand.properties');
});
@@ -710,10 +701,6 @@ BrowserGlue.prototype = {
}
TabCrashHandler.init();
- if (AppConstants.MOZ_CRASHREPORTER) {
- PluginCrashReporter.init();
- UnsubmittedCrashHandler.init();
- }
Services.obs.notifyObservers(null, "browser-ui-startup-complete", "");
},
diff --git a/browser/components/places/content/editBookmarkOverlay.js b/browser/components/places/content/editBookmarkOverlay.js
index e26cfb138..d59f5c764 100644
--- a/browser/components/places/content/editBookmarkOverlay.js
+++ b/browser/components/places/content/editBookmarkOverlay.js
@@ -57,12 +57,14 @@ var gEditItemOverlay = {
}
}
let focusedElement = aInitInfo.focusedElement;
+ let onPanelReady = aInitInfo.onPanelReady;
return this._paneInfo = { itemId, itemGuid, isItem,
isURI, uri, title,
isBookmark, isFolderShortcut, isParentReadOnly,
bulkTagging, uris,
- visibleRows, postData, isTag, focusedElement };
+ visibleRows, postData, isTag, focusedElement,
+ onPanelReady };
},
get initialized() {
@@ -214,7 +216,8 @@ var gEditItemOverlay = {
let { itemId, isItem, isURI,
isBookmark, bulkTagging, uris,
- visibleRows, focusedElement } = this._setPaneInfo(aInfo);
+ visibleRows, focusedElement,
+ onPanelReady } = this._setPaneInfo(aInfo);
let showOrCollapse =
(rowId, isAppropriateForInput, nameInHiddenRows = null) => {
@@ -286,22 +289,34 @@ var gEditItemOverlay = {
this._observersAdded = true;
}
- // The focusedElement possible values are:
- // * preferred: focus the field that the user touched first the last
- // time the pane was shown (either namePicker or tagsField)
- // * first: focus the first non collapsed textbox
- // Note: since all controls are collapsed by default, we don't get the
- // default XUL dialog behavior, that selects the first control, so we set
- // the focus explicitly.
- let elt;
- if (focusedElement === "preferred") {
- elt = this._element(gPrefService.getCharPref("browser.bookmarks.editDialog.firstEditField"));
- } else if (focusedElement === "first") {
- elt = document.querySelector("textbox:not([collapsed=true])");
- }
- if (elt) {
- elt.focus();
- elt.select();
+ let focusElement = () => {
+ // The focusedElement possible values are:
+ // * preferred: focus the field that the user touched first the last
+ // time the pane was shown (either namePicker or tagsField)
+ // * first: focus the first non collapsed textbox
+ // Note: since all controls are collapsed by default, we don't get the
+ // default XUL dialog behavior, that selects the first control, so we set
+ // the focus explicitly.
+ // Note: If focusedElement === "preferred", this file expects gPrefService
+ // to be defined in the global scope.
+ let elt;
+ if (focusedElement === "preferred") {
+ /* eslint-disable no-undef */
+ elt = this._element(gPrefService.getCharPref("browser.bookmarks.editDialog.firstEditField"));
+ /* eslint-enable no-undef */
+ } else if (focusedElement === "first") {
+ elt = document.querySelector("textbox:not([collapsed=true])");
+ }
+ if (elt) {
+ elt.focus();
+ elt.select();
+ }
+ };
+
+ if (onPanelReady) {
+ onPanelReady(focusElement);
+ } else {
+ focusElement();
}
},
@@ -335,10 +350,23 @@ var gEditItemOverlay = {
if (aElement.value != aValue) {
aElement.value = aValue;
- // Clear the undo stack
- let editor = aElement.editor;
- if (editor)
- editor.transactionManager.clear();
+ // Clear the editor's undo stack
+ let transactionManager;
+ try {
+ transactionManager = aElement.editor.transactionManager;
+ } catch (e) {
+ // When retrieving the transaction manager, editor may be null resulting
+ // in a TypeError. Additionally, the transaction manager may not
+ // exist yet, which causes access to it to throw NS_ERROR_FAILURE.
+ // In either event, the transaction manager doesn't exist it, so we
+ // don't need to worry about clearing it.
+ if (!(e instanceof TypeError) && e.result != Cr.NS_ERROR_FAILURE) {
+ throw e;
+ }
+ }
+ if (transactionManager) {
+ transactionManager.clear();
+ }
}
},
diff --git a/browser/components/preferences/in-content/advanced.js b/browser/components/preferences/in-content/advanced.js
index 448a21dae..5f9458eee 100644
--- a/browser/components/preferences/in-content/advanced.js
+++ b/browser/components/preferences/in-content/advanced.js
@@ -40,9 +40,6 @@ var gAdvancedPane = {
this.updateReadPrefs();
}
this.updateOfflineApps();
- if (AppConstants.MOZ_CRASHREPORTER) {
- this.initSubmitCrashes();
- }
this.initTelemetry();
if (AppConstants.MOZ_TELEMETRY_REPORTING) {
this.initSubmitHealthReport();
diff --git a/browser/components/preferences/in-content/advanced.xul b/browser/components/preferences/in-content/advanced.xul
index facaaeaa9..4973f8e09 100644
--- a/browser/components/preferences/in-content/advanced.xul
+++ b/browser/components/preferences/in-content/advanced.xul
@@ -54,13 +54,6 @@
type="bool"/>
#endif
- <!-- Data Choices tab -->
-#ifdef MOZ_CRASHREPORTER
- <preference id="browser.crashReports.unsubmittedCheck.autoSubmit2"
- name="browser.crashReports.unsubmittedCheck.autoSubmit2"
- type="bool"/>
-#endif
-
<!-- Network tab -->
<preference id="browser.cache.disk.capacity"
name="browser.cache.disk.capacity"
@@ -233,22 +226,6 @@
</vbox>
</groupbox>
#endif
-#ifdef MOZ_CRASHREPORTER
- <groupbox>
- <caption>
- <checkbox id="automaticallySubmitCrashesBox"
- preference="browser.crashReports.unsubmittedCheck.autoSubmit2"
- label="&alwaysSubmitCrashReports.label;"
- accesskey="&alwaysSubmitCrashReports.accesskey;"/>
- </caption>
- <hbox class="indent">
- <label flex="1">&crashReporterDesc2.label;</label>
- <spacer flex="10"/>
- <label id="crashReporterLearnMore"
- class="text-link">&crashReporterLearnMore.label;</label>
- </hbox>
- </groupbox>
-#endif
</tabpanel>
#endif