Merge autoland to mozilla-central. a=merge

This commit is contained in:
criss 2022-07-17 12:02:14 +03:00
Родитель e414ed367f 9abebe821e
Коммит 3cb31675ae
3 изменённых файлов: 19 добавлений и 15 удалений

Просмотреть файл

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Web Compatibility Interventions",
"description": "Urgent post-release fixes for web compatibility.",
"version": "103.11.0",
"version": "103.12.0",
"applications": {
"gecko": {
"id": "webcompat@mozilla.org",

Просмотреть файл

@ -163,7 +163,11 @@ if (window[window.GoogleAnalyticsObject || "ga"]?.loaded === undefined) {
const dl = window.dataLayer;
if (Array.isArray(dl)) {
const push = o => {
const oldPush = dl.push;
const push = function(o) {
if (oldPush) {
return oldPush.apply(dl, arguments);
}
setTimeout(() => run(o?.eventCallback), 1);
return true;
};

Просмотреть файл

@ -3012,15 +3012,13 @@ struct LoadNativeMenusListener {
nsCOMPtr<nsIWidget> mParentWindow;
};
static bool sHiddenWindowLoadedNativeMenus = true;
static bool sHiddenWindowLoadedNativeMenus = false;
static nsTArray<LoadNativeMenusListener> sLoadNativeMenusListeners;
static void BeginLoadNativeMenus(Document* aDoc, nsIWidget* aParentWindow);
static void LoadNativeMenus(Document* aDoc, nsIWidget* aParentWindow) {
if (gfxPlatform::IsHeadless()) {
return;
}
MOZ_ASSERT(!gfxPlatform::IsHeadless());
// Find the menubar tag (if there is more than one, we ignore all but
// the first).
@ -3191,15 +3189,17 @@ AppWindow::OnStateChange(nsIWebProgress* aProgress, nsIRequest* aRequest,
// Find the Menubar DOM and Load the menus, hooking them up to the loaded
// commands
///////////////////////////////
nsCOMPtr<nsIContentViewer> cv;
mDocShell->GetContentViewer(getter_AddRefs(cv));
if (cv) {
RefPtr<Document> menubarDoc = cv->GetDocument();
if (menubarDoc) {
if (mIsHiddenWindow || sHiddenWindowLoadedNativeMenus) {
BeginLoadNativeMenus(menubarDoc, mWindow);
} else {
sLoadNativeMenusListeners.EmplaceBack(menubarDoc, mWindow);
if (!gfxPlatform::IsHeadless()) {
nsCOMPtr<nsIContentViewer> cv;
mDocShell->GetContentViewer(getter_AddRefs(cv));
if (cv) {
RefPtr<Document> menubarDoc = cv->GetDocument();
if (menubarDoc) {
if (mIsHiddenWindow || sHiddenWindowLoadedNativeMenus) {
BeginLoadNativeMenus(menubarDoc, mWindow);
} else {
sLoadNativeMenusListeners.EmplaceBack(menubarDoc, mWindow);
}
}
}
}