Commit 0899850a authored by Carsten Schoenert's avatar Carsten Schoenert
Browse files

New upstream version 91.4.0

parent 7fd56f0e
...@@ -20,7 +20,7 @@ rev = "1bb484e96ae724309e3346968e8ffd4c25e61616" ...@@ -20,7 +20,7 @@ rev = "1bb484e96ae724309e3346968e8ffd4c25e61616"
[source."https://github.com/mozilla/cubeb-pulse-rs"] [source."https://github.com/mozilla/cubeb-pulse-rs"]
git = "https://github.com/mozilla/cubeb-pulse-rs" git = "https://github.com/mozilla/cubeb-pulse-rs"
replace-with = "vendored-sources" replace-with = "vendored-sources"
rev = "c87b50aebfa088c1ad30c74819d4e9829f88b2e3" rev = "b0acd9e16c0249d61835a2d23735fbcbd8cbef64"
[source."https://github.com/mozilla/cubeb-coreaudio-rs"] [source."https://github.com/mozilla/cubeb-coreaudio-rs"]
git = "https://github.com/mozilla/cubeb-coreaudio-rs" git = "https://github.com/mozilla/cubeb-coreaudio-rs"
...@@ -97,6 +97,11 @@ git = "https://github.com/bytecodealliance/wasmtime" ...@@ -97,6 +97,11 @@ git = "https://github.com/bytecodealliance/wasmtime"
replace-with = "vendored-sources" replace-with = "vendored-sources"
rev = "824fa69756523f2b6d49029fe25de94130b1f144" rev = "824fa69756523f2b6d49029fe25de94130b1f144"
[source."https://github.com/alexcrichton/cc-rs/"]
git = "https://github.com/alexcrichton/cc-rs/"
replace-with = "vendored-sources"
rev = "b2f6b146b75299c444e05bbde50d03705c7c4b6e"
[source."https://github.com/PLSysSec/rlbox_lucet_sandbox/"] [source."https://github.com/PLSysSec/rlbox_lucet_sandbox/"]
git = "https://github.com/PLSysSec/rlbox_lucet_sandbox/" git = "https://github.com/PLSysSec/rlbox_lucet_sandbox/"
replace-with = "vendored-sources" replace-with = "vendored-sources"
......
...@@ -491,9 +491,8 @@ dependencies = [ ...@@ -491,9 +491,8 @@ dependencies = [
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.0.68" version = "1.0.71"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/alexcrichton/cc-rs/?rev=b2f6b146b75299c444e05bbde50d03705c7c4b6e#b2f6b146b75299c444e05bbde50d03705c7c4b6e"
checksum = "4a72c244c1ff497a746a7e1fb3d14bd08420ecda70c8f25c7112f2781652d787"
dependencies = [ dependencies = [
"jobserver", "jobserver",
] ]
...@@ -1028,7 +1027,7 @@ dependencies = [ ...@@ -1028,7 +1027,7 @@ dependencies = [
[[package]] [[package]]
name = "cubeb-pulse" name = "cubeb-pulse"
version = "0.3.0" version = "0.3.0"
source = "git+https://github.com/mozilla/cubeb-pulse-rs?rev=c87b50aebfa088c1ad30c74819d4e9829f88b2e3#c87b50aebfa088c1ad30c74819d4e9829f88b2e3" source = "git+https://github.com/mozilla/cubeb-pulse-rs?rev=b0acd9e16c0249d61835a2d23735fbcbd8cbef64#b0acd9e16c0249d61835a2d23735fbcbd8cbef64"
dependencies = [ dependencies = [
"cubeb-backend", "cubeb-backend",
"pulse", "pulse",
...@@ -3870,7 +3869,7 @@ dependencies = [ ...@@ -3870,7 +3869,7 @@ dependencies = [
[[package]] [[package]]
name = "pulse" name = "pulse"
version = "0.3.0" version = "0.3.0"
source = "git+https://github.com/mozilla/cubeb-pulse-rs?rev=c87b50aebfa088c1ad30c74819d4e9829f88b2e3#c87b50aebfa088c1ad30c74819d4e9829f88b2e3" source = "git+https://github.com/mozilla/cubeb-pulse-rs?rev=b0acd9e16c0249d61835a2d23735fbcbd8cbef64#b0acd9e16c0249d61835a2d23735fbcbd8cbef64"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"pulse-ffi", "pulse-ffi",
...@@ -3879,7 +3878,7 @@ dependencies = [ ...@@ -3879,7 +3878,7 @@ dependencies = [
[[package]] [[package]]
name = "pulse-ffi" name = "pulse-ffi"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/cubeb-pulse-rs?rev=c87b50aebfa088c1ad30c74819d4e9829f88b2e3#c87b50aebfa088c1ad30c74819d4e9829f88b2e3" source = "git+https://github.com/mozilla/cubeb-pulse-rs?rev=b0acd9e16c0249d61835a2d23735fbcbd8cbef64#b0acd9e16c0249d61835a2d23735fbcbd8cbef64"
dependencies = [ dependencies = [
"libc", "libc",
] ]
......
...@@ -109,3 +109,8 @@ path = "third_party/rust/failure" ...@@ -109,3 +109,8 @@ path = "third_party/rust/failure"
[patch.crates-io.prost-derive] [patch.crates-io.prost-derive]
path = "third_party/rust/prost-derive" path = "third_party/rust/prost-derive"
# Pick upstream patch for GCC 11 on armhf linux.
[patch.crates-io.cc]
git = "https://github.com/alexcrichton/cc-rs/"
rev = "b2f6b146b75299c444e05bbde50d03705c7c4b6e"
...@@ -663,20 +663,22 @@ static bool VisitDocAccessibleParentDescendantsAtTopLevelInContentProcess( ...@@ -663,20 +663,22 @@ static bool VisitDocAccessibleParentDescendantsAtTopLevelInContentProcess(
already_AddRefed<IAccessible> MsaaAccessible::GetRemoteIAccessibleFor( already_AddRefed<IAccessible> MsaaAccessible::GetRemoteIAccessibleFor(
const VARIANT& aVarChild) { const VARIANT& aVarChild) {
a11y::RootAccessible* root = LocalAcc()->RootAccessible(); a11y::RootAccessible* root = LocalAcc()->RootAccessible();
const nsTArray<DocAccessibleParent*>* remoteDocs = const nsTArray<DocAccessibleParent*>* rawRemoteDocs =
DocManager::TopLevelRemoteDocs(); DocManager::TopLevelRemoteDocs();
if (!remoteDocs) { if (!rawRemoteDocs) {
return nullptr; return nullptr;
} }
nsTArray<RefPtr<DocAccessibleParent>> remoteDocs(rawRemoteDocs->Length());
for (auto rawRemoteDoc : *rawRemoteDocs) {
remoteDocs.AppendElement(rawRemoteDoc);
}
RefPtr<IAccessible> result; RefPtr<IAccessible> result;
// We intentionally leave the call to remoteDocs->Length() inside the loop for (auto topRemoteDoc : remoteDocs) {
// condition because it is possible for reentry to occur in the call to if (topRemoteDoc->IsShutdown()) {
// GetProxiedAccessibleInSubtree() such that remoteDocs->Length() is mutated. continue;
for (size_t i = 0; i < remoteDocs->Length(); i++) { }
DocAccessibleParent* topRemoteDoc = remoteDocs->ElementAt(i);
LocalAccessible* outerDoc = topRemoteDoc->OuterDocOfRemoteBrowser(); LocalAccessible* outerDoc = topRemoteDoc->OuterDocOfRemoteBrowser();
if (!outerDoc) { if (!outerDoc) {
continue; continue;
......
...@@ -23,6 +23,12 @@ ChromeUtils.defineModuleGetter( ...@@ -23,6 +23,12 @@ ChromeUtils.defineModuleGetter(
"resource://gre/modules/E10SUtils.jsm" "resource://gre/modules/E10SUtils.jsm"
); );
ChromeUtils.defineModuleGetter(
this,
"BrowserUtils",
"resource://gre/modules/BrowserUtils.jsm"
);
class ClickHandlerChild extends JSWindowActorChild { class ClickHandlerChild extends JSWindowActorChild {
handleEvent(event) { handleEvent(event) {
if ( if (
...@@ -59,7 +65,9 @@ class ClickHandlerChild extends JSWindowActorChild { ...@@ -59,7 +65,9 @@ class ClickHandlerChild extends JSWindowActorChild {
} }
} }
let [href, node, principal] = this._hrefAndLinkNodeForClickEvent(event); let [href, node, principal] = BrowserUtils.hrefAndLinkNodeForClickEvent(
event
);
let csp = ownerDoc.csp; let csp = ownerDoc.csp;
if (csp) { if (csp) {
...@@ -133,65 +141,4 @@ class ClickHandlerChild extends JSWindowActorChild { ...@@ -133,65 +141,4 @@ class ClickHandlerChild extends JSWindowActorChild {
this.sendAsyncMessage("Content:Click", json); this.sendAsyncMessage("Content:Click", json);
} }
} }
/**
* Extracts linkNode and href for the current click target.
*
* @param event
* The click event.
* @return [href, linkNode, linkPrincipal].
*
* @note linkNode will be null if the click wasn't on an anchor
* element. This includes SVG links, because callers expect |node|
* to behave like an <a> element, which SVG links (XLink) don't.
*/
_hrefAndLinkNodeForClickEvent(event) {
let content = this.contentWindow;
function isHTMLLink(aNode) {
// Be consistent with what nsContextMenu.js does.
return (
(aNode instanceof content.HTMLAnchorElement && aNode.href) ||
(aNode instanceof content.HTMLAreaElement && aNode.href) ||
aNode instanceof content.HTMLLinkElement
);
}
let node = event.composedTarget;
while (node && !isHTMLLink(node)) {
node = node.flattenedTreeParentNode;
}
if (node) {
return [node.href, node, node.ownerDocument.nodePrincipal];
}
// If there is no linkNode, try simple XLink.
let href, baseURI;
node = event.composedTarget;
while (node && !href) {
if (
node.nodeType == content.Node.ELEMENT_NODE &&
(node.localName == "a" ||
node.namespaceURI == "http://www.w3.org/1998/Math/MathML")
) {
href =
node.getAttribute("href") ||
node.getAttributeNS("http://www.w3.org/1999/xlink", "href");
if (href) {
baseURI = node.ownerDocument.baseURIObject;
break;
}
}
node = node.flattenedTreeParentNode;
}
// In case of XLink, we don't return the node we got href from since
// callers expect <a>-like elements.
// Note: makeURI() will throw if aUri is not a valid URI.
return [
href ? Services.io.newURI(href, null, baseURI).spec : null,
null,
node && node.ownerDocument.nodePrincipal,
];
}
} }
...@@ -55,6 +55,11 @@ class ClickHandlerParent extends JSWindowActorParent { ...@@ -55,6 +55,11 @@ class ClickHandlerParent extends JSWindowActorParent {
// This is heavily based on contentAreaClick from browser.js (Bug 903016) // This is heavily based on contentAreaClick from browser.js (Bug 903016)
// The data is set up in a way to look like an Event. // The data is set up in a way to look like an Event.
let browser = this.manager.browsingContext.top.embedderElement; let browser = this.manager.browsingContext.top.embedderElement;
if (!browser) {
// Can be null if the tab disappeared by the time we got the message.
// Just bail.
return;
}
let window = browser.ownerGlobal; let window = browser.ownerGlobal;
if (!data.href) { if (!data.href) {
......
...@@ -122,8 +122,17 @@ var PointerlockFsWarning = { ...@@ -122,8 +122,17 @@ var PointerlockFsWarning = {
this._timeoutHide.start(); this._timeoutHide.start();
}, },
close() { /**
if (!this._element) { * Close the full screen or pointerlock warning.
* @param {('fullscreen-warning'|'pointerlock-warning')} elementId - Id of the
* warning element to close. If the id does not match the currently shown
* warning this is a no-op.
*/
close(elementId) {
if (!elementId) {
throw new Error("Must pass id of warning element to close");
}
if (!this._element || this._element.id != elementId) {
return; return;
} }
// Cancel any pending timeout // Cancel any pending timeout
...@@ -245,7 +254,7 @@ var PointerLock = { ...@@ -245,7 +254,7 @@ var PointerLock = {
}, },
exited() { exited() {
PointerlockFsWarning.close(); PointerlockFsWarning.close("pointerlock-warning");
}, },
}; };
...@@ -447,7 +456,7 @@ var FullScreen = { ...@@ -447,7 +456,7 @@ var FullScreen = {
// If we have a current pointerlock warning shown then hide it // If we have a current pointerlock warning shown then hide it
// before transition. // before transition.
PointerlockFsWarning.close(); PointerlockFsWarning.close("pointerlock-warning");
// If it is a remote browser, send a message to ask the content // If it is a remote browser, send a message to ask the content
// to enter fullscreen state. We don't need to do so if it is an // to enter fullscreen state. We don't need to do so if it is an
...@@ -569,7 +578,7 @@ var FullScreen = { ...@@ -569,7 +578,7 @@ var FullScreen = {
true true
); );
PointerlockFsWarning.close(); PointerlockFsWarning.close("fullscreen-warning");
gBrowser.tabContainer.removeEventListener( gBrowser.tabContainer.removeEventListener(
"TabSelect", "TabSelect",
this.exitDomFullScreen this.exitDomFullScreen
......
...@@ -118,6 +118,9 @@ let propNameWhitelist = [ ...@@ -118,6 +118,9 @@ let propNameWhitelist = [
// This variable is used from CSS embedded in JS in adjustableTitle.js // This variable is used from CSS embedded in JS in adjustableTitle.js
{ propName: "--icon-url", isFromDevTools: false }, { propName: "--icon-url", isFromDevTools: false },
// This variable is used from CSS embedded in JS in pdf.js
{ propName: "--zoom-factor", isFromDevTools: false },
]; ];
// Add suffix to stylesheets' URI so that we always load them here and // Add suffix to stylesheets' URI so that we always load them here and
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
#downloadsPanel-blockedSubview, #downloadsPanel-blockedSubview,
#downloadsPanel-mainView { #downloadsPanel-mainView {
font: caption; font: caption;
width: 35em; min-width: 37em;
padding: 0.62em; padding: 0.62em;
} }
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
<panelview id="downloadsPanel-mainView"> <panelview id="downloadsPanel-mainView">
<vbox class="panel-view-body-unscrollable"> <vbox class="panel-view-body-unscrollable">
<richlistbox id="downloadsListBox" <richlistbox id="downloadsListBox"
data-l10n-id="downloads-panel-list" data-l10n-id="downloads-panel-items"
data-l10n-attrs="style" data-l10n-attrs="style"
context="downloadsContextMenu" context="downloadsContextMenu"
onmouseover="DownloadsView.onDownloadMouseOver(event);" onmouseover="DownloadsView.onDownloadMouseOver(event);"
......
...@@ -423,50 +423,10 @@ var Policies = { ...@@ -423,50 +423,10 @@ var Policies = {
}); });
} }
if (
param.Default !== undefined ||
param.AcceptThirdParty !== undefined ||
param.RejectTracker !== undefined ||
param.Locked
) {
const ACCEPT_COOKIES = 0;
const REJECT_THIRD_PARTY_COOKIES = 1;
const REJECT_ALL_COOKIES = 2;
const REJECT_UNVISITED_THIRD_PARTY = 3;
const REJECT_TRACKER = 4;
let newCookieBehavior = ACCEPT_COOKIES;
if (param.Default !== undefined && !param.Default) {
newCookieBehavior = REJECT_ALL_COOKIES;
} else if (param.AcceptThirdParty) {
if (param.AcceptThirdParty == "never") {
newCookieBehavior = REJECT_THIRD_PARTY_COOKIES;
} else if (param.AcceptThirdParty == "from-visited") {
newCookieBehavior = REJECT_UNVISITED_THIRD_PARTY;
}
} else if (param.RejectTracker !== undefined && param.RejectTracker) {
newCookieBehavior = REJECT_TRACKER;
}
setDefaultPref(
"network.cookie.cookieBehavior",
newCookieBehavior,
param.Locked
);
setDefaultPref(
"network.cookie.cookieBehavior.pbmode",
newCookieBehavior,
param.Locked
);
}
const KEEP_COOKIES_UNTIL_EXPIRATION = 0;
const KEEP_COOKIES_UNTIL_END_OF_SESSION = 2;
if (param.ExpireAtSessionEnd !== undefined || param.Locked) { if (param.ExpireAtSessionEnd !== undefined || param.Locked) {
let newLifetimePolicy = KEEP_COOKIES_UNTIL_EXPIRATION; let newLifetimePolicy = Ci.nsICookieService.ACCEPT_NORMALLY;
if (param.ExpireAtSessionEnd) { if (param.ExpireAtSessionEnd) {
newLifetimePolicy = KEEP_COOKIES_UNTIL_END_OF_SESSION; newLifetimePolicy = Ci.nsICookieService.ACCEPT_SESSION;
} }
setDefaultPref( setDefaultPref(
...@@ -475,6 +435,68 @@ var Policies = { ...@@ -475,6 +435,68 @@ var Policies = {
param.Locked param.Locked
); );
} }
// New Cookie Behavior option takes precendence
let defaultPref = Services.prefs.getDefaultBranch("");
let newCookieBehavior = defaultPref.getIntPref(
"network.cookie.cookieBehavior"
);
let newCookieBehaviorPB = defaultPref.getIntPref(
"network.cookie.cookieBehavior.pbmode"
);
if ("Behavior" in param || "BehaviorPrivateBrowsing" in param) {
let behaviors = {
accept: Ci.nsICookieService.BEHAVIOR_ACCEPT,
"reject-foreign": Ci.nsICookieService.BEHAVIOR_REJECT_FOREIGN,
reject: Ci.nsICookieService.BEHAVIOR_REJECT,
"limit-foreign": Ci.nsICookieService.BEHAVIOR_LIMIT_FOREIGN,
"reject-tracker": Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER,
"reject-tracker-and-partition-foreign":
Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN,
};
if ("Behavior" in param) {
newCookieBehavior = behaviors[param.Behavior];
}
if ("BehaviorPrivateBrowsing" in param) {
newCookieBehaviorPB = behaviors[param.BehaviorPrivateBrowsing];
}
} else {
// Default, AcceptThirdParty, and RejectTracker are being
// deprecated in favor of Behavior. They will continue
// to be supported, though.
if (
param.Default !== undefined ||
param.AcceptThirdParty !== undefined ||
param.RejectTracker !== undefined ||
param.Locked
) {
newCookieBehavior = Ci.nsICookieService.BEHAVIOR_ACCEPT;
if (param.Default !== undefined && !param.Default) {
newCookieBehavior = Ci.nsICookieService.BEHAVIOR_REJECT;
} else if (param.AcceptThirdParty) {
if (param.AcceptThirdParty == "never") {
newCookieBehavior = Ci.nsICookieService.BEHAVIOR_REJECT_FOREIGN;
} else if (param.AcceptThirdParty == "from-visited") {
newCookieBehavior = Ci.nsICookieService.BEHAVIOR_LIMIT_FOREIGN;
}
} else if (param.RejectTracker) {
newCookieBehavior = Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER;
}
}
// With the old cookie policy, we made private browsing the same.
newCookieBehaviorPB = newCookieBehavior;
}
// We set the values no matter what just in case the policy was only used to lock.
setDefaultPref(
"network.cookie.cookieBehavior",
newCookieBehavior,
param.Locked
);
setDefaultPref(
"network.cookie.cookieBehavior.pbmode",
newCookieBehaviorPB,
param.Locked
);
}, },
}, },
...@@ -1123,6 +1145,13 @@ var Policies = { ...@@ -1123,6 +1145,13 @@ var Policies = {
locked locked
); );
} }
if ("SponsoredTopSites" in param) {
setDefaultPref(
"browser.newtabpage.activity-stream.showSponsoredTopSites",
param.SponsoredTopSites,
locked
);
}
if ("Highlights" in param) { if ("Highlights" in param) {
setDefaultPref( setDefaultPref(
"browser.newtabpage.activity-stream.feeds.section.highlights", "browser.newtabpage.activity-stream.feeds.section.highlights",
...@@ -1142,6 +1171,13 @@ var Policies = { ...@@ -1142,6 +1171,13 @@ var Policies = {
locked locked
); );
} }
if ("SponsoredPocket" in param) {
setDefaultPref(
"browser.newtabpage.activity-stream.showSponsored",
param.SponsoredPocket,
locked
);
}
if ("Snippets" in param) { if ("Snippets" in param) {
setDefaultPref( setDefaultPref(
"browser.newtabpage.activity-stream.feeds.snippets", "browser.newtabpage.activity-stream.feeds.snippets",
...@@ -1549,6 +1585,7 @@ var Policies = { ...@@ -1549,6 +1585,7 @@ var Policies = {
"geo.", "geo.",
"gfx.", "gfx.",
"intl.", "intl.",
"keyword.enabled",
"layers.", "layers.",
"layout.", "layout.",
"media.", "media.",
...@@ -1558,6 +1595,7 @@ var Policies = { ...@@ -1558,6 +1595,7 @@ var Policies = {
"print.", "print.",
"signon.", "signon.",
"spellchecker.", "spellchecker.",
"toolkit.legacyUserProfileCustomizations.stylesheets",
"ui.", "ui.",
"widget.", "widget.",
]; ];
......
...@@ -217,7 +217,18 @@ ...@@ -217,7 +217,18 @@
"Locked": { "Locked": {
"type": "boolean" "type": "boolean"
},
"Behavior": {
"type": "string",
"enum": ["accept", "reject-foreign", "reject", "limit-foreign", "reject-tracker", "reject-tracker-and-partition-foreign"]
},
"BehaviorPrivateBrowsing": {
"type": "string",
"enum": ["accept", "reject-foreign", "reject", "limit-foreign", "reject-tracker", "reject-tracker-and-partition-foreign"]
} }
} }
}, },
...@@ -526,12 +537,18 @@ ...@@ -526,12 +537,18 @@
"TopSites": { "TopSites": {
"type": "boolean" "type": "boolean"
}, },
"SponsoredTopSites": {
"type": "boolean"
},
"Highlights": { "Highlights": {
"type": "boolean" "type": "boolean"
}, },
"Pocket": { "Pocket": {
"type": "boolean" "type": "boolean"
}, },
"SponsoredPocket": {
"type": "boolean"
},
"Snippets": { "Snippets": {
"type": "boolean" "type": "boolean"
},