Commit 66755b48 authored by Carsten Schoenert's avatar Carsten Schoenert
Browse files

New upstream version 91.3.0

parent 12a433a7
......@@ -12,11 +12,6 @@ git = "https://github.com/msirringhaus/minidump_writer_linux.git"
replace-with = "vendored-sources"
rev = "85551909b95a5cf553a85dbcddfa5f117cfbbe0e"
[source."https://github.com/mozilla/neqo"]
git = "https://github.com/mozilla/neqo"
replace-with = "vendored-sources"
tag = "v0.4.28"
[source."https://github.com/mozilla/mp4parse-rust"]
git = "https://github.com/mozilla/mp4parse-rust"
replace-with = "vendored-sources"
......@@ -92,6 +87,11 @@ git = "https://github.com/gfx-rs/gfx"
replace-with = "vendored-sources"
rev = "27a1dae3796d33d23812f2bb8c7e3b5aea18b521"
[source."https://github.com/ddragana/neqo/"]
branch = "pr_1247"
git = "https://github.com/ddragana/neqo/"
replace-with = "vendored-sources"
[source."https://github.com/bytecodealliance/wasmtime"]
git = "https://github.com/bytecodealliance/wasmtime"
replace-with = "vendored-sources"
......
......@@ -239,7 +239,6 @@ jobs:
- mozilla-central
- mozilla-beta
- mozilla-release
- mozilla-esr78
- mozilla-esr91
when:
- {weekday: 'Monday', hour: 8, minute: 0}
......
......@@ -2770,7 +2770,7 @@ dependencies = [
"libc",
"libloading 0.5.2",
"lucet-module-wasmsbx",
"memoffset",
"memoffset 0.5.6",
"nix",
"num-derive",
"num-traits",
......@@ -3231,7 +3231,7 @@ dependencies = [
[[package]]
name = "neqo-common"
version = "0.4.28"
source = "git+https://github.com/mozilla/neqo?tag=v0.4.28#c3d909e40d2ee68e2937b7dac1831a27520bf460"
source = "git+https://github.com/ddragana/neqo/?branch=pr_1247#0dc6eb8a337e1402172f83d9c999c1b9166d1aca"
dependencies = [
"chrono",
"env_logger",
......@@ -3244,7 +3244,7 @@ dependencies = [
[[package]]
name = "neqo-crypto"
version = "0.4.28"
source = "git+https://github.com/mozilla/neqo?tag=v0.4.28#c3d909e40d2ee68e2937b7dac1831a27520bf460"
source = "git+https://github.com/ddragana/neqo/?branch=pr_1247#0dc6eb8a337e1402172f83d9c999c1b9166d1aca"
dependencies = [
"bindgen",
"log",
......@@ -3257,7 +3257,7 @@ dependencies = [
[[package]]
name = "neqo-http3"
version = "0.4.28"
source = "git+https://github.com/mozilla/neqo?tag=v0.4.28#c3d909e40d2ee68e2937b7dac1831a27520bf460"
source = "git+https://github.com/ddragana/neqo/?branch=pr_1247#0dc6eb8a337e1402172f83d9c999c1b9166d1aca"
dependencies = [
"log",
"neqo-common",
......@@ -3271,7 +3271,7 @@ dependencies = [
[[package]]
name = "neqo-qpack"
version = "0.4.28"
source = "git+https://github.com/mozilla/neqo?tag=v0.4.28#c3d909e40d2ee68e2937b7dac1831a27520bf460"
source = "git+https://github.com/ddragana/neqo/?branch=pr_1247#0dc6eb8a337e1402172f83d9c999c1b9166d1aca"
dependencies = [
"lazy_static",
"log",
......@@ -3285,7 +3285,7 @@ dependencies = [
[[package]]
name = "neqo-transport"
version = "0.4.28"
source = "git+https://github.com/mozilla/neqo?tag=v0.4.28#c3d909e40d2ee68e2937b7dac1831a27520bf460"
source = "git+https://github.com/ddragana/neqo/?branch=pr_1247#0dc6eb8a337e1402172f83d9c999c1b9166d1aca"
dependencies = [
"indexmap",
"lazy_static",
......@@ -5506,6 +5506,7 @@ dependencies = [
"dwrote",
"etagere",
"euclid",
"foreign-types",
"freetype",
"fxhash",
"gleam",
......
......@@ -770,21 +770,14 @@ class ContextMenuChild extends JSWindowActorChild {
// Set the node to containing <video>/<audio>/<embed>/<object> if the node
// is in the videocontrols UA Widget.
if (this.contentWindow.ShadowRoot) {
let n = node;
while (n) {
if (n instanceof this.contentWindow.ShadowRoot) {
if (
n.host instanceof this.contentWindow.HTMLMediaElement ||
n.host instanceof this.contentWindow.HTMLEmbedElement ||
n.host instanceof this.contentWindow.HTMLObjectElement
) {
node = n.host;
break;
}
break;
}
n = n.parentNode;
if (node.containingShadowRoot?.isUAWidget()) {
const host = node.containingShadowRoot.host;
if (
host instanceof this.contentWindow.HTMLMediaElement ||
host instanceof this.contentWindow.HTMLEmbedElement ||
host instanceof this.contentWindow.HTMLObjectElement
) {
node = host;
}
}
......@@ -1156,7 +1149,7 @@ class ContextMenuChild extends JSWindowActorChild {
}
}
elem = elem.parentNode;
elem = elem.flattenedTreeParentNode;
}
// See if the user clicked in a frame.
......
......@@ -11,8 +11,14 @@ const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
class DOMFullscreenChild extends JSWindowActorChild {
receiveMessage(aMessage) {
let window = this.contentWindow;
let windowUtils = window && window.windowUtils;
if (!window) {
if (!aMessage.data.remoteFrameBC) {
this.sendAsyncMessage("DOMFullscreen:Exit", {});
}
return;
}
let windowUtils = window.windowUtils;
if (!windowUtils) {
return;
}
......
......@@ -10,11 +10,59 @@
var EXPORTED_SYMBOLS = ["FormValidationParent"];
ChromeUtils.defineModuleGetter(
this,
"BrowserWindowTracker",
"resource:///modules/BrowserWindowTracker.jsm"
);
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
class PopupShownObserver {
_weakContext = null;
constructor(browsingContext) {
this._weakContext = Cu.getWeakReference(browsingContext);
}
observe(subject, topic, data) {
let ctxt = this._weakContext.get();
let actor = ctxt.currentWindowGlobal?.getExistingActor("FormValidation");
if (!actor) {
Services.obs.removeObserver(this, "popup-shown");
return;
}
// If any panel besides ourselves shows, hide ourselves again.
if (topic == "popup-shown" && subject != actor._panel) {
actor._hidePopup();
}
}
QueryInterface = ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference,
]);
}
class FormValidationParent extends JSWindowActorParent {
constructor() {
super();
this._panel = null;
this._obs = null;
}
static hasOpenPopups() {
for (let win of BrowserWindowTracker.orderedWindows) {
let popups = win.document.querySelectorAll("panel,menupopup");
for (let popup of popups) {
let { state } = popup;
if (state == "open" || state == "showing") {
return true;
}
}
}
return false;
}
/*
......@@ -23,6 +71,7 @@ class FormValidationParent extends JSWindowActorParent {
uninit() {
this._panel = null;
this._obs = null;
}
hidePopup() {
......@@ -47,6 +96,10 @@ class FormValidationParent extends JSWindowActorParent {
return;
}
if (FormValidationParent.hasOpenPopups()) {
return;
}
this._showPopup(data);
break;
case "FormValidation:HidePopup":
......@@ -55,10 +108,6 @@ class FormValidationParent extends JSWindowActorParent {
}
}
observe(aSubject, aTopic, aData) {
this._hidePopup();
}
handleEvent(aEvent) {
switch (aEvent.type) {
case "FullZoomChange":
......@@ -78,11 +127,13 @@ class FormValidationParent extends JSWindowActorParent {
_onPopupHiding(aEvent) {
aEvent.originalTarget.removeEventListener("popuphiding", this, true);
Services.obs.removeObserver(this._obs, "popup-shown");
let tabBrowser = aEvent.originalTarget.ownerGlobal.gBrowser;
tabBrowser.selectedBrowser.removeEventListener("scroll", this, true);
tabBrowser.selectedBrowser.removeEventListener("FullZoomChange", this);
tabBrowser.selectedBrowser.removeEventListener("TextZoomChange", this);
this._obs = null;
this._panel = null;
}
......@@ -110,6 +161,9 @@ class FormValidationParent extends JSWindowActorParent {
if (!previouslyShown) {
// Cleanup after the popup is hidden
this._panel.addEventListener("popuphiding", this, true);
// Hide ourselves if other popups shown
this._obs = new PopupShownObserver(this.browsingContext);
Services.obs.addObserver(this._obs, "popup-shown", true);
// Hide if the user scrolls the page
tabBrowser.selectedBrowser.addEventListener("scroll", this, true);
......
......@@ -8989,16 +8989,17 @@ class TabDialogBox {
modalType === Ci.nsIPrompt.MODAL_TYPE_CONTENT
? this.getContentDialogManager()
: this._tabDialogManager;
let hasDialogs =
let hasDialogs = () =>
this._tabDialogManager.hasDialogs ||
this._contentDialogManager?.hasDialogs;
if (!hasDialogs) {
if (!hasDialogs()) {
this._onFirstDialogOpen();
}
let closingCallback = event => {
if (!hasDialogs) {
if (!hasDialogs()) {
this._onLastDialogClose();
}
......
......@@ -174,71 +174,50 @@ add_task(async function test_plaintext() {
]);
});
const kLinkItems = [
"context-openlinkintab",
true,
...(hasContainers ? ["context-openlinkinusercontext-menu", true] : []),
// We need a blank entry here because the containers submenu is
// dynamically generated with no ids.
...(hasContainers ? ["", null] : []),
"context-openlink",
true,
"context-openlinkprivate",
true,
"---",
null,
"context-bookmarklink",
true,
"context-savelink",
true,
...(hasPocket ? ["context-savelinktopocket", true] : []),
"context-copylink",
true,
"---",
null,
"context-searchselect",
true,
"context-searchselect-private",
true,
];
add_task(async function test_link() {
await test_contextmenu("#test-link", [
"context-openlinkintab",
true,
...(hasContainers ? ["context-openlinkinusercontext-menu", true] : []),
// We need a blank entry here because the containers submenu is
// dynamically generated with no ids.
...(hasContainers ? ["", null] : []),
"context-openlink",
true,
"context-openlinkprivate",
true,
"---",
null,
"context-bookmarklink",
true,
"context-savelink",
true,
...(hasPocket ? ["context-savelinktopocket", true] : []),
"context-copylink",
true,
"---",
null,
"context-searchselect",
true,
"context-searchselect-private",
true,
]);
await test_contextmenu("#test-link", kLinkItems);
});
add_task(async function test_link_in_shadow_dom() {
await test_contextmenu(
"#shadow-host",
[
"context-openlinkintab",
true,
...(hasContainers ? ["context-openlinkinusercontext-menu", true] : []),
// We need a blank entry here because the containers submenu is
// dynamically generated with no ids.
...(hasContainers ? ["", null] : []),
"context-openlink",
true,
"context-openlinkprivate",
true,
"---",
null,
"context-bookmarklink",
true,
"context-savelink",
true,
...(hasPocket ? ["context-savelinktopocket", true] : []),
"context-copylink",
true,
"---",
null,
"context-searchselect",
true,
"context-searchselect-private",
true,
],
{
offsetX: 6,
offsetY: 6,
}
);
await test_contextmenu("#shadow-host", kLinkItems, {
offsetX: 6,
offsetY: 6,
});
});
add_task(async function test_link_over_shadow_dom() {
await test_contextmenu("#shadow-host-in-link", kLinkItems, {
offsetX: 6,
offsetY: 6,
});
});
add_task(async function test_mailto() {
......
......@@ -9,12 +9,14 @@ Browser context menu subtest.
<div id="test-text">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div>
<a id="test-link" href="http://mozilla.com">Click the monkey!</a>
<div id="shadow-host"></div>
<a href="http://mozilla.com" style="display: block">
<span id="shadow-host-in-link"></span>
</a>
<script>
// Create the shadow DOM in case shadow DOM is enabled.
if ("ShadowRoot" in this) {
var sr = document.getElementById("shadow-host").attachShadow({mode: "closed"});
sr.innerHTML = "<a href='http://mozilla.com'>Click the monkey!</a>";
}
document.getElementById("shadow-host").attachShadow({ mode: "closed" }).innerHTML =
"<a href='http://mozilla.com'>Click the monkey!</a>";
document.getElementById("shadow-host-in-link").attachShadow({ mode: "closed" }).innerHTML =
"<span>Click the monkey!</span>";
</script>
<a id="test-mailto" href="mailto:codemonkey@mozilla.com">Mail the monkey!</a><br>
<input id="test-input"><br>
......
......@@ -20,3 +20,5 @@ skip-if =
os == 'mac' # Bug 1568570
[browser_fullscreen_api_fission.js]
support-files = fullscreen.html FullscreenFrame.jsm
[browser_fullscreen_warning.js]
support-files = fullscreen.html
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
add_task(async function test_fullscreen_display_none() {
await SpecialPowers.pushPrefEnv({
set: [
["full-screen-api.enabled", true],
["full-screen-api.allow-trusted-requests-only", false],
],
});
await BrowserTestUtils.withNewTab(
{
gBrowser,
url: `data:text/html,
<html>
<head>
<meta charset="utf-8"/>
<title>Fullscreen Test</title>
</head>
<body id="body">
<iframe
src="https://example.org/browser/browser/base/content/test/fullscreen/fullscreen.html"
hidden
allowfullscreen></iframe>
</body>
</html>`,
},
async function(browser) {
let warning = document.getElementById("fullscreen-warning");
let warningShownPromise = BrowserTestUtils.waitForAttribute(
"onscreen",
warning,
"true"
);
// Enter fullscreen
await SpecialPowers.spawn(browser, [], async () => {
let frame = content.document.querySelector("iframe");
frame.focus();
await SpecialPowers.spawn(frame, [], () => {
content.document.getElementById("request").click();
});
});
await warningShownPromise;
ok(true, "Fullscreen warning shown");
// Exit fullscreen
let exitFullscreenPromise = BrowserTestUtils.waitForEvent(
document,
"fullscreenchange",
false,
() => !document.fullscreenElement
);
document.getElementById("fullscreen-exit-button").click();
await exitFullscreenPromise;
}
);
});
......@@ -240,6 +240,15 @@ add_task(async function navigate_around() {
min: 49,
max: 55,
};
// This was previously being read in the content process, but
// bug 1725573 moved it into the parent process. We also block
// the main thread on requests to the X server, which is likely
// more problematic than the pref read. These issues are covered
// by https://bugzilla.mozilla.org/show_bug.cgi?id=1729080
knownProblematicPrefs["gfx.color_management.display_profile"] = {
min: 49,
max: 50,
};
} else if (AppConstants.platform == "win") {
// The following 2 graphics prefs are covered by
// https://bugzilla.mozilla.org/show_bug.cgi?id=1639497
......
......@@ -19,7 +19,6 @@ var gExceptionPaths = [
"resource://app/defaults/settings/blocklists/",
"resource://app/defaults/settings/security-state/",
"resource://app/defaults/settings/main/",
"resource://app/defaults/settings/pinning/",
"resource://app/defaults/preferences/",
"resource://gre/modules/commonjs/",
"resource://gre/defaults/pref/",
......
......@@ -83,4 +83,3 @@ skip-if =
[browser_webrtc_hooks.js]
[browser_devices_get_user_media_queue_request.js]
[browser_WebrtcGlobalInformation.js]
skip-if = (os == "win" && debug) # bug 1651716
......@@ -83,6 +83,9 @@ let openTabInNewProcess = async file => {
};
let killTabProcess = async tab => {
await SpecialPowers.spawn(tab.linkedBrowser, [], () => {
ChromeUtils.privateNoteIntentionalCrash();
});
ProcessTools.kill(tab.linkedBrowser.frameLoader.remoteTab.osPid);
};
......
......@@ -121,7 +121,7 @@ class AboutLoginsChild extends JSWindowActorChild {
break;
}
case "AboutLoginsCopyLoginDetail": {
ClipboardHelper.copyString(event.detail);
ClipboardHelper.copyString(event.detail, ClipboardHelper.Sensitive);
break;
}
case "AboutLoginsCreateLogin": {
......
......@@ -48,6 +48,7 @@
/* Override common.inc.css properties */
margin: 0;
border: 0;
border-radius: 0;
text-align: start;
min-height: initial;
......
......@@ -1136,6 +1136,11 @@ var Policies = {
param.Pocket,
locked
);
setDefaultPref(
"browser.newtabpage.activity-stream.feeds.section.topstories",
param.Pocket,
locked
);
}
if ("Snippets" in param) {
setDefaultPref(
......
......@@ -66,3 +66,52 @@ add_task(async function test_firefox_home_with_policy() {
});
BrowserTestUtils.removeTab(tab);
});
add_task(async function test_firefoxhome_preferences_set() {
await SpecialPowers.pushPrefEnv({
set: [
[
"browser.newtabpage.activity-stream.discoverystream.endpointSpocsClear",
"",
],
],
});
await setupPolicyEngineWithJson({
policies: {
FirefoxHome: {
Search: false,
TopSites: false,
Highlights: false,
Pocket: false,
Snippets: false,
Locked: true,
},
},
});
await BrowserTestUtils.withNewTab("about:preferences#home", async browser => {
let data = {
Search: "browser.newtabpage.activity-stream.showSearch",
TopSites: "browser.newtabpage.activity-stream.feeds.topsites",
Highlights: "browser.newtabpage.activity-stream.feeds.section.highlights",
Pocket: "browser.newtabpage.activity-stream.feeds.section.topstories",
Snippets: "browser.newtabpage.activity-stream.feeds.snippets",
};
for (let [section, preference] of Object.entries(data)) {
is(
browser.contentDocument.querySelector(
`checkbox[preference='${preference}']`
).disabled,
true,
`${section} checkbox should be disabled`
);
}
});
await setupPolicyEngineWithJson({
policies: {
FirefoxHome: {},
},
});
await SpecialPowers.popPrefEnv();
});