diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-05-31 09:45:25 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-05-31 09:45:25 +0200 |
commit | 2d4ff8df91414b42974c72b2870f5c6e9ad397a8 (patch) | |
tree | 15b23dc6494a147e723cfdb3765be1568cf6c113 /browser/components | |
parent | f4b8be889cb7ee31a62af5660f36aaa192599009 (diff) | |
parent | 14eb8dc7bee8670e39d1199591d335579601f2ad (diff) | |
download | UXP-2d4ff8df91414b42974c72b2870f5c6e9ad397a8.tar UXP-2d4ff8df91414b42974c72b2870f5c6e9ad397a8.tar.gz UXP-2d4ff8df91414b42974c72b2870f5c6e9ad397a8.tar.lz UXP-2d4ff8df91414b42974c72b2870f5c6e9ad397a8.tar.xz UXP-2d4ff8df91414b42974c72b2870f5c6e9ad397a8.zip |
Merge branch 'master' into Basilisk-release
Diffstat (limited to 'browser/components')
-rw-r--r-- | browser/components/about/AboutRedirector.cpp | 12 | ||||
-rw-r--r-- | browser/components/build/nsModule.cpp | 4 | ||||
-rw-r--r-- | browser/components/customizableui/CustomizableWidgets.jsm | 41 | ||||
-rw-r--r-- | browser/components/customizableui/content/panelUI.inc.xul | 2 | ||||
-rw-r--r-- | browser/components/preferences/blocklists.js | 2 | ||||
-rw-r--r-- | browser/components/preferences/in-content/jar.mn | 2 | ||||
-rw-r--r-- | browser/components/preferences/in-content/security.js | 16 | ||||
-rw-r--r-- | browser/components/preferences/in-content/security.xul | 18 |
8 files changed, 21 insertions, 76 deletions
diff --git a/browser/components/about/AboutRedirector.cpp b/browser/components/about/AboutRedirector.cpp index 717ae9c48..b77949ea7 100644 --- a/browser/components/about/AboutRedirector.cpp +++ b/browser/components/about/AboutRedirector.cpp @@ -40,6 +40,7 @@ static RedirEntry kRedirMap[] = { nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | nsIAboutModule::HIDE_FROM_ABOUTABOUT }, +#ifdef MOZ_SAFE_BROWSING { "blocked", "chrome://browser/content/blockedSite.xhtml", nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | @@ -47,6 +48,7 @@ static RedirEntry kRedirMap[] = { nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::HIDE_FROM_ABOUTABOUT }, +#endif { "certerror", "chrome://browser/content/aboutNetError.xhtml", nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | @@ -55,16 +57,6 @@ static RedirEntry kRedirMap[] = { nsIAboutModule::HIDE_FROM_ABOUTABOUT }, { - "socialerror", "chrome://browser/content/aboutSocialError.xhtml", - nsIAboutModule::ALLOW_SCRIPT | - nsIAboutModule::HIDE_FROM_ABOUTABOUT - }, - { - "providerdirectory", "chrome://browser/content/aboutProviderDirectory.xhtml", - nsIAboutModule::ALLOW_SCRIPT | - nsIAboutModule::HIDE_FROM_ABOUTABOUT - }, - { "tabcrashed", "chrome://browser/content/aboutTabCrashed.xhtml", nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | nsIAboutModule::ALLOW_SCRIPT | diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp index 1fad0ce68..1baccd710 100644 --- a/browser/components/build/nsModule.cpp +++ b/browser/components/build/nsModule.cpp @@ -86,10 +86,10 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = { #endif { NS_FEEDSNIFFER_CONTRACTID, &kNS_FEEDSNIFFER_CID }, { NS_ABOUT_MODULE_CONTRACTID_PREFIX "basilisk", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, +#ifdef MOZ_SAFE_BROWSING { NS_ABOUT_MODULE_CONTRACTID_PREFIX "blocked", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, +#endif { NS_ABOUT_MODULE_CONTRACTID_PREFIX "certerror", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, - { NS_ABOUT_MODULE_CONTRACTID_PREFIX "socialerror", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, - { NS_ABOUT_MODULE_CONTRACTID_PREFIX "providerdirectory", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, { NS_ABOUT_MODULE_CONTRACTID_PREFIX "tabcrashed", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, { NS_ABOUT_MODULE_CONTRACTID_PREFIX "feeds", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, { NS_ABOUT_MODULE_CONTRACTID_PREFIX "privatebrowsing", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, diff --git a/browser/components/customizableui/CustomizableWidgets.jsm b/browser/components/customizableui/CustomizableWidgets.jsm index 3e83b081c..3e00d385f 100644 --- a/browser/components/customizableui/CustomizableWidgets.jsm +++ b/browser/components/customizableui/CustomizableWidgets.jsm @@ -557,47 +557,6 @@ const CustomizableWidgets = [ fillSubviewFromMenuItems([...menu.children], sidebarItems); } }, { - id: "social-share-button", - // custom build our button so we can attach to the share command - type: "custom", - onBuild: function(aDocument) { - let node = aDocument.createElementNS(kNSXUL, "toolbarbutton"); - node.setAttribute("id", this.id); - node.classList.add("toolbarbutton-1"); - node.classList.add("chromeclass-toolbar-additional"); - node.setAttribute("label", CustomizableUI.getLocalizedProperty(this, "label")); - node.setAttribute("tooltiptext", CustomizableUI.getLocalizedProperty(this, "tooltiptext")); - node.setAttribute("removable", "true"); - node.setAttribute("observes", "Social:PageShareable"); - node.setAttribute("command", "Social:SharePage"); - - let listener = { - onWidgetAdded: (aWidgetId) => { - if (aWidgetId != this.id) - return; - - Services.obs.notifyObservers(null, "social:" + this.id + "-added", null); - }, - - onWidgetRemoved: aWidgetId => { - if (aWidgetId != this.id) - return; - - Services.obs.notifyObservers(null, "social:" + this.id + "-removed", null); - }, - - onWidgetInstanceRemoved: (aWidgetId, aDoc) => { - if (aWidgetId != this.id || aDoc != aDocument) - return; - - CustomizableUI.removeListener(listener); - } - }; - CustomizableUI.addListener(listener); - - return node; - } - }, { id: "add-ons-button", shortcutId: "key_openAddons", tooltiptext: "add-ons-button.tooltiptext3", diff --git a/browser/components/customizableui/content/panelUI.inc.xul b/browser/components/customizableui/content/panelUI.inc.xul index 1b8fc0236..077d9c014 100644 --- a/browser/components/customizableui/content/panelUI.inc.xul +++ b/browser/components/customizableui/content/panelUI.inc.xul @@ -240,8 +240,6 @@ onclick="PanelUI.hide();"/> </panelview> - <panelview id="PanelUI-socialapi" flex="1"/> - <panelview id="PanelUI-feeds" flex="1" oncommand="FeedHandler.subscribeToFeed(null, event);"> <label value="&feedsMenu2.label;" class="panel-subview-header"/> </panelview> diff --git a/browser/components/preferences/blocklists.js b/browser/components/preferences/blocklists.js index bc39eb6bd..c0ce5b656 100644 --- a/browser/components/preferences/blocklists.js +++ b/browser/components/preferences/blocklists.js @@ -6,9 +6,11 @@ Components.utils.import("resource://gre/modules/Services.jsm"); const BASE_LIST_ID = "base"; const CONTENT_LIST_ID = "content"; const TRACK_SUFFIX = "-track-digest256"; +#ifdef MOZ_SAFE_BROWSING const TRACKING_TABLE_PREF = "urlclassifier.trackingTable"; const LISTS_PREF_BRANCH = "browser.safebrowsing.provider.mozilla.lists."; const UPDATE_TIME_PREF = "browser.safebrowsing.provider.mozilla.nextupdatetime"; +#endif var gBlocklistManager = { _type: "", diff --git a/browser/components/preferences/in-content/jar.mn b/browser/components/preferences/in-content/jar.mn index 3497ff555..130bf8549 100644 --- a/browser/components/preferences/in-content/jar.mn +++ b/browser/components/preferences/in-content/jar.mn @@ -14,5 +14,5 @@ browser.jar: content/browser/preferences/in-content/applications.js * content/browser/preferences/in-content/content.js content/browser/preferences/in-content/sync.js - content/browser/preferences/in-content/security.js +* content/browser/preferences/in-content/security.js content/browser/preferences/in-content/search.js diff --git a/browser/components/preferences/in-content/security.js b/browser/components/preferences/in-content/security.js index 0d7af39a3..37a187f9c 100644 --- a/browser/components/preferences/in-content/security.js +++ b/browser/components/preferences/in-content/security.js @@ -23,7 +23,9 @@ var gSecurityPane = { this._pane = document.getElementById("paneSecurity"); this._initMasterPasswordUI(); +#ifdef MOZ_SAFE_BROWSING this._initSafeBrowsing(); +#endif setEventListener("addonExceptions", "command", gSecurityPane.showAddonExceptions); @@ -160,6 +162,7 @@ var gSecurityPane = { checkbox.checked = !noMP; }, +#ifdef MOZ_SAFE_BROWSING _initSafeBrowsing() { let enableSafeBrowsing = document.getElementById("enableSafeBrowsing"); let blockDownloads = document.getElementById("blockDownloads"); @@ -168,24 +171,12 @@ var gSecurityPane = { let safeBrowsingPhishingPref = document.getElementById("browser.safebrowsing.phishing.enabled"); let safeBrowsingMalwarePref = document.getElementById("browser.safebrowsing.malware.enabled"); - let safeBrowsingUIPref = document.getElementById("browser.safebrowsing.UI.enabled"); - let safeBrowsingUISep = document.getElementById("safeBrowsingUISep"); - let safeBrowsingUIGroup = document.getElementById("safeBrowsingUIGroup"); - let blockDownloadsPref = document.getElementById("browser.safebrowsing.downloads.enabled"); let malwareTable = document.getElementById("urlclassifier.malwareTable"); let blockUnwantedPref = document.getElementById("browser.safebrowsing.downloads.remote.block_potentially_unwanted"); let blockUncommonPref = document.getElementById("browser.safebrowsing.downloads.remote.block_uncommon"); - if (safeBrowsingUIPref.value == false) { - safeBrowsingUISep.setAttribute("hidden", "true"); - safeBrowsingUIGroup.setAttribute("hidden", "true"); - } else { - safeBrowsingUISep.removeAttribute("hidden"); - safeBrowsingUIGroup.removeAttribute("hidden"); - } - enableSafeBrowsing.addEventListener("command", function() { safeBrowsingPhishingPref.value = enableSafeBrowsing.checked; safeBrowsingMalwarePref.value = enableSafeBrowsing.checked; @@ -244,6 +235,7 @@ var gSecurityPane = { blockUncommonUnwanted.checked = blockUnwantedPref.value && blockUncommonPref.value; }, +#endif /** * Enables/disables the master password button depending on the state of the diff --git a/browser/components/preferences/in-content/security.xul b/browser/components/preferences/in-content/security.xul index 5dc8ad5e9..33e1471bd 100644 --- a/browser/components/preferences/in-content/security.xul +++ b/browser/components/preferences/in-content/security.xul @@ -16,11 +16,13 @@ name="pref.privacy.disable_button.view_passwords_exceptions" type="bool"/> - <!-- Add-ons, malware, phishing --> + <!-- Add-ons --> <preference id="xpinstall.whitelist.required" name="xpinstall.whitelist.required" type="bool"/> +#ifdef MOZ_SAFE_BROWSING + <!-- Malware, phishing --> <preference id="browser.safebrowsing.malware.enabled" name="browser.safebrowsing.malware.enabled" type="bool"/> @@ -28,10 +30,6 @@ name="browser.safebrowsing.phishing.enabled" type="bool"/> - <preference id="browser.safebrowsing.UI.enabled" - name="browser.safebrowsing.UI.enabled" - type="bool"/> - <preference id="browser.safebrowsing.downloads.enabled" name="browser.safebrowsing.downloads.enabled" type="bool"/> @@ -46,6 +44,7 @@ <preference id="browser.safebrowsing.downloads.remote.block_uncommon" name="browser.safebrowsing.downloads.remote.block_uncommon" type="bool"/> +#endif <!-- Passwords --> <preference id="signon.rememberSignons" name="signon.rememberSignons" type="bool"/> @@ -61,7 +60,7 @@ <html:a class="help-button" target="_blank" aria-label="&helpButton.label;"></html:a> </hbox> -<!-- addons, forgery (phishing) UI --> +<!-- addons --> <groupbox id="addonsPhishingGroup" data-category="paneSecurity" hidden="true"> <caption><label>&general.label;</label></caption> @@ -77,8 +76,10 @@ accesskey="&addonExceptions.accesskey;"/> </hbox> - <separator id="safeBrowsingUISep" class="thin"/> - <vbox id="safeBrowsingUIGroup" align="start"> +#ifdef MOZ_SAFE_BROWSING +<!-- Safebrowsing (phishing) UI --> + <separator class="thin"/> + <vbox align="start"> <checkbox id="enableSafeBrowsing" label="&enableSafeBrowsing.label;" accesskey="&enableSafeBrowsing.accesskey;" /> @@ -91,6 +92,7 @@ accesskey="&blockUncommonUnwanted.accesskey;" /> </vbox> </vbox> +#endif </groupbox> <!-- Passwords --> |