diff --git a/b2g/app/b2g.js b/b2g/app/b2g.js
index 150de07bba..c2a211b58e 100644
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -224,7 +224,6 @@ pref("dom.use_watchdog", false);
// ensure that those calls don't accidentally trigger the dialog.
pref("dom.max_script_run_time", 0);
pref("dom.max_chrome_script_run_time", 0);
-pref("dom.max_child_script_run_time", 0);
// plugins
pref("plugin.disable", true);
@@ -1044,6 +1043,12 @@ pref("layout.accessiblecaret.enabled", true);
pref("layout.accessiblecaret.use_long_tap_injector", false);
#endif
+// The active caret is disallow to be dragged across the other (inactive) caret.
+pref("layout.accessiblecaret.allow_dragging_across_other_caret", false);
+
+// Hide carets and text selection dialog during scrolling.
+pref("layout.accessiblecaret.always_show_when_scrolling", false);
+
// Enable sync and mozId with Firefox Accounts.
pref("services.sync.fxaccounts.enabled", true);
pref("identity.fxaccounts.enabled", true);
diff --git a/b2g/installer/package-manifest.in b/b2g/installer/package-manifest.in
index 9ef7f7515d..f1df749a76 100644
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -447,6 +447,8 @@
@RESPATH@/components/PresentationDeviceInfoManager.js
@RESPATH@/components/BuiltinProviders.manifest
@RESPATH@/components/TCPPresentationServer.js
+@RESPATH@/components/PresentationDataChannelSessionTransport.js
+@RESPATH@/components/PresentationDataChannelSessionTransport.manifest
#ifdef MOZ_SECUREELEMENT
@RESPATH@/components/ACEService.js
diff --git a/browser/components/safebrowsing/content/test/browser_whitelisted.js b/browser/components/safebrowsing/content/test/browser_whitelisted.js
new file mode 100644
index 0000000000..45c12c399a
--- /dev/null
+++ b/browser/components/safebrowsing/content/test/browser_whitelisted.js
@@ -0,0 +1,41 @@
+/* Ensure that hostnames in the whitelisted pref are not blocked. */
+
+const PREF_WHITELISTED_HOSTNAMES = "urlclassifier.skipHostnames";
+const TEST_PAGE = "http://www.itisatrap.org/firefox/its-an-attack.html";
+var tabbrowser = null;
+
+registerCleanupFunction(function() {
+ tabbrowser = null;
+ Services.prefs.clearUserPref(PREF_WHITELISTED_HOSTNAMES);
+ while (gBrowser.tabs.length > 1) {
+ gBrowser.removeCurrentTab();
+ }
+});
+
+function testBlockedPage(window) {
+ info("Non-whitelisted pages must be blocked");
+ ok(true, "about:blocked was shown");
+}
+
+function testWhitelistedPage(window) {
+ info("Whitelisted pages must be skipped");
+ var getmeout_button = window.document.getElementById("getMeOutButton");
+ var ignorewarning_button = window.document.getElementById("ignoreWarningButton");
+ ok(!getmeout_button, "GetMeOut button not present");
+ ok(!ignorewarning_button, "IgnoreWarning button not present");
+}
+
+add_task(function* testNormalBrowsing() {
+ tabbrowser = gBrowser;
+ let tab = tabbrowser.selectedTab = tabbrowser.addTab();
+
+ info("Load a test page that's whitelisted");
+ Services.prefs.setCharPref(PREF_WHITELISTED_HOSTNAMES, "example.com,www.ItIsaTrap.org,example.net");
+ yield promiseTabLoadEvent(tab, TEST_PAGE, "load");
+ testWhitelistedPage(tab.ownerDocument.defaultView);
+
+ info("Load a test page that's no longer whitelisted");
+ Services.prefs.setCharPref(PREF_WHITELISTED_HOSTNAMES, "");
+ yield promiseTabLoadEvent(tab, TEST_PAGE, "AboutBlockedLoaded");
+ testBlockedPage(tab.ownerDocument.defaultView);
+});
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
index 6522abcbb7..fd48e7d445 100644
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -628,6 +628,8 @@
@RESPATH@/components/PresentationDeviceInfoManager.js
@RESPATH@/components/BuiltinProviders.manifest
@RESPATH@/components/TCPPresentationServer.js
+@RESPATH@/components/PresentationDataChannelSessionTransport.js
+@RESPATH@/components/PresentationDataChannelSessionTransport.manifest
; InputMethod API
@RESPATH@/components/MozKeyboard.js
diff --git a/devtools/client/locales/en-US/netmonitor.dtd b/devtools/client/locales/en-US/netmonitor.dtd
index 5cf4231f97..81a308c92b 100644
--- a/devtools/client/locales/en-US/netmonitor.dtd
+++ b/devtools/client/locales/en-US/netmonitor.dtd
@@ -120,6 +120,10 @@
- in the network details footer for the "Flash" filtering button. -->
+
+
+
diff --git a/devtools/client/netmonitor/netmonitor-view.js b/devtools/client/netmonitor/netmonitor-view.js
index 5cd19d7cb1..76a13875c7 100644
--- a/devtools/client/netmonitor/netmonitor-view.js
+++ b/devtools/client/netmonitor/netmonitor-view.js
@@ -983,7 +983,7 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
*
* @param string type
* Either "all", "html", "css", "js", "xhr", "fonts", "images", "media"
- * "flash" or "other".
+ * "flash", "ws" or "other".
*/
filterOn: function(type = "all") {
if (type === "all") {
@@ -1026,7 +1026,7 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
*
* @param string type
* Either "all", "html", "css", "js", "xhr", "fonts", "images", "media"
- * "flash" or "other".
+ * "flash", "ws" or "other".
*/
_disableFilter: function(type) {
// Remove the filter from list of active filters.
@@ -1048,7 +1048,7 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
*
* @param string type
* Either "all", "html", "css", "js", "xhr", "fonts", "images", "media"
- * "flash" or "other".
+ * "flash", "ws" or "other".
*/
_enableFilter: function(type) {
// Make sure this is a valid filter type.
@@ -1100,6 +1100,7 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
images: this.isImage,
media: this.isMedia,
flash: this.isFlash,
+ ws: this.isWS,
other: this.isOther,
freetext: this.isFreetextMatch
};
@@ -1240,8 +1241,10 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
mimeType.includes("/x-javascript"));
},
- isXHR: function({ attachment: { isXHR } }) {
- return isXHR;
+ isXHR: function(item) {
+ // Show the request it is XHR, except
+ // if the request is a WS upgrade
+ return item.attachment.isXHR && !this.isWS(item);
},
isFont: function({ attachment: { url, mimeType } }) {
@@ -1276,6 +1279,36 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
url.includes(".flv");
},
+ isWS: function({ attachment: { requestHeaders, responseHeaders } }) {
+ // Detect a websocket upgrade if request has an Upgrade header
+ // with value 'websocket'
+
+ if (!requestHeaders || !Array.isArray(requestHeaders.headers)) {
+ return false;
+ }
+
+ // Find the 'upgrade' header.
+ var upgradeHeader = requestHeaders.headers.find(header => {
+ return (header.name == "Upgrade");
+ });
+
+ // If no header found on request, check response - mainly to get
+ // something we can unit test, as it is impossible to set
+ // the Upgrade header on outgoing XHR as per the spec.
+ if (!upgradeHeader && responseHeaders && Array.isArray(responseHeaders.headers)) {
+ upgradeHeader = responseHeaders.headers.find(header => {
+ return (header.name == "Upgrade");
+ });
+ }
+
+ // Return false if there is no such header or if its value isn't 'websocket'.
+ if (!upgradeHeader || upgradeHeader.value != "websocket") {
+ return false;
+ }
+
+ return true;
+ },
+
isOther: function(e) {
return !this.isHtml(e) &&
!this.isCss(e) &&
@@ -1284,7 +1317,8 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
!this.isFont(e) &&
!this.isImage(e) &&
!this.isMedia(e) &&
- !this.isFlash(e);
+ !this.isFlash(e) &&
+ !this.isWS(e);
},
isFreetextMatch: function({ attachment: { url } }, text) {
@@ -3616,7 +3650,8 @@ PerformanceStatisticsView.prototype = {
*/
_sanitizeChartDataSource: function(items, emptyCache) {
let data = [
- "html", "css", "js", "xhr", "fonts", "images", "media", "flash", "other"
+ "html", "css", "js", "xhr", "fonts", "images", "media", "flash", "ws",
+ "other"
].map(e => ({
cached: 0,
count: 0,
@@ -3650,13 +3685,16 @@ PerformanceStatisticsView.prototype = {
} else if (RequestsMenuView.prototype.isFlash(requestItem)) {
// "flash"
type = 7;
+ } else if (RequestsMenuView.prototype.isWS(requestItem)) {
+ // "ws"
+ type = 8;
} else if (RequestsMenuView.prototype.isXHR(requestItem)) {
// Verify XHR last, to categorize other mime types in their own blobs.
// "xhr"
type = 3;
} else {
// "other"
- type = 8;
+ type = 9;
}
if (emptyCache || !responseIsFresh(details)) {
diff --git a/devtools/client/netmonitor/netmonitor.xul b/devtools/client/netmonitor/netmonitor.xul
index 8c3c7589ea..7f911e8e29 100644
--- a/devtools/client/netmonitor/netmonitor.xul
+++ b/devtools/client/netmonitor/netmonitor.xul
@@ -143,6 +143,11 @@
data-key="flash"
label="&netmonitorUI.footer.filterFlash;">
+