diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/content/browser-doctype.inc | 2 | ||||
-rw-r--r-- | base/content/browser-safebrowsing.js | 2 | ||||
-rw-r--r-- | base/content/browser-sets.inc | 2 | ||||
-rwxr-xr-x | base/content/browser.js | 8 | ||||
-rwxr-xr-x | base/content/global-scripts.inc | 2 | ||||
-rw-r--r-- | base/content/tab-content.js | 2 | ||||
-rw-r--r-- | base/content/utilityOverlay.js | 3 | ||||
-rw-r--r-- | base/jar.mn | 4 |
8 files changed, 19 insertions, 6 deletions
diff --git a/base/content/browser-doctype.inc b/base/content/browser-doctype.inc index 10015d8..ad08f4b 100644 --- a/base/content/browser-doctype.inc +++ b/base/content/browser-doctype.inc @@ -13,8 +13,10 @@ %customizeToolbarDTD; <!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd"> %placesDTD; +#ifdef MOZ_SAFE_BROWSING <!ENTITY % safebrowsingDTD SYSTEM "chrome://browser/locale/safebrowsing/phishing-afterload-warning-message.dtd"> %safebrowsingDTD; +#endif <!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd"> %aboutHomeDTD; <!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd"> diff --git a/base/content/browser-safebrowsing.js b/base/content/browser-safebrowsing.js index 430d84f..a66595b 100644 --- a/base/content/browser-safebrowsing.js +++ b/base/content/browser-safebrowsing.js @@ -2,6 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_SAFE_BROWSING var gSafeBrowsing = { setReportPhishingMenu: function() { @@ -46,3 +47,4 @@ var gSafeBrowsing = { return SafeBrowsing.getReportURL(name, gBrowser.currentURI); } } +#endif diff --git a/base/content/browser-sets.inc b/base/content/browser-sets.inc index 0c75352..d0c3d11 100644 --- a/base/content/browser-sets.inc +++ b/base/content/browser-sets.inc @@ -285,7 +285,7 @@ <key id="key_fullScreen_old" key="&fullScreenCmd.macCommandKey;" command="View:FullScreen" modifiers="accel,shift"/> <key keycode="VK_F11" command="View:FullScreen"/> #endif - <key id="toggleReaderMode" key="&toggleReaderMode.key;" command="View:ReaderView" modifiers="accel,alt" disabled="true"/> + <key id="key_toggleReaderMode" key="&toggleReaderMode.key;" command="View:ReaderView" modifiers="accel,alt" disabled="true"/> <key key="&reloadCmd.commandkey;" command="Browser:Reload" modifiers="accel" id="key_reload"/> <key key="&reloadCmd.commandkey;" command="Browser:ReloadSkipCache" modifiers="accel,shift"/> <key id="key_viewSource" key="&pageSourceCmd.commandkey;" command="View:PageSource" modifiers="accel"/> diff --git a/base/content/browser.js b/base/content/browser.js index 2380f5d..8679bca 100755 --- a/base/content/browser.js +++ b/base/content/browser.js @@ -60,8 +60,10 @@ Cu.import("resource://gre/modules/NotificationDB.jsm"); ["webrtcUI", "resource:///modules/webrtcUI.jsm", ] ].forEach(([name, resource]) => XPCOMUtils.defineLazyModuleGetter(this, name, resource)); -XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing", - "resource://gre/modules/SafeBrowsing.jsm"); +#ifdef MOZ_SAFE_BROWSING + XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing", + "resource://gre/modules/SafeBrowsing.jsm"); +#endif // lazy service getters [ @@ -1200,8 +1202,10 @@ var gBrowserInit = { } } +#ifdef MOZ_SAFE_BROWSING // Bug 778855 - Perf regression if we do this here. To be addressed in bug 779008. setTimeout(function() { SafeBrowsing.init(); }, 2000); +#endif Services.obs.addObserver(gIdentityHandler, "perm-changed", false); Services.obs.addObserver(gSessionHistoryObserver, "browser:purge-session-history", false); diff --git a/base/content/global-scripts.inc b/base/content/global-scripts.inc index dac7587..ca942ce 100755 --- a/base/content/global-scripts.inc +++ b/base/content/global-scripts.inc @@ -23,7 +23,9 @@ <script type="application/javascript" src="chrome://browser/content/browser-places.js"/> <script type="application/javascript" src="chrome://browser/content/browser-plugins.js"/> <script type="application/javascript" src="chrome://browser/content/browser-refreshblocker.js"/> +#ifdef MOZ_SAFE_BROWSING <script type="application/javascript" src="chrome://browser/content/browser-safebrowsing.js"/> +#endif <script type="application/javascript" src="chrome://browser/content/browser-sidebar.js"/> <script type="application/javascript" src="chrome://browser/content/browser-social.js"/> <script type="application/javascript" src="chrome://browser/content/browser-syncui.js"/> diff --git a/base/content/tab-content.js b/base/content/tab-content.js index 7e80379..a57dc66 100644 --- a/base/content/tab-content.js +++ b/base/content/tab-content.js @@ -307,7 +307,7 @@ var AboutReaderListener = { if (content.document.body) { // Update the toolbar icon to show the "reader active" icon. sendAsyncMessage("Reader:UpdateReaderButton"); - new AboutReader(global, content, this._articlePromise); + new AboutReader(content, this._articlePromise); this._articlePromise = null; } break; diff --git a/base/content/utilityOverlay.js b/base/content/utilityOverlay.js index b041915..4ea6d8f 100644 --- a/base/content/utilityOverlay.js +++ b/base/content/utilityOverlay.js @@ -819,9 +819,8 @@ function openTourPage() function buildHelpMenu() { // Enable/disable the "Report Web Forgery" menu item. - if (typeof gSafeBrowsing != "undefined") { + if (typeof gSafeBrowsing != "undefined") gSafeBrowsing.setReportPhishingMenu(); - } } function isElementVisible(aElement) diff --git a/base/jar.mn b/base/jar.mn index b84294c..515fffc 100644 --- a/base/jar.mn +++ b/base/jar.mn @@ -88,7 +88,9 @@ browser.jar: content/browser/browser-places.js (content/browser-places.js) content/browser/browser-plugins.js (content/browser-plugins.js) content/browser/browser-refreshblocker.js (content/browser-refreshblocker.js) +#ifdef MOZ_SAFE_BROWSING content/browser/browser-safebrowsing.js (content/browser-safebrowsing.js) +#endif content/browser/browser-sidebar.js (content/browser-sidebar.js) content/browser/browser-social.js (content/browser-social.js) * content/browser/browser-syncui.js (content/browser-syncui.js) @@ -189,9 +191,11 @@ browser.jar: #endif # the following files are browser-specific overrides % override chrome://global/content/license.html chrome://browser/content/license.html +#ifdef MOZ_SAFE_BROWSING content/browser/report-phishing-overlay.xul (content/report-phishing-overlay.xul) content/browser/blockedSite.xhtml (content/blockedSite.xhtml) % overlay chrome://browser/content/browser.xul chrome://browser/content/report-phishing-overlay.xul +#endif % override chrome://global/content/netError.xhtml chrome://browser/content/aboutNetError.xhtml % override chrome://global/content/mozilla.xhtml chrome://browser/content/mozilla.xhtml |