Bug 1707797 - Ship v23.0.0 of webcompat system addon; r=ksenia,webcompat-reviewers
authorThomas Wisniewski <twisniewski@mozilla.com>
Thu, 27 May 2021 14:34:29 +0000
changeset 580981 ade22fb93bae03cc33704cfbfa52a0b6e8623e0c
parent 580980 140dbee6aef7ae8336f50175d04113caeff5bd4b
child 580982 858b9355518c9c304116e5b2f968cf4debae33ef
push id143871
push usertwisniewski@mozilla.com
push dateThu, 27 May 2021 14:36:53 +0000
treeherderautoland@ade22fb93bae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersksenia, webcompat-reviewers
bugs1707797, 1711082, 1712807, 1712833, 1712843, 1712626, 1710993, 1710997, 1711003
milestone90.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1707797 - Ship v23.0.0 of webcompat system addon; r=ksenia,webcompat-reviewers This roll-up includes the following fixes: - Bug 1711082 - Add an intervention for m.aliexpress.com - Bug 1712807 - Add an override for www.dealnews.com - Bug 1712833 - Add an intervention for buskocchi.desuca.co.jp - Bug 1712843 - Add an intervention for snaptik.app - Bug 1712626 - Change CSS intervention for livescience.com - Bug 1710993 - Remove Intervention for dev.to - Bug 1710997 - Remove Intervention for slack.com - Bug 1711003 - Remove Intervention for store.hp.com Differential Revision: https://phabricator.services.mozilla.com/D116123
browser/extensions/webcompat/data/injections.js
browser/extensions/webcompat/data/ua_overrides.js
browser/extensions/webcompat/injections/css/bug1653075-livescience.com-scrollbar-width.css
browser/extensions/webcompat/injections/css/bug1655049-dev.to-unclickable-button-fix.css
browser/extensions/webcompat/injections/css/bug1690158-slack.com-webkit-scrollbar.css
browser/extensions/webcompat/injections/css/bug1712833-buskocchi.desuca.co.jp-fix-map-height.css
browser/extensions/webcompat/injections/css/bug1712843-snaptik.app-fix-text-input-alignment.css
browser/extensions/webcompat/injections/js/bug1677442-store.hp.com-disable-indexeddb.js
browser/extensions/webcompat/injections/js/bug1711082-m.aliexpress.com-undisable-search.js
browser/extensions/webcompat/manifest.json
browser/extensions/webcompat/moz.build
--- a/browser/extensions/webcompat/data/injections.js
+++ b/browser/extensions/webcompat/data/injections.js
@@ -313,30 +313,16 @@ const AVAILABLE_INJECTIONS = [
       css: [
         {
           file: "injections/css/bug1654877-preev.com-moz-appearance-fix.css",
         },
       ],
     },
   },
   {
-    id: "bug1655049",
-    platform: "android",
-    domain: "dev.to",
-    bug: "1655049",
-    contentScripts: {
-      matches: ["*://dev.to/*"],
-      css: [
-        {
-          file: "injections/css/bug1655049-dev.to-unclickable-button-fix.css",
-        },
-      ],
-    },
-  },
-  {
     id: "bug1654907",
     platform: "android",
     domain: "reactine.ca",
     bug: "1654907",
     contentScripts: {
       matches: ["*://*.reactine.ca/*"],
       css: [
         {
@@ -371,45 +357,16 @@ const AVAILABLE_INJECTIONS = [
         {
           file: "injections/js/bug1631811-datastudio.google.com-indexedDB.js",
         },
       ],
       allFrames: true,
     },
   },
   {
-    id: "bug1677442",
-    platform: "desktop",
-    domain: "store.hp.com",
-    bug: "1677442",
-    contentScripts: {
-      matches: ["*://d3nkfb7815bs43.cloudfront.net/*forstore.hp.com*"],
-      js: [
-        {
-          file: "injections/js/bug1677442-store.hp.com-disable-indexeddb.js",
-        },
-      ],
-      allFrames: true,
-    },
-  },
-  {
-    id: "bug1690158",
-    platform: "desktop",
-    domain: "slack.com",
-    bug: "1690158",
-    contentScripts: {
-      matches: ["*://app.slack.com/*"],
-      css: [
-        {
-          file: "injections/css/bug1690158-slack.com-webkit-scrollbar.css",
-        },
-      ],
-    },
-  },
-  {
     id: "bug1694470",
     platform: "android",
     domain: "m.myvidster.com",
     bug: "1694470",
     contentScripts: {
       matches: ["https://m.myvidster.com/*"],
       css: [
         {
@@ -447,11 +404,55 @@ const AVAILABLE_INJECTIONS = [
         {
           file:
             "injections/css/bug1707795-office365-sheets-overscroll-disable.css",
         },
       ],
       allFrames: true,
     },
   },
+  {
+    id: "bug1711082",
+    platform: "all",
+    domain: "m.aliexpress.com",
+    bug: "1711082",
+    contentScripts: {
+      matches: ["*://m.aliexpress.com/*"],
+      js: [
+        {
+          file: "injections/js/bug1711082-m.aliexpress.com-undisable-search.js",
+        },
+      ],
+    },
+  },
+  {
+    id: "bug1712833",
+    platform: "all",
+    domain: "buskocchi.desuca.co.jp",
+    bug: "1712833",
+    contentScripts: {
+      matches: ["*://buskocchi.desuca.co.jp/*"],
+      css: [
+        {
+          file:
+            "injections/css/bug1712833-buskocchi.desuca.co.jp-fix-map-height.css",
+        },
+      ],
+    },
+  },
+  {
+    id: "bug1712843",
+    platform: "all",
+    domain: "snaptik.app",
+    bug: "1712843",
+    contentScripts: {
+      matches: ["*://snaptik.app/*"],
+      css: [
+        {
+          file:
+            "injections/css/bug1712843-snaptik.app-fix-text-input-alignment.css",
+        },
+      ],
+    },
+  },
 ];
 
 module.exports = AVAILABLE_INJECTIONS;
--- a/browser/extensions/webcompat/data/ua_overrides.js
+++ b/browser/extensions/webcompat/data/ua_overrides.js
@@ -671,16 +671,35 @@ const AVAILABLE_UA_OVERRIDES = [
     bug: "1704673",
     config: {
       matches: ["*://app.xiaomi.com/*"],
       uaTransformer: () => {
         return UAHelpers.getDeviceAppropriateChromeUA();
       },
     },
   },
+  {
+    /*
+     * Bug 1712807 - Add UA override for www.dealnews.com
+     * Webcompat issue #39341 - https://webcompat.com/issues/39341
+     *
+     * The sites shows Firefox a different layout compared to Chrome.
+     * Spoofing as Chrome fixes this.
+     */
+    id: "bug1712807",
+    platform: "android",
+    domain: "www.dealnews.com",
+    bug: "1712807",
+    config: {
+      matches: ["*://www.dealnews.com/*"],
+      uaTransformer: () => {
+        return UAHelpers.getDeviceAppropriateChromeUA();
+      },
+    },
+  },
 ];
 
 const UAHelpers = {
   getDeviceAppropriateChromeUA() {
     if (!UAHelpers._deviceAppropriateChromeUA) {
       const userAgent =
         typeof navigator !== "undefined" ? navigator.userAgent : "";
       const RunningFirefoxVersion = (userAgent.match(/Firefox\/([0-9.]+)/) || [
--- a/browser/extensions/webcompat/injections/css/bug1653075-livescience.com-scrollbar-width.css
+++ b/browser/extensions/webcompat/injections/css/bug1653075-livescience.com-scrollbar-width.css
@@ -2,13 +2,14 @@
  * livescience.com - a scrollbar covering navigation menu
  * Bug #1653075 - https://bugzilla.mozilla.org/show_bug.cgi?id=1653075
  *
  * The scrollbar is covering navigation items and that makes them half hidden.
  * There are some ::-webkit-scrollbar css rules applied to the scrollbar,
  * making it thinner. Adding similar rules for Firefox fixes the issue.
  */
 @media screen and (max-width: 900px) {
+  .trending__wrapper .trending__items,
   .trending-wrapper .trending-items {
     scrollbar-width: thin;
     scrollbar-color: #f9ae3b #f5f5f5;
   }
 }
deleted file mode 100644
--- a/browser/extensions/webcompat/injections/css/bug1655049-dev.to-unclickable-button-fix.css
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * dev.to - not possible to open social buttons menu
- * Bug #1655049 - https://bugzilla.mozilla.org/show_bug.cgi?id=1655049
- * WebCompat issue #55782 - https://webcompat.com/issues/55782
- *
- * Social buttons menu is not opening due to svg receiving the click
- * instead of the button. See https://bugzilla.mozilla.org/show_bug.cgi?id=1654934.
- * Adding pointer-events: none to the svg allows to open the menu
- */
-#article-show-more-button > * {
-  pointer-events: none;
-}
deleted file mode 100644
--- a/browser/extensions/webcompat/injections/css/bug1690158-slack.com-webkit-scrollbar.css
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * slack.com - Visible scrollbars in the emoji picker
- * Bug #1690158 - https://bugzilla.mozilla.org/show_bug.cgi?id=1690158
- *
- * The emoji picker in Slack's web version is using ::-webkit-scrollbar for
- * custom scrollbar styling, which is not supported in Firefox. On a system
- * with always-visible scrollbars, this causes a double scroll bar to be
- * visible.
- * This intervention always hides the "outer" scrollbar, while keeping the
- * "inner" scroll bar visible on hover, essentially matching Chrome's
- * behavior.
- */
-
-.p-emoji_picker__list_container,
-.p-emoji_picker__list_scroller {
-  scrollbar-width: none;
-}
-
-.p-emoji_picker__list_container:hover .p-emoji_picker__list_scroller {
-  scrollbar-width: thin;
-}
new file mode 100644
--- /dev/null
+++ b/browser/extensions/webcompat/injections/css/bug1712833-buskocchi.desuca.co.jp-fix-map-height.css
@@ -0,0 +1,9 @@
+/**
+ * buskocchi.desuca.co.jp - Ensure that the map has a height so it is visible.
+ * Bug #1712833 - https://bugzilla.mozilla.org/show_bug.cgi?id=1712833
+ * WebCompat issue #50837 - https://webcompat.com/issues/50837
+ */
+
+form[name="main"] {
+  height: 100%;
+}
new file mode 100644
--- /dev/null
+++ b/browser/extensions/webcompat/injections/css/bug1712843-snaptik.app-fix-text-input-alignment.css
@@ -0,0 +1,9 @@
+/**
+ * snaptik.app - Ensure that the main text input's text is vertically centered.
+ * Bug #1712843 - https://bugzilla.mozilla.org/show_bug.cgi?id=1712843
+ * WebCompat issue #55986 - https://webcompat.com/issues/55986
+ */
+
+form#get_video input#url::placeholder {
+  line-height: revert;
+}
deleted file mode 100644
--- a/browser/extensions/webcompat/injections/js/bug1677442-store.hp.com-disable-indexeddb.js
+++ /dev/null
@@ -1,20 +0,0 @@
-"use strict";
-
-/**
- * Bug 1677442 - disable indexedDB for d3nkfb7815bs43.cloudfront.net
- *
- * The site embeds an iframe with a 3D viewer. The request fails
- *  because BabylonJS (the 3d library) tries to access indexedDB
- *  from the third party context (d3nkfb7815bs43.cloudfront.net)
- *  Disabling indexedDB fixes it, causing it to fetch the 3d resource
- *  via network.
- */
-
-console.info(
-  "window.indexedDB has been overwritten for compatibility reasons. See https://bugzilla.mozilla.org/show_bug.cgi?id=1677442 for details."
-);
-
-Object.defineProperty(window.wrappedJSObject, "indexedDB", {
-  get: undefined,
-  set: undefined,
-});
new file mode 100644
--- /dev/null
+++ b/browser/extensions/webcompat/injections/js/bug1711082-m.aliexpress.com-undisable-search.js
@@ -0,0 +1,34 @@
+"use strict";
+
+/**
+ * Bug 1711082 - Cannot trigger search bar on AliExpress mobile page
+ *
+ * This patch ensures that the search input never has the [disabled]
+ * attribute, so that users may tap/click on it to search.
+ *
+ * See https://bugzilla.mozilla.org/show_bug.cgi?id=1711082 for details.
+ */
+
+const SELECTOR = `[data-spm="header"] input[disabled]`;
+
+function check(target) {
+  if (target.nodeName === "INPUT" && target.matches(SELECTOR)) {
+    target.removeAttribute("disabled");
+    return true;
+  }
+  return false;
+}
+
+new MutationObserver(mutations => {
+  for (const { addedNodes, target, attributeName } of mutations) {
+    if (attributeName === "disabled") {
+      check(target);
+    } else {
+      addedNodes?.forEach(node => {
+        if (!check(node)) {
+          node.querySelector?.(SELECTOR)?.removeAttribute("disabled");
+        }
+      });
+    }
+  }
+}).observe(document, { attributes: true, childList: true, subtree: true });
--- a/browser/extensions/webcompat/manifest.json
+++ b/browser/extensions/webcompat/manifest.json
@@ -1,13 +1,13 @@
 {
   "manifest_version": 2,
   "name": "Web Compatibility Interventions",
   "description": "Urgent post-release fixes for web compatibility.",
-  "version": "22.5.0",
+  "version": "23.0.0",
 
   "applications": {
     "gecko": {
       "id": "webcompat@mozilla.org",
       "strict_min_version": "59.0b5"
     }
   },
 
--- a/browser/extensions/webcompat/moz.build
+++ b/browser/extensions/webcompat/moz.build
@@ -51,34 +51,34 @@ FINAL_TARGET_FILES.features["webcompat@m
     "injections/css/bug1610016-gaana.com-input-position-fix.css",
     "injections/css/bug1610344-directv.com.co-hide-unsupported-message.css",
     "injections/css/bug1644830-missingmail.usps.com-checkboxes-not-visible.css",
     "injections/css/bug1645064-s-kanava.fi-invisible-charts.css",
     "injections/css/bug1651917-teletrader.com.body-transform-origin.css",
     "injections/css/bug1653075-livescience.com-scrollbar-width.css",
     "injections/css/bug1654877-preev.com-moz-appearance-fix.css",
     "injections/css/bug1654907-reactine.ca-hide-unsupported.css",
-    "injections/css/bug1655049-dev.to-unclickable-button-fix.css",
     "injections/css/bug1666771-zilow-map-overdraw.css",
-    "injections/css/bug1690158-slack.com-webkit-scrollbar.css",
     "injections/css/bug1694470-myvidster.com-content-not-shown.css",
     "injections/css/bug1704653-tsky.in-clear-float.css",
     "injections/css/bug1707795-office365-sheets-overscroll-disable.css",
+    "injections/css/bug1712833-buskocchi.desuca.co.jp-fix-map-height.css",
+    "injections/css/bug1712843-snaptik.app-fix-text-input-alignment.css",
 ]
 
 FINAL_TARGET_FILES.features["webcompat@mozilla.org"]["injections"]["js"] += [
     "injections/js/bug0000000-testbed-js-injection.js",
     "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/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",
     "injections/js/bug1631811-datastudio.google.com-indexedDB.js",
-    "injections/js/bug1677442-store.hp.com-disable-indexeddb.js",
+    "injections/js/bug1711082-m.aliexpress.com-undisable-search.js",
 ]
 
 FINAL_TARGET_FILES.features["webcompat@mozilla.org"]["shims"] += [
     "shims/adsafeprotected-ima.js",
     "shims/bmauth.js",
     "shims/eluminate.js",
     "shims/empty-script.js",
     "shims/facebook-sdk.js",