Skip to content

Commit

Permalink
Merge fx-team to m-c. a=merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rvandermeulen committed Sep 1, 2016
2 parents c6b0a50 + e1afe71 commit 44f0264
Show file tree
Hide file tree
Showing 41 changed files with 284 additions and 262 deletions.
14 changes: 5 additions & 9 deletions b2g/chrome/content/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,8 @@ XPCOMUtils.defineLazyServiceGetter(Services, 'captivePortalDetector',
'@mozilla.org/toolkit/captive-detector;1',
'nsICaptivePortalDetector');

if (AppConstants.MOZ_SAFE_BROWSING) {
XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing",
"resource://gre/modules/SafeBrowsing.jsm");
}
XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing",
"resource://gre/modules/SafeBrowsing.jsm");

XPCOMUtils.defineLazyModuleGetter(this, "SafeMode",
"resource://gre/modules/SafeMode.jsm");
Expand Down Expand Up @@ -434,11 +432,9 @@ var shell = {
ppmm.addMessageListener("mail-handler", this);
ppmm.addMessageListener("file-picker", this);

if (AppConstants.MOZ_SAFE_BROWSING) {
setTimeout(function() {
SafeBrowsing.init();
}, 5000);
}
setTimeout(function() {
SafeBrowsing.init();
}, 5000);
},

stop: function shell_stop() {
Expand Down
2 changes: 0 additions & 2 deletions b2g/confvars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ MOZ_BRANDING_DIRECTORY=b2g/branding/unofficial
MOZ_OFFICIAL_BRANDING_DIRECTORY=b2g/branding/official
# MOZ_APP_DISPLAYNAME is set by branding/configure.sh

MOZ_SAFE_BROWSING=1

MOZ_NO_SMART_CARDS=1
MOZ_APP_STATIC_INI=1
MOZ_NO_EV_CERTS=1
Expand Down
1 change: 0 additions & 1 deletion b2g/graphene/confvars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ MOZ_BRANDING_DIRECTORY=b2g/branding/unofficial
MOZ_OFFICIAL_BRANDING_DIRECTORY=b2g/branding/official
# MOZ_APP_DISPLAYNAME is set by branding/configure.sh

MOZ_SAFE_BROWSING=1
MOZ_CAPTIVEDETECT=1

MOZ_NO_SMART_CARDS=1
Expand Down
2 changes: 0 additions & 2 deletions browser/base/content/browser-doctype.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
%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">
Expand Down
3 changes: 0 additions & 3 deletions browser/base/content/browser-safebrowsing.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
* 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/. */

// Note: this file is not shipped (through jar.mn)
// if MOZ_SAFE_BROWSING is not defined.

var gSafeBrowsing = {

setReportPhishingMenu: function() {
Expand Down
2 changes: 1 addition & 1 deletion browser/base/content/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ html|*#fullscreen-exit-button {
-moz-user-focus: normal;
}

.blocked-permission-icon:not([showing]),
#blocked-permissions-container > .blocked-permission-icon:not([showing]),
.notification-anchor-icon:not([showing]) {
display: none;
}
Expand Down
14 changes: 5 additions & 9 deletions browser/base/content/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ Cu.import("resource://gre/modules/NotificationDB.jsm");
["webrtcUI", "resource:///modules/webrtcUI.jsm", ]
].forEach(([name, resource]) => XPCOMUtils.defineLazyModuleGetter(this, name, resource));

if (AppConstants.MOZ_SAFE_BROWSING) {
XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing",
"resource://gre/modules/SafeBrowsing.jsm");
}
XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing",
"resource://gre/modules/SafeBrowsing.jsm");

