diff -Nru thunderbird-68.4.1+build1/accessible/tests/mochitest/events/docload/test_docload_root.html thunderbird-68.5.0+build1/accessible/tests/mochitest/events/docload/test_docload_root.html --- thunderbird-68.4.1+build1/accessible/tests/mochitest/events/docload/test_docload_root.html 2020-01-10 11:45:23.000000000 +0000 +++ thunderbird-68.5.0+build1/accessible/tests/mochitest/events/docload/test_docload_root.html 2020-02-11 06:44:14.000000000 +0000 @@ -36,7 +36,12 @@ } } - this.eventSeq = [ new invokerChecker(EVENT_REORDER, gRootAcc) ]; + this.eventSeq = [ + new invokerChecker(EVENT_REORDER, gRootAcc), + // We use a function here to get the target because gDialog isn't set + // yet, but it will be when the function is called. + new invokerChecker(EVENT_FOCUS, () => gDialog.document) + ]; this.invoke = () => (gDialog = window.openDialog(aURL)); diff -Nru thunderbird-68.4.1+build1/browser/app/blocklist.xml thunderbird-68.5.0+build1/browser/app/blocklist.xml --- thunderbird-68.4.1+build1/browser/app/blocklist.xml 2020-01-10 11:46:46.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/app/blocklist.xml 2020-02-11 06:45:47.000000000 +0000 @@ -1,5 +1,5 @@ - + @@ -3440,6 +3440,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3475,12 +3651,12 @@ https://get.adobe.com/flashplayer/ - + https://get.adobe.com/flashplayer/ - + diff -Nru thunderbird-68.4.1+build1/browser/base/content/browser-addons.js thunderbird-68.5.0+build1/browser/base/content/browser-addons.js --- thunderbird-68.4.1+build1/browser/base/content/browser-addons.js 2020-01-10 11:45:23.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/base/content/browser-addons.js 2020-02-11 06:44:14.000000000 +0000 @@ -524,6 +524,16 @@ [brandShortName] ); + if (Services.policies) { + let extensionSettings = Services.policies.getExtensionSettings("*"); + if ( + extensionSettings && + "blocked_install_message" in extensionSettings + ) { + messageString += " " + extensionSettings.blocked_install_message; + } + } + options.removeOnDismissal = true; options.persistent = false; diff -Nru thunderbird-68.4.1+build1/browser/base/content/browser.js thunderbird-68.5.0+build1/browser/base/content/browser.js --- thunderbird-68.4.1+build1/browser/base/content/browser.js 2020-01-10 11:46:46.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/base/content/browser.js 2020-02-11 06:44:14.000000000 +0000 @@ -2103,6 +2103,10 @@ Services.obs.notifyObservers(window, "browser-delayed-startup-finished"); TelemetryTimestamps.add("delayedStartupFinished"); + + if (!Services.policies.isAllowed("hideShowMenuBar")) { + document.getElementById("toolbar-menubar").removeAttribute("toolbarname"); + } }, _setInitialFocus() { diff -Nru thunderbird-68.4.1+build1/browser/base/content/popup-notifications.inc thunderbird-68.5.0+build1/browser/base/content/popup-notifications.inc --- thunderbird-68.4.1+build1/browser/base/content/popup-notifications.inc 2020-01-10 11:45:23.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/base/content/popup-notifications.inc 2020-02-11 06:44:14.000000000 +0000 @@ -117,18 +117,3 @@ - - diff -Nru thunderbird-68.4.1+build1/browser/components/enterprisepolicies/Policies.jsm thunderbird-68.5.0+build1/browser/components/enterprisepolicies/Policies.jsm --- thunderbird-68.4.1+build1/browser/components/enterprisepolicies/Policies.jsm 2020-01-10 11:46:46.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/components/enterprisepolicies/Policies.jsm 2020-02-11 06:44:14.000000000 +0000 @@ -262,30 +262,23 @@ log.error(`Unable to add certificate - ${certfile.path}`); } } - let now = Date.now() / 1000; if (cert) { - gCertDB.asyncVerifyCertAtTime( - cert, - 0x0008 /* certificateUsageSSLCA */, - 0, - null, - now, - (aPRErrorCode, aVerifiedChain, aHasEVPolicy) => { - if (aPRErrorCode == Cr.NS_OK) { - // Certificate is already installed. - return; - } - try { - gCertDB.addCert(certFile, "CT,CT,"); - } catch (e) { - // It might be PEM instead of DER. - gCertDB.addCertFromBase64( - pemToBase64(certFile), - "CT,CT," - ); - } - } - ); + if ( + gCertDB.isCertTrusted( + cert, + Ci.nsIX509Cert.CA_CERT, + Ci.nsIX509CertDB.TRUSTED_SSL + ) + ) { + // Certificate is already installed. + return; + } + try { + gCertDB.addCert(certFile, "CT,CT,"); + } catch (e) { + // It might be PEM instead of DER. + gCertDB.addCertFromBase64(pemToBase64(certFile), "CT,CT,"); + } } }; reader.readAsBinaryString(file); @@ -583,18 +576,53 @@ DisplayMenuBar: { onBeforeUIStartup(manager, param) { - let value = (!param).toString(); - // This policy is meant to change the default behavior, not to force it. - // If this policy was alreay applied and the user chose to re-hide the - // menu bar, do not show it again. - runOncePerModification("displayMenuBar", value, () => { + let value; + if ( + typeof param === "boolean" || + param == "default-on" || + param == "default-off" + ) { + switch (param) { + case "default-on": + value = "false"; + break; + case "default-off": + value = "true"; + break; + default: + value = (!param).toString(); + break; + } + // This policy is meant to change the default behavior, not to force it. + // If this policy was already applied and the user chose to re-hide the + // menu bar, do not show it again. + runOncePerModification("displayMenuBar", value, () => { + gXulStore.setValue( + BROWSER_DOCUMENT_URL, + "toolbar-menubar", + "autohide", + value + ); + }); + } else { + switch (param) { + case "always": + value = "false"; + break; + case "never": + // Make sure Alt key doesn't show the menubar + setAndLockPref("ui.key.menuAccessKeyFocuses", false); + value = "true"; + break; + } gXulStore.setValue( BROWSER_DOCUMENT_URL, "toolbar-menubar", "autohide", value ); - }); + manager.disallowFeature("hideShowMenuBar"); + } }, }, @@ -658,6 +686,9 @@ param.Locked ); } + if ("Exceptions" in param) { + addAllowDenyPermissions("trackingprotection", param.Exceptions); + } }, }, diff -Nru thunderbird-68.4.1+build1/browser/components/enterprisepolicies/schemas/policies-schema.json thunderbird-68.5.0+build1/browser/components/enterprisepolicies/schemas/policies-schema.json --- thunderbird-68.4.1+build1/browser/components/enterprisepolicies/schemas/policies-schema.json 2020-01-10 11:46:46.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/components/enterprisepolicies/schemas/policies-schema.json 2020-02-11 06:44:14.000000000 +0000 @@ -277,7 +277,8 @@ }, "DisplayMenuBar": { - "type": "boolean" + "type": ["boolean", "string"], + "enum": ["always", "never", "default-on", "default-off"] }, "DNSOverHTTPS": { @@ -329,6 +330,13 @@ }, "Fingerprinting": { "type": "boolean" + }, + "Exceptions": { + "type": "array", + "strict": false, + "items": { + "type": "origin" + } } } }, @@ -837,6 +845,12 @@ }, "widget.content.gtk-theme-override": { "type": "string" + }, + "dom.xmldocument.load.enabled": { + "type": "boolean" + }, + "dom.xmldocument.async.enabled": { + "type": "boolean" } } }, diff -Nru thunderbird-68.4.1+build1/browser/components/enterprisepolicies/tests/browser/browser_policy_display_menu.js thunderbird-68.5.0+build1/browser/components/enterprisepolicies/tests/browser/browser_policy_display_menu.js --- thunderbird-68.4.1+build1/browser/components/enterprisepolicies/tests/browser/browser_policy_display_menu.js 2020-01-10 11:46:46.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/components/enterprisepolicies/tests/browser/browser_policy_display_menu.js 2020-02-11 06:44:14.000000000 +0000 @@ -3,24 +3,82 @@ "use strict"; -add_task(async function setup() { +add_task(async function test_menu_shown_boolean() { await setupPolicyEngineWithJson({ policies: { DisplayMenuBar: true, }, }); + + // Since testing will apply the policy after the browser has already started, + // we will need to open a new window to actually see the menu bar + let newWin = await BrowserTestUtils.openNewBrowserWindow(); + let menubar = newWin.document.getElementById("toolbar-menubar"); + is( + menubar.getAttribute("autohide"), + "false", + "The menu bar should not be hidden" + ); + + await BrowserTestUtils.closeWindow(newWin); }); -add_task(async function test_menu_shown() { +add_task(async function test_menu_shown_string() { + await setupPolicyEngineWithJson({ + policies: { + DisplayMenuBar: "default-on", + }, + }); + // Since testing will apply the policy after the browser has already started, // we will need to open a new window to actually see the menu bar let newWin = await BrowserTestUtils.openNewBrowserWindow(); - let menuBar = newWin.document.getElementById("toolbar-menubar"); + let menubar = newWin.document.getElementById("toolbar-menubar"); is( - menuBar.getAttribute("autohide"), + menubar.getAttribute("autohide"), "false", "The menu bar should not be hidden" ); await BrowserTestUtils.closeWindow(newWin); }); + +add_task(async function test_menubar_on() { + await setupPolicyEngineWithJson({ + policies: { + DisplayMenuBar: "always", + }, + }); + + let newWin = await BrowserTestUtils.openNewBrowserWindow(); + let menubar = newWin.document.getElementById("toolbar-menubar"); + is( + menubar.hasAttribute("inactive"), + false, + "Menu bar should not have inactive" + ); + is( + menubar.hasAttribute("toolbarname"), + false, + "Menu bar should not have a toolbarname" + ); + await BrowserTestUtils.closeWindow(newWin); +}); + +add_task(async function test_menubar_off() { + await setupPolicyEngineWithJson({ + policies: { + DisplayMenuBar: "never", + }, + }); + + let newWin = await BrowserTestUtils.openNewBrowserWindow(); + let menubar = newWin.document.getElementById("toolbar-menubar"); + is(menubar.hasAttribute("inactive"), true, "Menu bar should have inactive"); + is( + menubar.hasAttribute("toolbarname"), + false, + "Menu bar should not have a toolbarname" + ); + await BrowserTestUtils.closeWindow(newWin); +}); diff -Nru thunderbird-68.4.1+build1/browser/components/enterprisepolicies/tests/browser/browser_policy_extensionsettings.js thunderbird-68.5.0+build1/browser/components/enterprisepolicies/tests/browser/browser_policy_extensionsettings.js --- thunderbird-68.4.1+build1/browser/components/enterprisepolicies/tests/browser/browser_policy_extensionsettings.js 2020-01-10 11:45:24.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/components/enterprisepolicies/tests/browser/browser_policy_extensionsettings.js 2020-02-11 06:44:14.000000000 +0000 @@ -65,6 +65,7 @@ ExtensionSettings: { "*": { install_sources: ["http://blocks.other.install.sources/*"], + blocked_install_message: "blocked_install_message", }, }, }, @@ -81,7 +82,12 @@ await ContentTask.spawn(tab.linkedBrowser, {}, () => { content.document.getElementById("policytest_installtrigger").click(); }); - await popupPromise; + let popup = await popupPromise; + let description = popup.querySelector(".popup-notification-description"); + ok( + description.textContent.endsWith("blocked_install_message"), + "Custom install message present" + ); BrowserTestUtils.removeTab(tab); }); diff -Nru thunderbird-68.4.1+build1/browser/components/enterprisepolicies/tests/xpcshell/test_permissions.js thunderbird-68.5.0+build1/browser/components/enterprisepolicies/tests/xpcshell/test_permissions.js --- thunderbird-68.4.1+build1/browser/components/enterprisepolicies/tests/xpcshell/test_permissions.js 2020-01-10 11:46:46.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/components/enterprisepolicies/tests/xpcshell/test_permissions.js 2020-02-11 06:44:14.000000000 +0000 @@ -210,3 +210,22 @@ Ci.nsIPermissionManager.EXPIRE_SESSION ); }); + +add_task(async function test_setup_trackingprotection() { + await setupPolicyEngineWithJson({ + policies: { + EnableTrackingProtection: { + Exceptions: ["https://www.allow.com"], + }, + }, + }); + equal( + Services.policies.status, + Ci.nsIEnterprisePolicies.ACTIVE, + "Engine is active" + ); +}); + +add_task(async function test_trackingprotection() { + checkPermission("allow.com", "ALLOW", "trackingprotection"); +}); diff -Nru thunderbird-68.4.1+build1/browser/components/extensions/test/browser/browser_ext_pageAction_context.js thunderbird-68.5.0+build1/browser/components/extensions/test/browser/browser_ext_pageAction_context.js --- thunderbird-68.4.1+build1/browser/components/extensions/test/browser/browser_ext_pageAction_context.js 2020-01-10 11:45:24.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/components/extensions/test/browser/browser_ext_pageAction_context.js 2020-02-11 06:44:14.000000000 +0000 @@ -225,6 +225,11 @@ }); add_task(async function testMultipleWindows() { + // Disable newtab preloading, so that the tabs.create call below will always + // trigger a new load that can be detected by webNavigation.onCompleted. + await SpecialPowers.pushPrefEnv({ + set: [["browser.newtab.preload", false]], + }); await runTests({ manifest: { page_action: { @@ -232,6 +237,7 @@ default_popup: "default.html", default_title: "Default Title", }, + permissions: ["webNavigation"], }, files: { @@ -253,10 +259,28 @@ }, ]; + function promiseWebNavigationCompleted(url) { + return new Promise(resolve => { + // The pageAction visibility state is reset when the location changes. + // The webNavigation.onCompleted event is triggered when that happens. + browser.webNavigation.onCompleted.addListener( + function listener() { + browser.webNavigation.onCompleted.removeListener(listener); + resolve(); + }, + { + url: [{ urlEquals: url }], + } + ); + }); + } + return [ async expect => { browser.test.log("Create a new tab, expect hidden pageAction."); + let promise = promiseWebNavigationCompleted("about:newtab"); let tab = await browser.tabs.create({ active: true }); + await promise; tabs.push(tab.id); expect(null); }, @@ -313,6 +337,7 @@ ]; }, }); + await SpecialPowers.popPrefEnv(); }); add_task(async function testNavigationClearsData() { diff -Nru thunderbird-68.4.1+build1/browser/components/newtab/test/browser/browser_asrouter_targeting.js thunderbird-68.5.0+build1/browser/components/newtab/test/browser/browser_asrouter_targeting.js --- thunderbird-68.4.1+build1/browser/components/newtab/test/browser/browser_asrouter_targeting.js 2020-01-10 11:45:24.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/components/newtab/test/browser/browser_asrouter_targeting.js 2020-02-11 06:44:15.000000000 +0000 @@ -362,6 +362,12 @@ }); add_task(async function check_pinned_sites() { + // Fresh profiles come with an empty set of pinned websites (pref doesn't + // exist). Search shortcut topsites make this test more complicated because + // the feature pins a new website on startup. Behaviour can vary when running + // with --verify so it's more predictable to clear pins entirely. + Services.prefs.clearUserPref("browser.newtabpage.pinned"); + NewTabUtils.pinnedLinks.resetCache(); const originalPin = JSON.stringify(NewTabUtils.pinnedLinks.links); const sitesToPin = [ {url: "https://foo.com"}, @@ -393,6 +399,8 @@ sitesToPin.forEach(site => NewTabUtils.pinnedLinks.unpin(site)); await clearHistoryAndBookmarks(); + Services.prefs.clearUserPref("browser.newtabpage.pinned"); + NewTabUtils.pinnedLinks.resetCache(); is(JSON.stringify(NewTabUtils.pinnedLinks.links), originalPin, "should restore pinned sites to its original state"); }); diff -Nru thunderbird-68.4.1+build1/browser/config/mozconfigs/linux64/source thunderbird-68.5.0+build1/browser/config/mozconfigs/linux64/source --- thunderbird-68.4.1+build1/browser/config/mozconfigs/linux64/source 2020-01-10 11:46:46.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/config/mozconfigs/linux64/source 2020-02-11 06:44:15.000000000 +0000 @@ -3,3 +3,4 @@ # extra dependencies on specific toolchains, e.g. gtk3. ac_add_options --disable-compile-environment ac_add_options --disable-nodejs +export MOZILLA_OFFICIAL=1 diff -Nru thunderbird-68.4.1+build1/browser/config/version_display.txt thunderbird-68.5.0+build1/browser/config/version_display.txt --- thunderbird-68.4.1+build1/browser/config/version_display.txt 2020-01-10 11:46:46.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/config/version_display.txt 2020-02-11 06:45:47.000000000 +0000 @@ -1 +1 @@ -68.4.1esr +68.5.0esr diff -Nru thunderbird-68.4.1+build1/browser/config/version.txt thunderbird-68.5.0+build1/browser/config/version.txt --- thunderbird-68.4.1+build1/browser/config/version.txt 2020-01-10 11:46:46.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/config/version.txt 2020-02-11 06:45:47.000000000 +0000 @@ -1 +1 @@ -68.4.1 +68.5.0 diff -Nru thunderbird-68.4.1+build1/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm thunderbird-68.5.0+build1/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm --- thunderbird-68.4.1+build1/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm 2020-01-10 11:46:46.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm 2020-02-11 06:44:15.000000000 +0000 @@ -390,7 +390,7 @@ data.message, "pdfjs-fallback", null, - notificationBox.PRIORITY_INFO_LOW, + notificationBox.PRIORITY_WARNING_LOW, buttons, function eventsCallback(eventType) { // Currently there is only one event "removed" but if there are any other diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/about-compat/aboutCompat.css thunderbird-68.5.0+build1/browser/extensions/webcompat/about-compat/aboutCompat.css --- thunderbird-68.4.1+build1/browser/extensions/webcompat/about-compat/aboutCompat.css 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/about-compat/aboutCompat.css 2020-02-11 06:44:16.000000000 +0000 @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * 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/. */ + @media (any-pointer: fine) { :root { font-family: sans-serif; @@ -11,10 +15,6 @@ padding-bottom: 2em; } - .float-right { - float: right; - } - .hidden { display: none; } diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/data/injections.js thunderbird-68.5.0+build1/browser/extensions/webcompat/data/injections.js --- thunderbird-68.4.1+build1/browser/extensions/webcompat/data/injections.js 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/data/injections.js 2020-02-11 06:44:16.000000000 +0000 @@ -4,7 +4,12 @@ "use strict"; -/* globals module */ +/* globals module, require */ + +// This is a hack for the tests. +if (typeof getMatchPatternsForGoogleURL === "undefined") { + var getMatchPatternsForGoogleURL = require("../lib/google"); +} /** * For detailed information on our policies, and a documention on this format @@ -77,38 +82,6 @@ }, }, { - id: "bug1472081", - platform: "desktop", - domain: "election.gov.np", - bug: "1472081", - contentScripts: { - matches: ["http://202.166.205.141/bbvrs/*"], - allFrames: true, - js: [ - { - file: - "injections/js/bug1472081-election.gov.np-window.sidebar-shim.js", - }, - ], - }, - }, - { - id: "bug1482066", - platform: "desktop", - domain: "portalminasnet.com", - bug: "1482066", - contentScripts: { - matches: ["*://portalminasnet.com/*"], - allFrames: true, - js: [ - { - file: - "injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js", - }, - ], - }, - }, - { id: "bug1570856", platform: "android", domain: "medium.com", @@ -141,17 +114,21 @@ { id: "bug1577245", platform: "android", - domain: "help.pandora.com", + domain: "Salesforce communities", bug: "1577245", contentScripts: { matches: [ "https://faq.usps.com/*", "https://help.duo.com/*", - "https://help.hulu.com/*", - "https://help.pandora.com/*", "https://my211.force.com/*", "https://support.paypay.ne.jp/*", "https://usps.force.com/*", + "https://help.twitch.tv/*", + "https://support.sonos.com/*", + "https://us.community.sony.com/*", + "https://help.shopee.ph/*", + "https://exclusions.ustr.gov/*", + "https://help.doordash.com/*", ], js: [ { @@ -219,21 +196,6 @@ customFunc: "noSniffFix", }, { - id: "bug1305028", - platform: "desktop", - domain: "gaming.youtube.com", - bug: "1305028", - contentScripts: { - matches: ["*://gaming.youtube.com/*"], - css: [ - { - file: - "injections/css/bug1305028-gaming.youtube.com-webkit-scrollbar.css", - }, - ], - }, - }, - { id: "bug1432935-discord", platform: "desktop", domain: "discordapp.com", @@ -249,20 +211,6 @@ }, }, { - id: "bug1432935-breitbart", - platform: "desktop", - domain: "breitbart.com", - bug: "1432935", - contentScripts: { - matches: ["*://*.breitbart.com/*"], - css: [ - { - file: "injections/css/bug1432935-breitbart.com-webkit-scrollbar.css", - }, - ], - }, - }, - { id: "bug1561371", platform: "android", domain: "mail.google.com", @@ -434,6 +382,67 @@ }, ], }, + }, + { + id: "bug1605611", + platform: "android", + domain: "maps.google.com", + bug: "1605611", + contentScripts: { + matches: getMatchPatternsForGoogleURL("www.google", "maps*"), + css: [ + { + file: "injections/css/bug1605611-maps.google.com-directions-time.css", + }, + ], + js: [ + { + file: "injections/js/bug1605611-maps.google.com-directions-time.js", + }, + ], + }, + }, + { + id: "bug1609991", + platform: "android", + domain: "www.cracked.com", + bug: "1609991", + contentScripts: { + matches: ["https://www.cracked.com/*"], + css: [ + { + file: "injections/css/bug1609991-cracked.com-flex-basis-fix.css", + }, + ], + }, + }, + { + id: "bug1610016", + platform: "android", + domain: "gaana.com", + bug: "1610016", + contentScripts: { + matches: ["https://gaana.com/*"], + css: [ + { + file: "injections/css/bug1610016-gaana.com-input-position-fix.css", + }, + ], + }, + }, + { + id: "bug1610358", + platform: "android", + domain: "pcloud.com", + bug: "1610358", + contentScripts: { + matches: ["https://www.pcloud.com/*"], + js: [ + { + file: "injections/js/bug1610358-pcloud.com-appVersion-change.js", + }, + ], + }, }, ]; diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/data/picture_in_picture_overrides.js thunderbird-68.5.0+build1/browser/extensions/webcompat/data/picture_in_picture_overrides.js --- thunderbird-68.4.1+build1/browser/extensions/webcompat/data/picture_in_picture_overrides.js 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/data/picture_in_picture_overrides.js 2020-02-11 06:44:15.000000000 +0000 @@ -0,0 +1,36 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * 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/. */ + +"use strict"; + +/* globals browser */ + +let AVAILABLE_PIP_OVERRIDES; + +{ + // See PictureInPictureTogglePolicy.jsm for these values. + // eslint-disable-next-line no-unused-vars + const TOGGLE_POLICIES = browser.pictureInPictureChild.getPolicies(); + + AVAILABLE_PIP_OVERRIDES = { + // The keys of this object are match patterns for URLs, as documented in + // https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns + // + // Example: + // + // "https://*.youtube.com/*": TOGGLE_POLICIES.THREE_QUARTERS, + // "https://*.twitch.tv/mikeconley_dot_ca/*": TOGGLE_POLICIES.TOP, + + // Instagram + "https://www.instagram.com/*": TOGGLE_POLICIES.ONE_QUARTER, + + // Twitch + "https://*.twitch.tv/*": TOGGLE_POLICIES.ONE_QUARTER, + "https://*.twitch.tech/*": TOGGLE_POLICIES.ONE_QUARTER, + "https://*.twitch.a2z.com/*": TOGGLE_POLICIES.ONE_QUARTER, + + // Udemy + "https://www.udemy.com/*": TOGGLE_POLICIES.ONE_QUARTER, + }; +} diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/data/ua_overrides.js thunderbird-68.5.0+build1/browser/extensions/webcompat/data/ua_overrides.js --- thunderbird-68.4.1+build1/browser/extensions/webcompat/data/ua_overrides.js 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/data/ua_overrides.js 2020-02-11 06:44:16.000000000 +0000 @@ -4,7 +4,12 @@ "use strict"; -/* globals getMatchPatternsForGoogleURL, module */ +/* globals browser, module, require */ + +// This is a hack for the tests. +if (typeof getMatchPatternsForGoogleURL === "undefined") { + var getMatchPatternsForGoogleURL = require("../lib/google"); +} /** * For detailed information on our policies, and a documention on this format @@ -169,6 +174,50 @@ }, { /* + * Bug 1610010 - criticalcareontario.ca - UA override for criticalcareontario.ca + * WebCompat issue #40267 - https://webcompat.com/issues/40267 + * + * criticalcareontario.ca enters a reload loop based on UA detection + * Spoofing as Chrome prevents the site from doing a constant page refresh + */ + id: "bug1610010", + platform: "desktop", + domain: "criticalcareontario.ca", + bug: "1610010", + config: { + matches: ["https://www.criticalcareontario.ca/*"], + uaTransformer: originalUA => { + return ( + UAHelpers.getPrefix(originalUA) + + " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + ); + }, + }, + }, + { + /* + * Bug 1610026 - www.mobilesuica.com - UA override for www.mobilesuica.com + * WebCompat issue #4608 - https://webcompat.com/issues/4608 + * + * mobilesuica.com showing unsupported message for Firefox users + * Spoofing as Chrome allows to access the page + */ + id: "bug1610026", + platform: "all", + domain: "www.mobilesuica.com", + bug: "1610026", + config: { + matches: ["https://www.mobilesuica.com/*"], + uaTransformer: originalUA => { + return ( + UAHelpers.getPrefix(originalUA) + + " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + ); + }, + }, + }, + { + /* * Bug 1480710 - m.imgur.com - Build UA override * WebCompat issue #13154 - https://webcompat.com/issues/13154 * @@ -351,29 +400,6 @@ }, { /* - * Bug 1509852 - redbull.com - Add UA override for redbull.com - * WebCompat issue #21439 - https://webcompat.com/issues/21439 - * - * Redbull.com blocks some features, for example the live video player, for - * Fennec. Spoofing as Chrome results in us rendering the video just fine, - * and everything else works as well. - */ - id: "bug1509852", - platform: "android", - domain: "redbull.com", - bug: "1509852", - config: { - matches: ["*://*.redbull.com/*"], - uaTransformer: originalUA => { - return ( - UAHelpers.getPrefix(originalUA) + - " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36" - ); - }, - }, - }, - { - /* * Bug 1509873 - zmags.com - Add UA override for secure.viewer.zmags.com * WebCompat issue #21576 - https://webcompat.com/issues/21576 * @@ -544,20 +570,100 @@ }, }, }, + { + /* + * Bug 1598198 - User Agent extension for Samsung's galaxy.store URLs + * + * Samsung's galaxy.store shortlinks are supposed to redirect to a Samsung + * intent:// URL on Samsung devices, but to an error page on other brands. + * As we do not provide device info in our user agent string, this check + * fails, and even Samsung users land on an error page if they use Firefox + * for Android. + * This intervention adds a simple "Samsung" identifier to the User Agent + * on only the Galaxy Store URLs if the device happens to be a Samsung. + */ + id: "bug1598198", + platform: "android", + domain: "galaxy.store", + bug: "1598198", + config: { + matches: [ + "*://galaxy.store/*", + "*://dev.galaxy.store/*", + "*://stg.galaxy.store/*", + ], + uaTransformer: originalUA => { + if (!browser.systemManufacturer) { + return originalUA; + } + + const manufacturer = browser.systemManufacturer.getManufacturer(); + if (manufacturer && manufacturer.toLowerCase() === "samsung") { + return originalUA.replace("Mobile;", "Mobile; Samsung;"); + } + + return originalUA; + }, + }, + }, + { + /* + * Bug 1610370 - UA override for answers.yahoo.com on Firefox for Android + * WebCompat issue #5460 - https://webcompat.com/issues/5460 + * + * answers.yahoo.com is not showing lazy loaded content based on UA detection + * When spoofing as Chrome it's possible to load the content + */ + id: "bug1610370", + platform: "android", + domain: "answers.yahoo.com", + bug: "1610370", + config: { + matches: ["https://answers.yahoo.com/*"], + uaTransformer: originalUA => { + return ( + UAHelpers.getPrefix(originalUA) + + " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Mobile Safari/537.36" + ); + }, + }, + }, + { + /* + * Bug 1595215 - UA overrides for Uniqlo sites + * Webcompat issue #38825 - https://webcompat.com/issues/38825 + * + * To receive the proper mobile version instead of the desktop version or + * avoid redirect loop, the UA is spoofed. + */ + id: "bug1595215", + platform: "android", + domain: "uniqlo.com", + bug: "1595215", + config: { + matches: ["*://*.uniqlo.com/*"], + uaTransformer: originalUA => { + return originalUA + " Mobile Safari"; + }, + }, + }, ]; const UAHelpers = { getDeviceAppropriateChromeUA() { if (!UAHelpers._deviceAppropriateChromeUA) { - const RunningFirefoxVersion = (navigator.userAgent.match( - /Firefox\/([0-9.]+)/ - ) || ["", "58.0"])[1]; + const userAgent = + typeof navigator !== "undefined" ? navigator.userAgent : ""; + const RunningFirefoxVersion = (userAgent.match(/Firefox\/([0-9.]+)/) || [ + "", + "58.0", + ])[1]; const RunningAndroidVersion = - navigator.userAgent.match(/Android\/[0-9.]+/) || "Android 6.0"; + userAgent.match(/Android\/[0-9.]+/) || "Android 6.0"; const ChromeVersionToMimic = "76.0.3809.111"; const ChromePhoneUA = `Mozilla/5.0 (Linux; ${RunningAndroidVersion}; Nexus 5 Build/MRA58N) FxQuantum/${RunningFirefoxVersion} AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${ChromeVersionToMimic} Mobile Safari/537.36`; const ChromeTabletUA = `Mozilla/5.0 (Linux; ${RunningAndroidVersion}; Nexus 7 Build/JSS15Q) FxQuantum/${RunningFirefoxVersion} AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${ChromeVersionToMimic} Safari/537.36`; - const IsPhone = navigator.userAgent.includes("Mobile"); + const IsPhone = userAgent.includes("Mobile"); UAHelpers._deviceAppropriateChromeUA = IsPhone ? ChromePhoneUA : ChromeTabletUA; diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/experiment-apis/pictureInPicture.js thunderbird-68.5.0+build1/browser/extensions/webcompat/experiment-apis/pictureInPicture.js --- thunderbird-68.4.1+build1/browser/extensions/webcompat/experiment-apis/pictureInPicture.js 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/experiment-apis/pictureInPicture.js 2020-02-11 06:44:15.000000000 +0000 @@ -0,0 +1,75 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * 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/. */ + +"use strict"; + +/* global ChromeUtils, ExtensionAPI, Services */ +ChromeUtils.defineModuleGetter( + this, + "Services", + "resource://gre/modules/Services.jsm" +); + +ChromeUtils.defineModuleGetter( + this, + "TOGGLE_POLICIES", + "resource://gre/modules/PictureInPictureTogglePolicy.jsm" +); + +ChromeUtils.defineModuleGetter( + this, + "AppConstants", + "resource://gre/modules/AppConstants.jsm" +); + +const TOGGLE_ENABLED_PREF = + "media.videocontrols.picture-in-picture.video-toggle.enabled"; + +/** + * This API is expected to be running in the parent process. + */ +this.pictureInPictureParent = class extends ExtensionAPI { + getAPI(context) { + return { + pictureInPictureParent: { + setOverrides(overrides) { + // The Picture-in-Picture toggle is only implemented for Desktop, so make + // this a no-op for non-Desktop builds. + if (AppConstants.platform == "android") { + return; + } + + Services.ppmm.sharedData.set( + "PictureInPicture:ToggleOverrides", + overrides + ); + }, + }, + }; + } +}; + +/** + * This API is expected to be running in a content process - specifically, + * the WebExtension content process that the background scripts run in. We + * split these out so that they can return values synchronously to the + * background scripts. + */ +this.pictureInPictureChild = class extends ExtensionAPI { + getAPI(context) { + return { + pictureInPictureChild: { + getPolicies() { + // The Picture-in-Picture toggle is only implemented for Desktop, so make + // this return nothing for non-Desktop builds. + if (AppConstants.platform == "android") { + return {}; + } + + return Cu.cloneInto(TOGGLE_POLICIES, context.cloneScope); + }, + }, + }; + } +}; diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/experiment-apis/pictureInPicture.json thunderbird-68.5.0+build1/browser/extensions/webcompat/experiment-apis/pictureInPicture.json --- thunderbird-68.4.1+build1/browser/extensions/webcompat/experiment-apis/pictureInPicture.json 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/experiment-apis/pictureInPicture.json 2020-02-11 06:44:16.000000000 +0000 @@ -0,0 +1,39 @@ +[ + { + "namespace": "pictureInPictureParent", + "description": "Parent process methods for controlling the Picture-in-Picture feature.", + "functions": [ + { + "name": "setOverrides", + "type": "function", + "description": "Set Picture-in-Picture toggle position overrides", + "parameters": [ + { + "name": "overrides", + "type": "object", + "additionalProperties": { "type": "any" }, + "description": "The Picture-in-Picture toggle position overrides to set" + } + ] + } + ] + }, + { + "namespace": "pictureInPictureChild", + "description": "WebExtension process methods for querying the Picture-in-Picture feature.", + "functions": [ + { + "name": "getPolicies", + "type": "function", + "description": "Get the Picture-in-Picture toggle position override constants", + "parameters": [], + "returns": { + "type": "object", + "properties": {}, + "additionalProperties": { "type": "any" }, + "description": "The Picture-in-Picture toggle position override constants" + } + } + ] + } +] diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/experiment-apis/systemManufacturer.js thunderbird-68.5.0+build1/browser/extensions/webcompat/experiment-apis/systemManufacturer.js --- thunderbird-68.4.1+build1/browser/extensions/webcompat/experiment-apis/systemManufacturer.js 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/experiment-apis/systemManufacturer.js 2020-02-11 06:44:15.000000000 +0000 @@ -0,0 +1,27 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * 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/. */ + +"use strict"; + +/* global ExtensionAPI, Services, XPCOMUtils */ + +XPCOMUtils.defineLazyModuleGetters(this, { + Services: "resource://gre/modules/Services.jsm", +}); + +this.systemManufacturer = class extends ExtensionAPI { + getAPI(context) { + return { + systemManufacturer: { + getManufacturer() { + try { + return Services.sysinfo.getProperty("manufacturer"); + } catch (_) { + return undefined; + } + }, + }, + }; + } +}; diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/experiment-apis/systemManufacturer.json thunderbird-68.5.0+build1/browser/extensions/webcompat/experiment-apis/systemManufacturer.json --- thunderbird-68.4.1+build1/browser/extensions/webcompat/experiment-apis/systemManufacturer.json 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/experiment-apis/systemManufacturer.json 2020-02-11 06:44:16.000000000 +0000 @@ -0,0 +1,20 @@ +[ + { + "namespace": "systemManufacturer", + "description": "experimental API extension to allow reading the device's manufacturer", + "functions": [ + { + "name": "getManufacturer", + "type": "function", + "description": "Get the device's manufacturer", + "parameters": [], + "returns": { + "type": "string", + "properties": {}, + "additionalProperties": { "type": "any" }, + "description": "The manufacturer's name." + } + } + ] + } +] diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/css/bug1305028-gaming.youtube.com-webkit-scrollbar.css thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/css/bug1305028-gaming.youtube.com-webkit-scrollbar.css --- thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/css/bug1305028-gaming.youtube.com-webkit-scrollbar.css 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/css/bug1305028-gaming.youtube.com-webkit-scrollbar.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -/** - * gaming.youtube.com - The vertical scrollbar displayed for the main pane is - * partially overlapped by the video itself - * Bug #1305028 - https://bugzilla.mozilla.org/show_bug.cgi?id=1305028 - * - * The scrollbar in the main player area is overlapped by the player, making the - * design look broken. In Chrome, YouTube is using ::-webkit-scrollbar to style - * the bar to match their expectations, but this doesn't work in Firefox. - * To make it look less broken, we hide the scrollbar for the main video pane - * entirely. - */ -ytg-scroll-pane.ytg-watch-page { - scrollbar-width: none; -} diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/css/bug1432935-breitbart.com-webkit-scrollbar.css thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/css/bug1432935-breitbart.com-webkit-scrollbar.css --- thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/css/bug1432935-breitbart.com-webkit-scrollbar.css 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/css/bug1432935-breitbart.com-webkit-scrollbar.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -/** - * breitbart.com - -webkit-scrollbar dependency causes scrollbar in the header - * Part of Bug #1432935 - https://bugzilla.mozilla.org/show_bug.cgi?id=1432935 - * WebCompat issue #25156 - https://webcompat.com/issues/25156 - * - * This site is using -webkit-scrollbar to hide a header in ther "scrollable - * via JS" header navigation. This breaks in Firefox, and causes a visible - * scrollbar to appear which overlaps large portions of the navigation content. - * While we wait for an outreach response, let's fix it ourselves. - */ -#HWT ul { - scrollbar-width: none; -} diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/css/bug1605611-maps.google.com-directions-time.css thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/css/bug1605611-maps.google.com-directions-time.css --- thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/css/bug1605611-maps.google.com-directions-time.css 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/css/bug1605611-maps.google.com-directions-time.css 2020-02-11 06:44:15.000000000 +0000 @@ -0,0 +1,24 @@ +/** + * Bug 1605611 - Cannot change Departure/arrival dates in Google Maps on Android + * + * This is step 3 - see injections/js/bug1605611-maps.google.com-directions-time.js. + * Google Maps calls .click() on a datetime-local input element, with the intent + * to show the native date picker. But the native date picker does not appear, + * because that only happens when a user initiated the click. + * To fix the problem of the date picker not appearing in Google Maps, alter the + * styles of the datetime-local input element, to be rendered on top of the + * usual UI (i.e. the icon and date/time text). This allows the user to summon + * the native date picker when they tap on the relevant UI in Google Maps. + */ + +.ml-route-options-picker-content-button + > #ml-route-options-time-selector-time-input { + z-index: 1; /* overrides -5000, to show on top of the icon AND the rendered date */ + opacity: 0; /* let the input element be fully transparent */ + width: 100vw; /* render over the rendered date from Maps' dialog */ + /* position this (absolute) element to fully cover the parent container */ + left: 0; + bottom: 0; + top: 0; + height: 100%; +} diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/css/bug1609991-cracked.com-flex-basis-fix.css thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/css/bug1609991-cracked.com-flex-basis-fix.css --- thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/css/bug1609991-cracked.com-flex-basis-fix.css 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/css/bug1609991-cracked.com-flex-basis-fix.css 2020-02-11 06:44:16.000000000 +0000 @@ -0,0 +1,12 @@ +/** + * www.cracked.com - text and images don't reflow to fit screen width + * Bug #1609991 - https://bugzilla.mozilla.org/show_bug.cgi?id=1609991 + * WebCompat issue #18218 - https://webcompat.com/issues/18218 + * + * Text and images don't fit screen width due to + * https://bugzilla.mozilla.org/show_bug.cgi?id=1316534. Adding flex-basis: auto; + * to the affected element fixes the issue + */ +.col-12 { + flex-basis: auto; +} diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/css/bug1610016-gaana.com-input-position-fix.css thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/css/bug1610016-gaana.com-input-position-fix.css --- thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/css/bug1610016-gaana.com-input-position-fix.css 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/css/bug1610016-gaana.com-input-position-fix.css 2020-02-11 06:44:15.000000000 +0000 @@ -0,0 +1,13 @@ +/** + * gaana.com - unable to accept T&C and Privacy Policy + * Bug #1610016 - https://bugzilla.mozilla.org/show_bug.cgi?id=1610016 + * WebCompat issue #29886 - https://webcompat.com/issues/29886 + * + * Unable to click on checkboxes due to input element floating to the right. + * More info https://bugzilla.mozilla.org/show_bug.cgi?id=997189. Adding explicit + * positioning to the input fixes the issue + */ +.agree_btns input { + top: 0; + left: 0; +} diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js --- thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -"use strict"; - -/** - * Bug 1472081 - election.gov.np - Override window.sidebar with something falsey - * WebCompat issue #11622 - https://webcompat.com/issues/11622 - * - * This site is blocking onmousedown and onclick if window.sidebar is something - * that evaluates to true, rendering the form fields unusable. This patch - * overrides window.sidebar with false, so the blocking event handlers won't - * get registered. - */ - -/* globals exportFunction */ - -console.info( - "window.sidebar has been shimmed for compatibility reasons. See https://webcompat.com/issues/11622 for details." -); - -Object.defineProperty(window.wrappedJSObject, "sidebar", { - get: exportFunction(function() { - return false; - }, window), - - set: exportFunction(function() {}, window), -}); diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js --- thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -"use strict"; - -/** - * portalminasnet.com - Override window.sidebar with something falsey - * WebCompat issue #18143 - https://webcompat.com/issues/18143 - * - * This site is blocking onmousedown and onclick if window.sidebar is something - * that evaluates to true, rendering the login unusable. This patch overrides - * window.sidebar with false, so the blocking event handlers won't get - * registered. - */ - -/* globals exportFunction */ - -console.info( - "window.sidebar has been shimmed for compatibility reasons. See https://webcompat.com/issues/18143 for details." -); - -Object.defineProperty(window.wrappedJSObject, "sidebar", { - get: exportFunction(function() { - return false; - }, window), - - set: exportFunction(function() {}, window), -}); diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/js/bug1577245-salesforce-communities-hide-unsupported.js thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/js/bug1577245-salesforce-communities-hide-unsupported.js --- thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/js/bug1577245-salesforce-communities-hide-unsupported.js 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/js/bug1577245-salesforce-communities-hide-unsupported.js 2020-02-11 06:44:15.000000000 +0000 @@ -1,11 +1,10 @@ "use strict"; /** - * help.pandora.com - Hide unsupported message in Firefox for Android - * WebCompat issue #38433 - https://webcompat.com/issues/38433 + * Salesforce Communities - Hide unsupported message in Firefox for Android * - * SalesForce Communities are showing unsupported message - * for help.pandora.com and some more sites. See the full list here: + * Sites based on Salesforce Communities are showing unsupported message. + * See the full list here: * https://github.com/webcompat/web-bugs/issues?utf8=%E2%9C%93&q=doNotShowUnsupportedBrowserModal */ diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/js/bug1605611-maps.google.com-directions-time.js thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/js/bug1605611-maps.google.com-directions-time.js --- thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/js/bug1605611-maps.google.com-directions-time.js 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/js/bug1605611-maps.google.com-directions-time.js 2020-02-11 06:44:15.000000000 +0000 @@ -0,0 +1,82 @@ +"use strict"; + +/* globals exportFunction */ + +/** + * Bug 1605611 - Cannot change Departure/arrival dates in Google Maps on Android + * + * This patch does the following: + * 1. Re-enable the disabled "Leave now" button. + * 2. Fix the precision of datetime-local inputs (to minutes). + * 3. Fixup side effect from enabling the date picker UI via + * injections/css/bug1605611-maps.google.com-directions-time.css + * + * See https://bugzilla.mozilla.org/show_bug.cgi?id=1605611#c0 for details. + */ + +// Step 1. +document.addEventListener("DOMContentLoaded", () => { + // In case the element appeared before the MutationObserver was activated. + for (const elem of document.querySelectorAll( + ".ml-directions-time[disabled]" + )) { + elem.disabled = false; + } + // Start watching for the insertion of the "Leave now" button. + const moOptions = { + attributeFilter: ["disabled"], + attributes: true, + subtree: true, + }; + const mo = new MutationObserver(function(records) { + let restore = false; + for (const { target } of records) { + if (target.classList.contains("ml-directions-time")) { + if (!restore) { + restore = true; + mo.disconnect(); + } + target.disabled = false; + } + } + if (restore) { + mo.observe(document.body, moOptions); + } + }); + mo.observe(document.body, moOptions); +}); + +// Step 2. +const originalValueAsNumberGetter = Object.getOwnPropertyDescriptor( + HTMLInputElement.prototype.wrappedJSObject, + "valueAsNumber" +).get; +Object.defineProperty( + HTMLInputElement.prototype.wrappedJSObject, + "valueAsNumber", + { + configurable: true, + enumerable: true, + get: originalValueAsNumberGetter, + set: exportFunction(function(v) { + if (this.type === "datetime-local" && v) { + const d = new Date(v); + d.setSeconds(0); + d.setMilliseconds(0); + v = d.getTime(); + } + this.valueAsNumber = v; + }, window), + } +); + +// Step 3. +// injections/css/bug1605611-maps.google.com-directions-time.css fixes the bug, +// but a side effect of allowing the user to click on the datetime-local input +// is that the keyboard appears when the native date picker is closed. +// Fix this by unfocusing the datetime-local input upon focus. +document.addEventListener("focusin", ({ target }) => { + if (target.id === "ml-route-options-time-selector-time-input") { + target.blur(); + } +}); diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/js/bug1610358-pcloud.com-appVersion-change.js thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/js/bug1610358-pcloud.com-appVersion-change.js --- thunderbird-68.4.1+build1/browser/extensions/webcompat/injections/js/bug1610358-pcloud.com-appVersion-change.js 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/injections/js/bug1610358-pcloud.com-appVersion-change.js 2020-02-11 06:44:16.000000000 +0000 @@ -0,0 +1,25 @@ +"use strict"; + +/** + * Bug 1610358 - Add "mobile" to navigator.appVersion + * WebCompat issue #40353 - https://webcompat.com/issues/40353 + * + * the site expecting navigator.appVersion to contain "mobile", + * otherwise it's serving a tablet version for Firefox mobile + */ + +/* globals exportFunction */ + +console.info( + "The user agent has been overridden for compatibility reasons. See https://webcompat.com/issues/40353 for details." +); + +const APP_VERSION = navigator.appVersion + " mobile"; + +Object.defineProperty(window.navigator.wrappedJSObject, "appVersion", { + get: exportFunction(function() { + return APP_VERSION; + }, window), + + set: exportFunction(function() {}, window), +}); diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/lib/google.js thunderbird-68.5.0+build1/browser/extensions/webcompat/lib/google.js --- thunderbird-68.4.1+build1/browser/extensions/webcompat/lib/google.js 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/lib/google.js 2020-02-11 06:44:15.000000000 +0000 @@ -4,6 +4,8 @@ "use strict"; +/* globals module */ + const GOOGLE_TLDS = [ "com", "ac", @@ -209,3 +211,5 @@ function getMatchPatternsForGoogleURL(url, path = "*") { return GOOGLE_TLDS.map(domain => `*://${url}.${domain}/${path}`); } + +module.exports = getMatchPatternsForGoogleURL; diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/lib/picture_in_picture_overrides.js thunderbird-68.5.0+build1/browser/extensions/webcompat/lib/picture_in_picture_overrides.js --- thunderbird-68.4.1+build1/browser/extensions/webcompat/lib/picture_in_picture_overrides.js 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/lib/picture_in_picture_overrides.js 2020-02-11 06:44:16.000000000 +0000 @@ -0,0 +1,17 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * 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/. */ + +"use strict"; + +/* globals browser, module */ + +class PictureInPictureOverrides { + constructor(availableOverrides) { + this._availableOverrides = availableOverrides; + } + + bootup() { + browser.pictureInPictureParent.setOverrides(this._availableOverrides); + } +} diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/manifest.json thunderbird-68.5.0+build1/browser/extensions/webcompat/manifest.json --- thunderbird-68.4.1+build1/browser/extensions/webcompat/manifest.json 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/manifest.json 2020-02-11 06:44:16.000000000 +0000 @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Web Compat", "description": "Urgent post-release fixes for web compatibility.", - "version": "6.3.0", + "version": "7.0.0", "applications": { "gecko": { @@ -36,6 +36,22 @@ "paths": [["experiments"]] } }, + "pictureInPictureChild": { + "schema": "experiment-apis/pictureInPicture.json", + "child": { + "scopes": ["addon_child"], + "script": "experiment-apis/pictureInPicture.js", + "paths": [["pictureInPictureChild"]] + } + }, + "pictureInPictureParent": { + "schema": "experiment-apis/pictureInPicture.json", + "parent": { + "scopes": ["addon_parent"], + "script": "experiment-apis/pictureInPicture.js", + "paths": [["pictureInPictureParent"]] + } + }, "sharedPreferences": { "schema": "experiment-apis/sharedPreferences.json", "parent": { @@ -43,26 +59,32 @@ "script": "experiment-apis/sharedPreferences.js", "paths": [["sharedPreferences"]] } + }, + "systemManufacturer": { + "schema": "experiment-apis/systemManufacturer.json", + "child": { + "scopes": ["addon_child"], + "script": "experiment-apis/systemManufacturer.js", + "paths": [["systemManufacturer"]] + } } }, "content_security_policy": "script-src 'self' 'sha256-MmZkN2QaIHhfRWPZ8TVRjijTn5Ci1iEabtTEWrt9CCo='; default-src 'self'; base-uri moz-extension://*; object-src 'none'", - "permissions": [ - "webRequest", - "webRequestBlocking", - "" - ], + "permissions": ["webRequest", "webRequestBlocking", ""], "background": { "scripts": [ "lib/module_shim.js", "lib/google.js", "data/injections.js", + "data/picture_in_picture_overrides.js", "data/ua_overrides.js", "lib/about_compat_broker.js", "lib/custom_functions.js", "lib/injections.js", + "lib/picture_in_picture_overrides.js", "lib/ua_overrides.js", "run.js" ] diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/moz.build thunderbird-68.5.0+build1/browser/extensions/webcompat/moz.build --- thunderbird-68.4.1+build1/browser/extensions/webcompat/moz.build 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/moz.build 2020-02-11 06:44:15.000000000 +0000 @@ -24,6 +24,7 @@ FINAL_TARGET_FILES.features['webcompat@mozilla.org']['data'] += [ 'data/injections.js', + 'data/picture_in_picture_overrides.js', 'data/ua_overrides.js', ] @@ -32,14 +33,16 @@ 'experiment-apis/aboutConfigPrefs.json', 'experiment-apis/experiments.js', 'experiment-apis/experiments.json', + 'experiment-apis/pictureInPicture.js', + 'experiment-apis/pictureInPicture.json', 'experiment-apis/sharedPreferences.js', 'experiment-apis/sharedPreferences.json', + 'experiment-apis/systemManufacturer.js', + 'experiment-apis/systemManufacturer.json', ] FINAL_TARGET_FILES.features['webcompat@mozilla.org']['injections']['css'] += [ 'injections/css/bug0000000-testbed-css-injection.css', - 'injections/css/bug1305028-gaming.youtube.com-webkit-scrollbar.css', - 'injections/css/bug1432935-breitbart.com-webkit-scrollbar.css', 'injections/css/bug1432935-discordapp.com-webkit-scorllbar-white-line.css', 'injections/css/bug1518781-twitch.tv-webkit-scrollbar.css', 'injections/css/bug1526977-sreedharscce.in-login-fix.css', @@ -54,7 +57,10 @@ 'injections/css/bug1575011-holiday-weather.com-scrolling-fix.css', 'injections/css/bug1575017-dunkindonuts.com-flex-basis.css', 'injections/css/bug1577270-binance.com-calc-height-fix.css', - 'injections/css/bug1577297-kitkat.com.au-slider-width-fix.css' + 'injections/css/bug1577297-kitkat.com.au-slider-width-fix.css', + 'injections/css/bug1605611-maps.google.com-directions-time.css', + 'injections/css/bug1609991-cracked.com-flex-basis-fix.css', + 'injections/css/bug1610016-gaana.com-input-position-fix.css', ] FINAL_TARGET_FILES.features['webcompat@mozilla.org']['injections']['js'] += [ @@ -62,11 +68,11 @@ 'injections/js/bug1452707-window.controllers-shim-ib.absa.co.za.js', 'injections/js/bug1457335-histography.io-ua-change.js', 'injections/js/bug1472075-bankofamerica.com-ua-change.js', - 'injections/js/bug1472081-election.gov.np-window.sidebar-shim.js', - 'injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js', 'injections/js/bug1570856-medium.com-menu-isTier1.js', 'injections/js/bug1577245-salesforce-communities-hide-unsupported.js', - 'injections/js/bug1579159-m.tailieu.vn-pdfjs-worker-disable.js' + 'injections/js/bug1579159-m.tailieu.vn-pdfjs-worker-disable.js', + 'injections/js/bug1605611-maps.google.com-directions-time.js', + 'injections/js/bug1610358-pcloud.com-appVersion-change.js', ] FINAL_TARGET_FILES.features['webcompat@mozilla.org']['lib'] += [ @@ -75,8 +81,9 @@ 'lib/google.js', 'lib/injections.js', 'lib/module_shim.js', + 'lib/picture_in_picture_overrides.js', 'lib/ua_overrides.js', ] with Files('**'): - BUG_COMPONENT = ('Web Compatibility Tools', 'Go Faster') + BUG_COMPONENT = ('Web Compatibility', 'Tooling & Investigations') diff -Nru thunderbird-68.4.1+build1/browser/extensions/webcompat/run.js thunderbird-68.5.0+build1/browser/extensions/webcompat/run.js --- thunderbird-68.4.1+build1/browser/extensions/webcompat/run.js 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/extensions/webcompat/run.js 2020-02-11 06:44:16.000000000 +0000 @@ -5,10 +5,12 @@ "use strict"; /* globals AVAILABLE_INJECTIONS, AVAILABLE_UA_OVERRIDES, AboutCompatBroker, - Injections, UAOverrides, CUSTOM_FUNCTIONS */ + Injections, UAOverrides, CUSTOM_FUNCTIONS, AVAILABLE_PIP_OVERRIDES, + PictureInPictureOverrides */ const injections = new Injections(AVAILABLE_INJECTIONS, CUSTOM_FUNCTIONS); const uaOverrides = new UAOverrides(AVAILABLE_UA_OVERRIDES); +const pipOverrides = new PictureInPictureOverrides(AVAILABLE_PIP_OVERRIDES); const aboutCompatBroker = new AboutCompatBroker({ injections, @@ -18,3 +20,4 @@ aboutCompatBroker.bootup(); injections.bootup(); uaOverrides.bootup(); +pipOverrides.bootup(); diff -Nru thunderbird-68.4.1+build1/browser/installer/windows/nsis/shared.nsh thunderbird-68.5.0+build1/browser/installer/windows/nsis/shared.nsh --- thunderbird-68.4.1+build1/browser/installer/windows/nsis/shared.nsh 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/installer/windows/nsis/shared.nsh 2020-02-11 06:44:15.000000000 +0000 @@ -551,8 +551,44 @@ WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "http" "FirefoxURL$2" WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "https" "FirefoxURL$2" - ; Registered Application WriteRegStr ${RegKey} "Software\RegisteredApplications" "$1" "$0\Capabilities" + + ; This key would be created by the Open With dialog when a user creates an + ; association for us with a file type that we haven't registered as a handler + ; for. We need to preemptively create it ourselves so that we can control the + ; command line that's used to launch us in that situation. If it's too late + ; and one already exists, then we need to edit its command line to make sure + ; it contains the -osint flag. + ReadRegStr $6 ${RegKey} "Software\Classes\Applications\${FileMainEXE}\shell\open\command" "" + ${If} $6 != "" + ${GetPathFromString} "$6" $6 + WriteRegStr ${RegKey} "Software\Classes\Applications\${FileMainEXE}\shell\open\command" \ + "" "$\"$6$\" -osint -url $\"%1$\"" + ${Else} + WriteRegStr ${RegKey} "Software\Classes\Applications\${FileMainEXE}\shell\open\command" \ + "" "$\"$8$\" -osint -url $\"%1$\"" + ; Make sure files associated this way use the document icon instead of the + ; application icon. + WriteRegStr ${RegKey} "Software\Classes\Applications\${FileMainEXE}\DefaultIcon" \ + "" "$8,1" + ; If we're going to create this key at all, we also need to list our supported + ; file types in it, because otherwise we'll be shown as a suggestion for every + ; single file type, whether we support it in any way or not. + WriteRegStr ${RegKey} "Software\Classes\Applications\${FileMainEXE}\SupportedTypes" \ + ".htm" "" + WriteRegStr ${RegKey} "Software\Classes\Applications\${FileMainEXE}\SupportedTypes" \ + ".html" "" + WriteRegStr ${RegKey} "Software\Classes\Applications\${FileMainEXE}\SupportedTypes" \ + ".shtml" "" + WriteRegStr ${RegKey} "Software\Classes\Applications\${FileMainEXE}\SupportedTypes" \ + ".xht" "" + WriteRegStr ${RegKey} "Software\Classes\Applications\${FileMainEXE}\SupportedTypes" \ + ".xhtml" "" + WriteRegStr ${RegKey} "Software\Classes\Applications\${FileMainEXE}\SupportedTypes" \ + ".svg" "" + WriteRegStr ${RegKey} "Software\Classes\Applications\${FileMainEXE}\SupportedTypes" \ + ".webp" "" + ${EndIf} !macroend !define SetStartMenuInternet "!insertmacro SetStartMenuInternet" diff -Nru thunderbird-68.4.1+build1/browser/installer/windows/nsis/uninstaller.nsi thunderbird-68.5.0+build1/browser/installer/windows/nsis/uninstaller.nsi --- thunderbird-68.4.1+build1/browser/installer/windows/nsis/uninstaller.nsi 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/installer/windows/nsis/uninstaller.nsi 2020-02-11 06:44:16.000000000 +0000 @@ -385,6 +385,18 @@ ${EndIf} ${EndIf} + ; Remove our HKCR/Applications key, if it's for this installation. + ReadRegStr $0 HKLM "Software\Classes\Applications\${FileMainEXE}\DefaultIcon" "" + StrCpy $0 $0 -2 + ${If} $0 == "$INSTDIR\${FileMainEXE}" + DeleteRegKey HKLM "Software\Classes\Applications\${FileMainEXE}" + ${EndIf} + ReadRegStr $0 HKCU "Software\Classes\Applications\${FileMainEXE}\DefaultIcon" "" + StrCpy $0 $0 -2 + ${If} $0 == "$INSTDIR\${FileMainEXE}" + DeleteRegKey HKCU "Software\Classes\Applications\${FileMainEXE}" + ${EndIf} + ; Remove directories and files we always control before parsing the uninstall ; log so empty directories can be removed. ${If} ${FileExists} "$INSTDIR\updates" diff -Nru thunderbird-68.4.1+build1/browser/locales/en-US/chrome/browser/browser.properties thunderbird-68.5.0+build1/browser/locales/en-US/chrome/browser/browser.properties --- thunderbird-68.4.1+build1/browser/locales/en-US/chrome/browser/browser.properties 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/locales/en-US/chrome/browser/browser.properties 2020-02-11 06:44:16.000000000 +0000 @@ -1079,13 +1079,6 @@ # %1$S is the name of the site URL (www.site1.example) trying to track the user's activity. # %2$S is the name of the site URL (www.site2.example) that the user is visiting. This is the same domain name displayed in the address bar. storageAccess.message = Will you give %1$S access to track your browsing activity on %2$S? -# LOCALIZATION NOTE (storageAccess.description.label): -# %1$S is the name of the site URL (www.site1.example) trying to track the user's activity. -# %2$S will be replaced with the localized version of storageAccess.description.learnmore. This text will be converted into a hyper-link linking to the SUMO page explaining the concept of third-party trackers. -storageAccess.description.label = You may want to block %1$S on this site if you don’t recognize or trust it. Learn more about %2$S -# LOCALIZATION NOTE (storageAccess.description.learnmore): -# The value of this string is embedded inside storageAccess.description.label. See the localization note for storageAccess.description.label. -storageAccess.description.learnmore = third-party trackers confirmationHint.sendToDevice.label = Sent! confirmationHint.sendToDeviceOffline.label = Queued (offline) diff -Nru thunderbird-68.4.1+build1/browser/modules/PermissionUI.jsm thunderbird-68.5.0+build1/browser/modules/PermissionUI.jsm --- thunderbird-68.4.1+build1/browser/modules/PermissionUI.jsm 2020-01-10 11:45:25.000000000 +0000 +++ thunderbird-68.5.0+build1/browser/modules/PermissionUI.jsm 2020-02-11 06:44:16.000000000 +0000 @@ -1153,7 +1153,11 @@ }, get popupOptions() { + let learnMoreURL = + Services.urlFormatter.formatURLPref("app.support.baseURL") + + "third-party-cookies"; return { + learnMoreURL, displayURI: false, name: this.prettifyHostPort(this.principal.URI), secondName: this.prettifyHostPort(this.topLevelPrincipal.URI), @@ -1161,36 +1165,6 @@ }; }, - onShown() { - let document = this.browser.ownerDocument; - let label = gBrowserBundle.formatStringFromName( - "storageAccess.description.label", - [this.prettifyHostPort(this.request.principal.URI), "<>"], - 2 - ); - let parts = label.split("<>"); - if (parts.length == 1) { - parts.push(""); - } - let map = { - "storage-access-perm-label": parts[0], - "storage-access-perm-learnmore": gBrowserBundle.GetStringFromName( - "storageAccess.description.learnmore" - ), - "storage-access-perm-endlabel": parts[1], - }; - for (let id in map) { - let str = map[id]; - document.getElementById(id).textContent = str; - } - let learnMoreURL = - Services.urlFormatter.formatURLPref("app.support.baseURL") + - "third-party-cookies"; - document.getElementById( - "storage-access-perm-learnmore" - ).href = learnMoreURL; - }, - get notificationID() { return "storage-access"; }, Binary files /tmp/tmpYrH_8u/2ebum9sbuq/thunderbird-68.4.1+build1/build/pgo/certs/cert9.db and /tmp/tmpYrH_8u/iI4h6aKZUy/thunderbird-68.5.0+build1/build/pgo/certs/cert9.db differ Binary files /tmp/tmpYrH_8u/2ebum9sbuq/thunderbird-68.4.1+build1/build/pgo/certs/key4.db and /tmp/tmpYrH_8u/iI4h6aKZUy/thunderbird-68.5.0+build1/build/pgo/certs/key4.db differ Binary files /tmp/tmpYrH_8u/2ebum9sbuq/thunderbird-68.4.1+build1/build/pgo/certs/mochitest.client and /tmp/tmpYrH_8u/iI4h6aKZUy/thunderbird-68.5.0+build1/build/pgo/certs/mochitest.client differ diff -Nru thunderbird-68.4.1+build1/BUILDID thunderbird-68.5.0+build1/BUILDID --- thunderbird-68.4.1+build1/BUILDID 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-68.5.0+build1/BUILDID 2020-02-11 06:52:47.000000000 +0000 @@ -0,0 +1 @@ +20200210021033 \ No newline at end of file diff -Nru thunderbird-68.4.1+build1/comm/calendar/base/content/calendar-base-view.js thunderbird-68.5.0+build1/comm/calendar/base/content/calendar-base-view.js --- thunderbird-68.4.1+build1/comm/calendar/base/content/calendar-base-view.js 2020-01-10 11:47:45.000000000 +0000 +++ thunderbird-68.5.0+build1/comm/calendar/base/content/calendar-base-view.js 2020-02-11 06:46:26.000000000 +0000 @@ -2,7 +2,8 @@ * 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/. */ -/* globals cal currentView MozElements MozXULElement Services toggleOrientation */ +/* global cal, currentView, calendarNavigationBar, MozElements, MozXULElement, Services, + toggleOrientation */ "use strict"; @@ -938,7 +939,7 @@ } setDateRange(startDate, endDate) { - cal.navigationBar.setDateRange(startDate, endDate); + calendarNavigationBar.setDateRange(startDate, endDate); } getSelectedItems(count) { diff -Nru thunderbird-68.4.1+build1/comm/calendar/base/content/calendar-month-base-view.js thunderbird-68.5.0+build1/comm/calendar/base/content/calendar-month-base-view.js --- thunderbird-68.4.1+build1/comm/calendar/base/content/calendar-month-base-view.js 2020-01-10 11:47:45.000000000 +0000 +++ thunderbird-68.5.0+build1/comm/calendar/base/content/calendar-month-base-view.js 2020-02-11 06:46:26.000000000 +0000 @@ -2,7 +2,7 @@ * 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/. */ -/* global CalendarBaseView, MozElements, MozXULElement, Services, timeIndicator */ +/* global calendarNavigationBar, MozElements, MozXULElement, Services, timeIndicator */ "use strict"; @@ -293,7 +293,7 @@ // Update the navigation bar only when changes are related to the current view. if (this.isVisible()) { - cal.navigationBar.setDateRange(startDate, endDate); + calendarNavigationBar.setDateRange(startDate, endDate); } // Check whether view range has been changed since last call to relayout(). diff -Nru thunderbird-68.4.1+build1/comm/calendar/base/content/calendar-multiday-base-view.js thunderbird-68.5.0+build1/comm/calendar/base/content/calendar-multiday-base-view.js --- thunderbird-68.4.1+build1/comm/calendar/base/content/calendar-multiday-base-view.js 2020-01-10 11:47:45.000000000 +0000 +++ thunderbird-68.5.0+build1/comm/calendar/base/content/calendar-multiday-base-view.js 2020-02-11 06:46:26.000000000 +0000 @@ -2,8 +2,8 @@ * 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/. */ -/* global CalendarBaseView, currentView, getOtherOrientation, MozElements, MozXULElement, Services, - setAttributeToChildren, setBooleanAttribute, timeIndicator */ +/* global CalendarBaseView, currentView, calendarNavigationBar, getOtherOrientation, MozElements, + MozXULElement, Services, setAttributeToChildren, setBooleanAttribute, timeIndicator */ "use strict"; @@ -831,7 +831,7 @@ // Update the navigation bar only when changes are related to the current view. if (this.isVisible()) { - cal.navigationBar.setDateRange(viewStart, viewEnd); + calendarNavigationBar.setDateRange(viewStart, viewEnd); } // Check whether view range has been changed since last call to relayout(). diff -Nru thunderbird-68.4.1+build1/comm/calendar/base/content/calendar-views-utils.js thunderbird-68.5.0+build1/comm/calendar/base/content/calendar-views-utils.js --- thunderbird-68.4.1+build1/comm/calendar/base/content/calendar-views-utils.js 2020-01-10 11:47:45.000000000 +0000 +++ thunderbird-68.5.0+build1/comm/calendar/base/content/calendar-views-utils.js 2020-02-11 06:46:26.000000000 +0000 @@ -6,7 +6,7 @@ * observeViewDaySelect, toggleOrientation, * toggleWorkdaysOnly, toggleTasksInView, toggleShowCompletedInView, * goToDate, getLastCalendarView, deleteSelectedEvents, - * editSelectedEvents, selectAllEvents + * editSelectedEvents, selectAllEvents, calendarNavigationBar */ /* import-globals-from calendar-chrome-startup.js */ @@ -586,7 +586,7 @@ composite.getItems(filter, 0, currentView().startDay, end, listener); } -cal.navigationBar = { +var calendarNavigationBar = { setDateRange: function(startDate, endDate) { let docTitle = ""; if (startDate) { diff -Nru thunderbird-68.4.1+build1/comm/calendar/base/content/preferences/categories.js thunderbird-68.5.0+build1/comm/calendar/base/content/preferences/categories.js --- thunderbird-68.4.1+build1/comm/calendar/base/content/preferences/categories.js 2020-01-10 11:47:45.000000000 +0000 +++ thunderbird-68.5.0+build1/comm/calendar/base/content/preferences/categories.js 2020-02-11 06:46:26.000000000 +0000 @@ -6,7 +6,7 @@ /* import-globals-from ../../../lightning/content/messenger-overlay-preferences.js */ // From categories.xul. -/* globals noneLabel, newTitle, editTitle, overwrite, overwriteTitle, noBlankCategories */ +/* globals newTitle, editTitle, overwrite, overwriteTitle, noBlankCategories */ var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm"); var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -92,12 +92,9 @@ let categoryColor = document.createXULElement("box"); categoryColor.setAttribute("width", "150"); - try { - let colorCode = categoryPrefBranch.getCharPref(categoryNameFix); - categoryColor.setAttribute("id", colorCode); - categoryColor.setAttribute("style", "background-color: " + colorCode + ";"); - } catch (ex) { - categoryColor.setAttribute("label", noneLabel); + let colorCode = categoryPrefBranch.getCharPref(categoryNameFix, ""); + if (colorCode) { + categoryColor.style.backgroundColor = colorCode; } newListItem.appendChild(categoryName); @@ -218,15 +215,7 @@ } else { this.backupData(categoryNameFix); gCategoryList.splice(list.selectedIndex, 1, categoryName); - if (categoryColor) { - categoryPrefBranch.setCharPref(categoryNameFix, categoryColor); - } else { - try { - categoryPrefBranch.clearUserPref(categoryNameFix); - } catch (ex) { - dump("Exception caught in 'saveCategory': " + ex + "\n"); - } - } + categoryPrefBranch.setCharPref(categoryNameFix, categoryColor || ""); } // If 'Overwrite' was chosen, delete category that was being edited diff -Nru thunderbird-68.4.1+build1/comm/calendar/base/content/today-pane.js thunderbird-68.5.0+build1/comm/calendar/base/content/today-pane.js --- thunderbird-68.4.1+build1/comm/calendar/base/content/today-pane.js 2020-01-10 11:47:45.000000000 +0000 +++ thunderbird-68.5.0+build1/comm/calendar/base/content/today-pane.js 2020-02-11 06:46:26.000000000 +0000 @@ -508,6 +508,8 @@ let splitter = document.getElementById("today-splitter"); let splitterCollapsed = splitter.getAttribute("state") == "collapsed"; + todaypane.setModeAttribute("modewidths", todaypane.getAttribute("width")); + if (splitterCollapsed == todaypane.isVisible()) { document.getElementById("calendar_toggle_todaypane_command").doCommand(); } diff -Nru thunderbird-68.4.1+build1/comm/calendar/base/src/calDateTimeFormatter.js thunderbird-68.5.0+build1/comm/calendar/base/src/calDateTimeFormatter.js --- thunderbird-68.4.1+build1/comm/calendar/base/src/calDateTimeFormatter.js 2020-01-10 11:47:45.000000000 +0000 +++ thunderbird-68.5.0+build1/comm/calendar/base/src/calDateTimeFormatter.js 2020-02-11 06:46:26.000000000 +0000 @@ -62,13 +62,20 @@ * @return {String} The date as a string. */ _inTimezone: function(aDate, aOptions) { + let formatter = new Services.intl.DateTimeFormat(undefined, aOptions); + let timezone = aDate.timezone; - // we set the tz only if we have a valid tz - otherwise localtime will be used on formatting. + // We set the tz only if we have a valid tz - otherwise localtime will be used on formatting. if (timezone && (timezone.isUTC || timezone.icalComponent)) { aOptions.timeZone = timezone.tzid; + try { + formatter = new Services.intl.DateTimeFormat(undefined, aOptions); + } catch (ex) { + // Non-IANA timezones throw a RangeError. + cal.WARN(ex); + } } - let formatter = new Services.intl.DateTimeFormat(undefined, aOptions); return formatter.format(cal.dtz.dateTimeToJsDate(aDate)); }, diff -Nru thunderbird-68.4.1+build1/comm/calendar/base/src/calItemModule.js thunderbird-68.5.0+build1/comm/calendar/base/src/calItemModule.js --- thunderbird-68.4.1+build1/comm/calendar/base/src/calItemModule.js 2020-01-10 11:47:45.000000000 +0000 +++ thunderbird-68.5.0+build1/comm/calendar/base/src/calItemModule.js 2020-02-11 06:46:26.000000000 +0000 @@ -30,7 +30,7 @@ var { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); -this.NSGetFactory = cid => { +this._NSGetFactory = cid => { let scriptLoadOrder = [ "resource://calendar/calendar-js/calItemBase.js", "resource://calendar/calendar-js/calCachedCalendar.js", @@ -90,6 +90,12 @@ calWeekInfoService, ]; - this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components); - return this.NSGetFactory(cid); + this._NSGetFactory = XPCOMUtils.generateNSGetFactory(components); + return this._NSGetFactory(cid); +}; + +// This version of NSGetFactory is used every time, even if it is replaced. Instead, we use a shim +// calling an internal function. The internal function is replaced after the first run. +this.NSGetFactory = cid => { + return this._NSGetFactory(cid); }; diff -Nru thunderbird-68.4.1+build1/comm/calendar/base/themes/common/calendar-task-tree.css thunderbird-68.5.0+build1/comm/calendar/base/themes/common/calendar-task-tree.css --- thunderbird-68.4.1+build1/comm/calendar/base/themes/common/calendar-task-tree.css 2020-01-10 11:47:45.000000000 +0000 +++ thunderbird-68.5.0+build1/comm/calendar/base/themes/common/calendar-task-tree.css 2020-02-11 06:46:26.000000000 +0000 @@ -17,23 +17,40 @@ color: green !important; } +:root[lwt-tree-brighttext] .calendar-task-tree > treechildren::-moz-tree-cell-text(inprogress) { + color: #00bd00 !important; +} + .calendar-task-tree > treechildren::-moz-tree-row(inprogress, selected, focus) { background-color: green !important; } -.calendar-task-tree > treechildren::-moz-tree-cell-text(inprogress, selected, focus) { - color: HighlightText !important; +:root[lwt-tree-brighttext] .calendar-task-tree > treechildren::-moz-tree-row(inprogress, selected, focus) { + background-color: #00bd00 !important; } .calendar-task-tree > treechildren::-moz-tree-cell-text(overdue) { color: red !important; } +:root[lwt-tree-brighttext] .calendar-task-tree > treechildren::-moz-tree-cell-text(overdue) { + color: #ff7a7a !important; +} + .calendar-task-tree > treechildren::-moz-tree-row(overdue, selected, focus) { background-color: red !important; } -.calendar-task-tree > treechildren::-moz-tree-cell-text(overdue, selected, focus) { +:root[lwt-tree-brighttext] .calendar-task-tree > treechildren::-moz-tree-row(overdue, selected, focus) { + background-color: #ff7a7a !important; +} + +.calendar-task-tree > treechildren::-moz-tree-cell-text(inprogress, selected, focus), +:root[lwt-tree-brighttext] .calendar-task-tree > + treechildren::-moz-tree-cell-text(inprogress, selected, focus), +.calendar-task-tree > treechildren::-moz-tree-cell-text(overdue, selected, focus), +:root[lwt-tree-brighttext] .calendar-task-tree > + treechildren::-moz-tree-cell-text(overdue, selected, focus) { color: HighlightText !important; } @@ -65,13 +82,22 @@ margin-inline-start: -2px; } +:root[lwt-tree-brighttext] .calendar-task-tree > + treechildren::-moz-tree-image(calendar-task-tree-col-priority, highpriority) { + fill: #ff7a7a; +} + .calendar-task-tree > treechildren::-moz-tree-image(calendar-task-tree-col-priority, lowpriority) { list-style-image: url(chrome://calendar-common/skin/task-images.png); -moz-image-region: rect(0 26px 13px 13px); } .calendar-task-tree > treechildren::-moz-tree-image(calendar-task-tree-col-priority, selected, lowpriority) { - list-style-image: url(chrome://calendar-common/skin/task-images.png); + -moz-image-region: rect(0 39px 13px 26px); +} + +:root[lwt-tree-brighttext] .calendar-task-tree > + treechildren::-moz-tree-image(calendar-task-tree-col-priority, lowpriority) { -moz-image-region: rect(0 39px 13px 26px); } diff -Nru thunderbird-68.4.1+build1/comm/calendar/base/themes/common/calendar-unifinder.css thunderbird-68.5.0+build1/comm/calendar/base/themes/common/calendar-unifinder.css --- thunderbird-68.4.1+build1/comm/calendar/base/themes/common/calendar-unifinder.css 2020-01-10 11:47:45.000000000 +0000 +++ thunderbird-68.5.0+build1/comm/calendar/base/themes/common/calendar-unifinder.css 2020-02-11 06:46:26.000000000 +0000 @@ -9,8 +9,7 @@ #unifinder-search-results-tree > treechildren::-moz-tree-cell-text(lowpriority) { font-style: italic; - color: GrayText !important; - background-color: -moz-field; + opacity: 0.6; } /* workaround to avoid Window Flick */ diff -Nru thunderbird-68.4.1+build1/comm/calendar/base/themes/windows/calendar-task-tree.css thunderbird-68.5.0+build1/comm/calendar/base/themes/windows/calendar-task-tree.css --- thunderbird-68.4.1+build1/comm/calendar/base/themes/windows/calendar-task-tree.css 2020-01-10 11:47:45.000000000 +0000 +++ thunderbird-68.5.0+build1/comm/calendar/base/themes/windows/calendar-task-tree.css 2020-02-11 06:46:26.000000000 +0000 @@ -31,7 +31,12 @@ border-color: green !important; } - .calendar-task-tree > treechildren::-moz-tree-cell-text(inprogress, selected, focus) { + :root[lwt-tree-brighttext] .calendar-task-tree > treechildren::-moz-tree-row(inprogress, selected, focus) { + border-color: #00bd00 !important; + } + + .calendar-task-tree > treechildren::-moz-tree-cell-text(inprogress, selected, focus), + :root[lwt-tree-brighttext] .calendar-task-tree > treechildren::-moz-tree-cell-text(inprogress, selected, focus) { color: white !important; } @@ -39,7 +44,12 @@ border-color: red !important; } - .calendar-task-tree > treechildren::-moz-tree-cell-text(overdue, selected, focus) { + :root[lwt-tree-brighttext] .calendar-task-tree > treechildren::-moz-tree-row(overdue, selected, focus) { + border-color: #ff7a7a !important; + } + + .calendar-task-tree > treechildren::-moz-tree-cell-text(overdue, selected, focus), + :root[lwt-tree-brighttext] .calendar-task-tree > treechildren::-moz-tree-cell-text(overdue, selected, focus) { color: white !important; } diff -Nru thunderbird-68.4.1+build1/comm/editor/ui/dialogs/content/EdInsSrc.xul thunderbird-68.5.0+build1/comm/editor/ui/dialogs/content/EdInsSrc.xul --- thunderbird-68.4.1+build1/comm/editor/ui/dialogs/content/EdInsSrc.xul 2020-01-10 11:47:45.000000000 +0000 +++ thunderbird-68.5.0+build1/comm/editor/ui/dialogs/content/EdInsSrc.xul 2020-02-11 06:46:26.000000000 +0000 @@ -26,8 +26,8 @@