if (AppConstants.MOZ_CRASHREPORTER) {
XPCOMUtils.defineLazyModuleGetter(this, "PluginCrashReporter",
Expand Down Expand Up @@ -1146,10 +1144,8 @@ var gBrowserInit = {
}
}

if (AppConstants.MOZ_SAFE_BROWSING) {
// Bug 778855 - Perf regression if we do this here. To be addressed in bug 779008.
setTimeout(function() { SafeBrowsing.init(); }, 2000);
}
// Bug 778855 - Perf regression if we do this here. To be addressed in bug 779008.
setTimeout(function() { SafeBrowsing.init(); }, 2000);

Services.obs.addObserver(gIdentityHandler, "perm-changed", false);
Services.obs.addObserver(gSessionHistoryObserver, "browser:purge-session-history", false);
Expand Down Expand Up @@ -7377,7 +7373,7 @@ var gIdentityHandler = {
let img = document.createElement("image");
let classes = "identity-popup-permission-icon " + aPermission.id + "-icon";
if (aPermission.state == SitePermissions.BLOCK)
classes += " blocked";
classes += " blocked-permission-icon";
if (aPermission.inUse)
classes += " in-use";
img.setAttribute("class", classes);
Expand Down
2 changes: 0 additions & 2 deletions browser/base/content/global-scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
<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"/>
Expand Down
3 changes: 2 additions & 1 deletion browser/base/content/utilityOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,9 @@ function openTourPage()
function buildHelpMenu()
{
// Enable/disable the "Report Web Forgery" menu item.
if (typeof gSafeBrowsing != "undefined" && AppConstants.MOZ_SAFE_BROWSING)
if (typeof gSafeBrowsing != "undefined") {
gSafeBrowsing.setReportPhishingMenu();
}
}

function isElementVisible(aElement)
Expand Down
4 changes: 0 additions & 4 deletions browser/base/jar.mn
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ 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)
Expand Down Expand Up @@ -191,10 +189,8 @@ browser.jar:
# the following files are browser-specific overrides
* content/browser/license.html (/toolkit/content/license.html)
% 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
2 changes: 0 additions & 2 deletions browser/components/about/AboutRedirector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@ struct RedirEntry {
URI_SAFE_FOR_UNTRUSTED_CONTENT.
*/
static RedirEntry kRedirMap[] = {
#ifdef MOZ_SAFE_BROWSING
{ "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 },
#endif
{ "certerror", "chrome://browser/content/aboutNetError.xhtml",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::URI_CAN_LOAD_IN_CHILD |
Expand Down
2 changes: 0 additions & 2 deletions browser/components/build/nsModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
{ NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
#endif
{ NS_FEEDSNIFFER_CONTRACTID, &kNS_FEEDSNIFFER_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 },
Expand Down
4 changes: 1 addition & 3 deletions browser/components/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,14 @@ EXTRA_JS_MODULES += [
]

BROWSER_CHROME_MANIFESTS += [
'safebrowsing/content/test/browser.ini',
'tests/browser/browser.ini'
]

XPCSHELL_TESTS_MANIFESTS += [
'tests/unit/xpcshell.ini'
]

if CONFIG['MOZ_SAFE_BROWSING']:
BROWSER_CHROME_MANIFESTS += ['safebrowsing/content/test/browser.ini']

with Files('safebrowsing/*'):
BUG_COMPONENT = ('Toolkit', 'Phishing Protection')

Expand Down
1 change: 0 additions & 1 deletion browser/confvars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ fi
# Enable building ./signmar and running libmar signature tests
MOZ_ENABLE_SIGNMAR=1

MOZ_SAFE_BROWSING=1
MOZ_APP_VERSION=$FIREFOX_VERSION
MOZ_APP_VERSION_DISPLAY=$FIREFOX_VERSION_DISPLAY
MOZ_EXTENSIONS_DEFAULT=" gio"
Expand Down
2 changes: 0 additions & 2 deletions browser/installer/package-manifest.in
Original file line number Diff line number Diff line change
Expand Up @@ -596,13 +596,11 @@
@RESPATH@/modules/*

; Safe Browsing
#ifdef MOZ_URL_CLASSIFIER
@RESPATH@/components/nsURLClassifier.manifest
@RESPATH@/components/nsUrlClassifierHashCompleter.js
@RESPATH@/components/nsUrlClassifierListManager.js
@RESPATH@/components/nsUrlClassifierLib.js
@RESPATH@/components/url-classifier.xpt
#endif

; Private Browsing
@RESPATH@/components/privatebrowsing.xpt
Expand Down
2 changes: 0 additions & 2 deletions browser/locales/jar.mn
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@
locale/browser/places/bookmarkProperties.properties (%chrome/browser/places/bookmarkProperties.properties)
locale/browser/preferences/selectBookmark.dtd (%chrome/browser/preferences/selectBookmark.dtd)
locale/browser/places/moveBookmarks.dtd (%chrome/browser/places/moveBookmarks.dtd)
#ifdef MOZ_SAFE_BROWSING
locale/browser/safebrowsing/phishing-afterload-warning-message.dtd (%chrome/browser/safebrowsing/phishing-afterload-warning-message.dtd)
locale/browser/safebrowsing/report-phishing.dtd (%chrome/browser/safebrowsing/report-phishing.dtd)
#endif
locale/browser/feeds/subscribe.dtd (%chrome/browser/feeds/subscribe.dtd)
locale/browser/feeds/subscribe.properties (%chrome/browser/feeds/subscribe.properties)
locale/browser/migration/migration.dtd (%chrome/browser/migration/migration.dtd)
Expand Down
5 changes: 4 additions & 1 deletion devtools/client/debugger/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ DevToolsModules(
'panel.js'
)

BROWSER_CHROME_MANIFESTS += ['test/mochitest/browser.ini']
BROWSER_CHROME_MANIFESTS += [
'new/test/mochitest/browser.ini',
'test/mochitest/browser.ini'
]
5 changes: 5 additions & 0 deletions devtools/client/debugger/new/test/mochitest/browser.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[DEFAULT]
tags = devtools
subsuite = devtools

[browser_dbg_stub.js]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

add_task(function*() {
ok(true,
"This is a stub so that we can run the new debugger tests " +
"by copying them in here. This will go away once we land " +
"the initial suite of new tests");
});
28 changes: 21 additions & 7 deletions devtools/client/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,28 @@ Tools.jsdebugger = {
}
};

if (Services.prefs.getBoolPref("devtools.debugger.new-debugger-frontend")) {
const NewDebuggerPanel = require("devtools/client/debugger/new/panel").DebuggerPanel;

Tools.jsdebugger.url = "chrome://devtools/content/debugger/new/index.html";
Tools.jsdebugger.build = function (iframeWindow, toolbox) {
return new NewDebuggerPanel(iframeWindow, toolbox);
};
function switchDebugger() {
if (Services.prefs.getBoolPref("devtools.debugger.new-debugger-frontend")) {
const NewDebuggerPanel = require("devtools/client/debugger/new/panel").DebuggerPanel;

Tools.jsdebugger.url = "chrome://devtools/content/debugger/new/index.html";
Tools.jsdebugger.build = function (iframeWindow, toolbox) {
return new NewDebuggerPanel(iframeWindow, toolbox);
};
} else {
Tools.jsdebugger.url = "chrome://devtools/content/debugger/debugger.xul";
Tools.jsdebugger.build = function (iframeWindow, toolbox) {
return new DebuggerPanel(iframeWindow, toolbox);
};
}
}
switchDebugger();

Services.prefs.addObserver(
"devtools.debugger.new-debugger-frontend",
{ observe: switchDebugger },
false
);

Tools.styleEditor = {
id: "styleeditor",
Expand Down
Loading

0 comments on commit 44f0264

Please sign in to comment.