Bug 1562253 - Uplift WebCompat system extension 4.3.2 into 68. r=miketaylr, a=jcristau
authorDennis Schubert <dschubert@mozilla.com>
Mon, 01 Jul 2019 15:45:38 +0000
changeset 522772 299ad6d21c28fc6cfd412b58f3f72060a5154d40
parent 522771 2d818026aa0b85ce91d0cbd401d7833961408f55
child 522773 4039b7434fea4a3a6dfcbe5250e83fc582b1f4b2
push id32
push userryanvm@gmail.com
push dateMon, 01 Jul 2019 20:40:03 +0000
treeherdermozilla-esr68@762c4e4404fe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmiketaylr, jcristau
bugs1562253
milestone68.0
Bug 1562253 - Uplift WebCompat system extension 4.3.2 into 68. r=miketaylr, a=jcristau Differential Revision: https://phabricator.services.mozilla.com/D36494
browser/extensions/webcompat/injections.js
browser/extensions/webcompat/injections/css/bug1432935-breitbart.com-webkit-scrollbar.css
browser/extensions/webcompat/injections/css/bug1432935-discordapp.com-webkit-scorllbar-white-line.css
browser/extensions/webcompat/injections/css/bug1561371-mail.google.com-allow-horizontal-scrolling.css
browser/extensions/webcompat/manifest.json
browser/extensions/webcompat/moz.build
browser/extensions/webcompat/ua_overrides.js
mobile/android/extensions/webcompat/injections.js
mobile/android/extensions/webcompat/injections/css/bug1432935-breitbart.com-webkit-scrollbar.css
mobile/android/extensions/webcompat/injections/css/bug1432935-discordapp.com-webkit-scorllbar-white-line.css
mobile/android/extensions/webcompat/injections/css/bug1561371-mail.google.com-allow-horizontal-scrolling.css
mobile/android/extensions/webcompat/manifest.json
mobile/android/extensions/webcompat/moz.build
mobile/android/extensions/webcompat/ua_overrides.js
--- a/browser/extensions/webcompat/injections.js
+++ b/browser/extensions/webcompat/injections.js
@@ -89,24 +89,60 @@ for (const injection of [
     platform: "desktop",
     domain: "twitch.tv",
     bug: "1518781",
     contentScripts: {
       matches: ["*://*.twitch.tv/*"],
       css: [{file: "injections/css/bug1518781-twitch.tv-webkit-scrollbar.css"}],
     },
   }, {
+    id: "bug1551672",
+    platform: "android",
+    domain: "Sites using PDK 5 video",
+    bug: "1551672",
+    pdk5fix: {
+      urls: ["https://*/*/tpPdk.js", "https://*/*/pdk/js/*/*.js"],
+      types: ["script"],
+    },
+  }, {
     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",
+    bug: "1432935",
+    contentScripts: {
+      matches: ["*://discordapp.com/*"],
+      css: [{file: "injections/css/bug1432935-discordapp.com-webkit-scorllbar-white-line.css"}],
+    },
+  }, {
+    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",
+    bug: "1561371",
+    contentScripts: {
+      matches: ["*://mail.google.com/*"],
+      css: [{file: "injections/css/bug1561371-mail.google.com-allow-horizontal-scrolling.css"}],
+    },
   },
 ]) {
   Injections.push(injection);
 }
 
 let port = browser.runtime.connect();
 const ActiveInjections = new Map();
 
@@ -121,21 +157,52 @@ async function registerContentScripts() 
       await enableInjection(injection);
     }
   }
 
   InjectionsEnabled = true;
   portsToAboutCompatTabs.broadcast({interventionsChanged: filterOverrides(Injections)});
 }
 
+function replaceStringInRequest(requestId, inString, outString, inEncoding = "utf-8") {
+  const filter = browser.webRequest.filterResponseData(requestId);
+  const decoder = new TextDecoder(inEncoding);
+  const encoder = new TextEncoder();
+  const RE = new RegExp(inString, "g");
+  const carryoverLength = inString.length;
+  let carryover = "";
+  filter.ondata = event => {
+    const replaced = (carryover + decoder.decode(event.data, {stream: true})).replace(RE, outString);
+    filter.write(encoder.encode(replaced.slice(0, -carryoverLength)));
+    carryover = replaced.slice(-carryoverLength);
+  };
+  filter.onstop = event => {
+    if (carryover.length) {
+      filter.write(encoder.encode(carryover));
+    }
+    filter.close();
+  };
+}
+
 async function enableInjection(injection) {
   if (injection.active) {
     return;
   }
 
+  if ("pdk5fix" in injection) {
+    const {urls, types} = injection.pdk5fix;
+    const listener = injection.pdk5fix.listener = ({requestId}) => {
+      replaceStringInRequest(requestId, "VideoContextChromeAndroid", "VideoContextAndroid");
+      return {};
+    };
+    browser.webRequest.onBeforeRequest.addListener(listener, {urls, types}, ["blocking"]);
+    injection.active = true;
+    return;
+  }
+
   try {
     const handle = await browser.contentScripts.register(injection.contentScripts);
     ActiveInjections.set(injection, handle);
     injection.active = true;
   } catch (ex) {
     console.error("Registering WebCompat GoFaster content scripts failed: ", ex);
   }
 }
@@ -148,16 +215,24 @@ function unregisterContentScripts() {
   portsToAboutCompatTabs.broadcast({interventionsChanged: false});
 }
 
 async function disableInjection(injection) {
   if (!injection.active) {
     return;
   }
 
+  if (injection.pdk5fix) {
+    const {listener} = injection.pdk5fix;
+    browser.webRequest.onBeforeRequest.removeListener(listener);
+    injection.active = false;
+    delete injection.pdk5fix.listener;
+    return;
+  }
+
   const contentScript = ActiveInjections.get(injection);
   await contentScript.unregister();
   ActiveInjections.delete(injection);
   injection.active = false;
 }
 
 port.onMessage.addListener((message) => {
   switch (message.type) {
new file mode 100644
--- /dev/null
+++ b/browser/extensions/webcompat/injections/css/bug1432935-breitbart.com-webkit-scrollbar.css
@@ -0,0 +1,13 @@
+/**
+ * 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;
+}
new file mode 100644
--- /dev/null
+++ b/browser/extensions/webcompat/injections/css/bug1432935-discordapp.com-webkit-scorllbar-white-line.css
@@ -0,0 +1,16 @@
+/**
+ * discordapp.com - -webkit-scrollbar dependency causes visible white line
+ * Part of Bug #1432935 - https://bugzilla.mozilla.org/show_bug.cgi?id=1432935
+ * WebCompat issue #7919 - https://webcompat.com/issues/7919
+ *
+ * Discord depends on -webkit-scrollbar for styling and hiding their scrollbars
+ * in the UI. Previously, the scrollbars overlapped content permanently.
+ * However, this issue seems to be addressed now, but a small white line
+ * still remains. While Discord is working on this, let's get rid of these
+ * lines.
+ */
+.themeGhostHairline-DBD-2d .pad-29zQak,
+.themeGhostHairlineChannels-3G0x9_ .pad-29zQak {
+  width: 3px !important;
+  left: -3px !important;
+}
new file mode 100644
--- /dev/null
+++ b/browser/extensions/webcompat/injections/css/bug1561371-mail.google.com-allow-horizontal-scrolling.css
@@ -0,0 +1,12 @@
+/**
+ * mail.google.com - The HTML email view does not allow horizontal scrolling
+ * on Fennec due to a missing CSS rule which is only served to Chrome.
+ * Bug #1561371 - https://bugzilla.mozilla.org/show_bug.cgi?id=1561371
+ *
+ * HTML emails may sometimes contain content that does not wrap, yet the
+ * CSS served to Fennec does not permit scrolling horizontally. To prevent
+ * this UX frustration, we enable horizontal scrolling.
+ */
+body > #views > div {
+  overflow: auto;
+}
--- a/browser/extensions/webcompat/manifest.json
+++ b/browser/extensions/webcompat/manifest.json
@@ -1,13 +1,13 @@
 {
   "manifest_version": 2,
   "name": "Web Compat",
   "description": "Urgent post-release fixes for web compatibility.",
-  "version": "4.2.0",
+  "version": "4.3.2",
 
   "applications": {
     "gecko": {
       "id": "webcompat@mozilla.org",
       "strict_min_version": "59.0b5"
     }
   },
 
--- a/browser/extensions/webcompat/moz.build
+++ b/browser/extensions/webcompat/moz.build
@@ -19,18 +19,21 @@ FINAL_TARGET_FILES.features['webcompat@m
   'injections.js',
   'manifest.json',
   'ua_overrides.js'
 ]
 
 FINAL_TARGET_FILES.features['webcompat@mozilla.org']['injections']['css'] += [
   'injections/css/bug0000000-dummy-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'
+  'injections/css/bug1526977-sreedharscce.in-login-fix.css',
+  'injections/css/bug1561371-mail.google.com-allow-horizontal-scrolling.css'
 ]
 
 FINAL_TARGET_FILES.features['webcompat@mozilla.org']['injections']['js'] += [
   'injections/js/bug0000000-dummy-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/bug1472081-election.gov.np-window.sidebar-shim.js',
--- a/browser/extensions/webcompat/ua_overrides.js
+++ b/browser/extensions/webcompat/ua_overrides.js
@@ -20,34 +20,16 @@ for (const override of [
     config: {
       matches: ["*://webcompat-addon-testcases.schub.io/*"],
       uaTransformer: (originalUA) => {
         return UAHelpers.getPrefix(originalUA) + " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36";
       },
     },
   }, {
     /*
-     * Bug 1464106 - directvnow.com - Create a UA override for Directvnow.com for playback on desktop
-     * WebCompat issue #3846 - https://webcompat.com/issues/3846
-     *
-     * directvnow.com is blocking Firefox via UA sniffing. Outreach is still going
-     * on, and playback works fine if we spoof as Chrome.
-     */
-    id: "bug1464106",
-    platform: "desktop",
-    domain: "directvnow.com",
-    bug: "1464106",
-    config: {
-      matches: ["*://*.directvnow.com/*"],
-      uaTransformer: (originalUA) => {
-        return UAHelpers.getPrefix(originalUA) + " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36";
-      },
-    },
-  }, {
-    /*
      * Bug 1480710 - m.imgur.com - Build UA override
      * WebCompat issue #13154 - https://webcompat.com/issues/13154
      *
      * imgur returns a 404 for requests to CSS and JS file if requested with a Fennec
      * User Agent. By removing the Fennec identifies and adding Chrome Mobile's, we
      * receive the correct CSS and JS files.
      */
     id: "bug1480710",
@@ -57,34 +39,16 @@ for (const override of [
     config: {
       matches: ["*://m.imgur.com/*"],
       uaTransformer: (originalUA) => {
         return UAHelpers.getPrefix(originalUA) + " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.85 Mobile Safari/537.36";
       },
     },
   }, {
     /*
-     * Bug 755590 - sites.google.com - top bar doesn't show up in Firefox for Android
-     *
-     * Google Sites does show a different top bar template based on the User Agent.
-     * For Fennec, this results in a broken top bar. Appending Chrome and Mobile Safari
-     * identifiers to the UA results in a correct rendering.
-     */
-    id: "bug755590",
-    platform: "android",
-    domain: "sites.google.com",
-    bug: "755590",
-    config: {
-      matches: ["*://sites.google.com/*"],
-      uaTransformer: (originalUA) => {
-        return originalUA + " Chrome/68.0.3440.85 Mobile Safari/537.366";
-      },
-    },
-  }, {
-    /*
      * Bug 945963 - tieba.baidu.com serves simplified mobile content to Firefox Android
      * WebCompat issue #18455 - https://webcompat.com/issues/18455
      *
      * tieba.baidu.com and tiebac.baidu.com serve a heavily simplified and less functional
      * mobile experience to Firefox for Android users. Adding the AppleWebKit indicator
      * to the User Agent gets us the same experience.
      */
     id: "bug945963",
@@ -94,60 +58,16 @@ for (const override of [
     config: {
       matches: ["*://tieba.baidu.com/*", "*://tiebac.baidu.com/*"],
       uaTransformer: (originalUA) => {
         return originalUA + " AppleWebKit/537.36 (KHTML, like Gecko)";
       },
     },
   }, {
     /*
-     * Bug 1518625 - rottentomatoes.com - Add UA override for videos on www.rottentomatoes.com
-     *
-     * The video framework loaded in via pdk.theplatform.com fails to
-     * acknowledge that Firefox does support HLS, so it fails to find a
-     * supported video format and shows the loading bar forever. Spoofing as
-     * Chrome works.
-     *
-     * Contrary to other PDK sites, rottentomatoes sometimes uses an iFrame to
-     * player.theplatform.com to show a video, so we need to override that domain
-     * as well.
-     */
-    id: "bug1518625",
-    platform: "android",
-    domain: "rottentomatoes.com",
-    bug: "1518625",
-    config: {
-      matches: [
-        "*://*.rottentomatoes.com/*",
-        "*://player.theplatform.com/*",
-      ],
-      uaTransformer: (_) => {
-        return "Mozilla/5.0 (Linux; Android 6.0.1; SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36";
-      },
-    },
-  }, {
-    /*
-     * Bug 1177298 - Write UA overrides for top Japanese Sites
-     * (Imported from ua-update.json.in)
-     *
-     * To receive the proper mobile version instead of the desktop version or
-     * a lower grade mobile experience, the UA is spoofed.
-     */
-    id: "bug1177298-1",
-    platform: "android",
-    domain: "weather.yahoo.co.jp",
-    bug: "1177298",
-    config: {
-      matches: ["*://weather.yahoo.co.jp/*"],
-      uaTransformer: (_) => {
-        return "Mozilla/5.0 (Linux; Android 5.0.2; Galaxy Nexus Build/IMM76B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.93 Mobile Safari/537.36";
-      },
-    },
-  }, {
-    /*
      * Bug 1177298 - Write UA overrides for top Japanese Sites
      * (Imported from ua-update.json.in)
      *
      * To receive the proper mobile version instead of the desktop version or
      * a lower grade mobile experience, the UA is spoofed.
      */
     id: "bug1177298-2",
     platform: "android",
@@ -174,34 +94,16 @@ for (const override of [
     config: {
       matches: ["*://*.nhk.or.jp/*"],
       uaTransformer: (originalUA) => {
         return originalUA + " AppleWebKit";
       },
     },
   }, {
     /*
-     * Bug 1177298 - Write UA overrides for top Japanese Sites
-     * (Imported from ua-update.json.in)
-     *
-     * To receive the proper mobile version instead of the desktop version or
-     * a lower grade mobile experience, the UA is spoofed.
-     */
-    id: "bug1177298-4",
-    platform: "android",
-    domain: "uniqlo.com",
-    bug: "1177298",
-    config: {
-      matches: ["*://*.uniqlo.com/*"],
-      uaTransformer: (originalUA) => {
-        return originalUA + " Mobile Safari";
-      },
-    },
-  }, {
-    /*
      * Bug 1338260 - Add UA override for directTV
      * (Imported from ua-update.json.in)
      *
      * DirectTV has issues with scrolling and cut-off images. Pretending to be
      * Chrome for Android fixes those issues.
      */
     id: "bug1338260",
     platform: "android",
@@ -243,35 +145,16 @@ for (const override of [
     config: {
       matches: ["*://*.mobile.de/*"],
       uaTransformer: (_) => {
         return "Mozilla/5.0 (Linux; Android 6.0.1; SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36";
       },
     },
   }, {
     /*
-     * Bug 1476436 - mobile.bet365.com - add UA override for fennec
-     * WebCompat issue #17010 - https://webcompat.com/issues/17010
-     *
-     * mobile.bet365.com serves fennec an alternative version with less interactive
-     * elements, although they work just fine. Spoofing as Chrome makes the
-     * interactive elements appear.
-     */
-    id: "bug1476436",
-    platform: "android",
-    domain: "mobile.bet365.com",
-    bug: "1476436",
-    config: {
-      matches: ["*://mobile.bet365.com/*"],
-      uaTransformer: (_) => {
-        return "Mozilla/5.0 (Linux; Android 6.0.1; SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36";
-      },
-    },
-  }, {
-    /*
      * Bug 1509831 - cc.com - Add UA override for CC.com
      * WebCompat issue #329 - https://webcompat.com/issues/329
      *
      * ComedyCentral blocks Firefox for not being able to play HLS, which was
      * true in previous versions, but no longer is. With a spoofed Chrome UA,
      * the site works just fine.
      */
     id: "bug1509831",
@@ -281,36 +164,16 @@ for (const override of [
     config: {
       matches: ["*://*.cc.com/*"],
       uaTransformer: (_) => {
         return "Mozilla/5.0 (Linux; Android 6.0.1; SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36";
       },
     },
   }, {
     /*
-     * Bug 1508564 - cnbc.com - Add UA override for videos on www.cnbc.com
-     * WebCompat issue #8410 - https://webcompat.com/issues/8410
-     *
-     * The video framework loaded in via pdk.theplatform.com fails to
-     * acknowledge that Firefox does support HLS, so it fails to find a
-     * supported video format and shows the loading bar forever. Spoofing as
-     * Chrome works.
-     */
-    id: "bug1508564",
-    platform: "android",
-    domain: "cnbc.com",
-    bug: "1508564",
-    config: {
-      matches: ["*://*.cnbc.com/*"],
-      uaTransformer: (_) => {
-        return "Mozilla/5.0 (Linux; Android 6.0.1; SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36";
-      },
-    },
-  }, {
-    /*
      * Bug 1508516 - cineflix.com.br - Add UA override for cineflix.com.br/m/
      * WebCompat issue #21553 - https://webcompat.com/issues/21553
      *
      * The site renders a blank page with any Firefox snipped in the UA as it
      * is running into an exception. Spoofing as Chrome makes the site work
      * fine.
      */
     id: "bug1508516",
--- a/mobile/android/extensions/webcompat/injections.js
+++ b/mobile/android/extensions/webcompat/injections.js
@@ -89,24 +89,60 @@ for (const injection of [
     platform: "desktop",
     domain: "twitch.tv",
     bug: "1518781",
     contentScripts: {
       matches: ["*://*.twitch.tv/*"],
       css: [{file: "injections/css/bug1518781-twitch.tv-webkit-scrollbar.css"}],
     },
   }, {
+    id: "bug1551672",
+    platform: "android",
+    domain: "Sites using PDK 5 video",
+    bug: "1551672",
+    pdk5fix: {
+      urls: ["https://*/*/tpPdk.js", "https://*/*/pdk/js/*/*.js"],
+      types: ["script"],
+    },
+  }, {
     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",
+    bug: "1432935",
+    contentScripts: {
+      matches: ["*://discordapp.com/*"],
+      css: [{file: "injections/css/bug1432935-discordapp.com-webkit-scorllbar-white-line.css"}],
+    },
+  }, {
+    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",
+    bug: "1561371",
+    contentScripts: {
+      matches: ["*://mail.google.com/*"],
+      css: [{file: "injections/css/bug1561371-mail.google.com-allow-horizontal-scrolling.css"}],
+    },
   },
 ]) {
   Injections.push(injection);
 }
 
 let port = browser.runtime.connect();
 const ActiveInjections = new Map();
 
@@ -121,21 +157,52 @@ async function registerContentScripts() 
       await enableInjection(injection);
     }
   }
 
   InjectionsEnabled = true;
   portsToAboutCompatTabs.broadcast({interventionsChanged: filterOverrides(Injections)});
 }
 
+function replaceStringInRequest(requestId, inString, outString, inEncoding = "utf-8") {
+  const filter = browser.webRequest.filterResponseData(requestId);
+  const decoder = new TextDecoder(inEncoding);
+  const encoder = new TextEncoder();
+  const RE = new RegExp(inString, "g");
+  const carryoverLength = inString.length;
+  let carryover = "";
+  filter.ondata = event => {
+    const replaced = (carryover + decoder.decode(event.data, {stream: true})).replace(RE, outString);
+    filter.write(encoder.encode(replaced.slice(0, -carryoverLength)));
+    carryover = replaced.slice(-carryoverLength);
+  };
+  filter.onstop = event => {
+    if (carryover.length) {
+      filter.write(encoder.encode(carryover));
+    }
+    filter.close();
+  };
+}
+
 async function enableInjection(injection) {
   if (injection.active) {
     return;
   }
 
+  if ("pdk5fix" in injection) {
+    const {urls, types} = injection.pdk5fix;
+    const listener = injection.pdk5fix.listener = ({requestId}) => {
+      replaceStringInRequest(requestId, "VideoContextChromeAndroid", "VideoContextAndroid");
+      return {};
+    };
+    browser.webRequest.onBeforeRequest.addListener(listener, {urls, types}, ["blocking"]);
+    injection.active = true;
+    return;
+  }
+
   try {
     const handle = await browser.contentScripts.register(injection.contentScripts);
     ActiveInjections.set(injection, handle);
     injection.active = true;
   } catch (ex) {
     console.error("Registering WebCompat GoFaster content scripts failed: ", ex);
   }
 }
@@ -148,16 +215,24 @@ function unregisterContentScripts() {
   portsToAboutCompatTabs.broadcast({interventionsChanged: false});
 }
 
 async function disableInjection(injection) {
   if (!injection.active) {
     return;
   }
 
+  if (injection.pdk5fix) {
+    const {listener} = injection.pdk5fix;
+    browser.webRequest.onBeforeRequest.removeListener(listener);
+    injection.active = false;
+    delete injection.pdk5fix.listener;
+    return;
+  }
+
   const contentScript = ActiveInjections.get(injection);
   await contentScript.unregister();
   ActiveInjections.delete(injection);
   injection.active = false;
 }
 
 port.onMessage.addListener((message) => {
   switch (message.type) {
new file mode 100644
--- /dev/null
+++ b/mobile/android/extensions/webcompat/injections/css/bug1432935-breitbart.com-webkit-scrollbar.css
@@ -0,0 +1,13 @@
+/**
+ * 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;
+}
new file mode 100644
--- /dev/null
+++ b/mobile/android/extensions/webcompat/injections/css/bug1432935-discordapp.com-webkit-scorllbar-white-line.css
@@ -0,0 +1,16 @@
+/**
+ * discordapp.com - -webkit-scrollbar dependency causes visible white line
+ * Part of Bug #1432935 - https://bugzilla.mozilla.org/show_bug.cgi?id=1432935
+ * WebCompat issue #7919 - https://webcompat.com/issues/7919
+ *
+ * Discord depends on -webkit-scrollbar for styling and hiding their scrollbars
+ * in the UI. Previously, the scrollbars overlapped content permanently.
+ * However, this issue seems to be addressed now, but a small white line
+ * still remains. While Discord is working on this, let's get rid of these
+ * lines.
+ */
+.themeGhostHairline-DBD-2d .pad-29zQak,
+.themeGhostHairlineChannels-3G0x9_ .pad-29zQak {
+  width: 3px !important;
+  left: -3px !important;
+}
new file mode 100644
--- /dev/null
+++ b/mobile/android/extensions/webcompat/injections/css/bug1561371-mail.google.com-allow-horizontal-scrolling.css
@@ -0,0 +1,12 @@
+/**
+ * mail.google.com - The HTML email view does not allow horizontal scrolling
+ * on Fennec due to a missing CSS rule which is only served to Chrome.
+ * Bug #1561371 - https://bugzilla.mozilla.org/show_bug.cgi?id=1561371
+ *
+ * HTML emails may sometimes contain content that does not wrap, yet the
+ * CSS served to Fennec does not permit scrolling horizontally. To prevent
+ * this UX frustration, we enable horizontal scrolling.
+ */
+body > #views > div {
+  overflow: auto;
+}
--- a/mobile/android/extensions/webcompat/manifest.json
+++ b/mobile/android/extensions/webcompat/manifest.json
@@ -1,13 +1,13 @@
 {
   "manifest_version": 2,
   "name": "Web Compat",
   "description": "Urgent post-release fixes for web compatibility.",
-  "version": "4.2.0",
+  "version": "4.3.2",
 
   "applications": {
     "gecko": {
       "id": "webcompat@mozilla.org",
       "strict_min_version": "59.0b5"
     }
   },
 
--- a/mobile/android/extensions/webcompat/moz.build
+++ b/mobile/android/extensions/webcompat/moz.build
@@ -19,18 +19,21 @@ FINAL_TARGET_FILES.features['webcompat@m
   'injections.js',
   'manifest.json',
   'ua_overrides.js'
 ]
 
 FINAL_TARGET_FILES.features['webcompat@mozilla.org']['injections']['css'] += [
   'injections/css/bug0000000-dummy-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'
+  'injections/css/bug1526977-sreedharscce.in-login-fix.css',
+  'injections/css/bug1561371-mail.google.com-allow-horizontal-scrolling.css'
 ]
 
 FINAL_TARGET_FILES.features['webcompat@mozilla.org']['injections']['js'] += [
   'injections/js/bug0000000-dummy-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/bug1472081-election.gov.np-window.sidebar-shim.js',
--- a/mobile/android/extensions/webcompat/ua_overrides.js
+++ b/mobile/android/extensions/webcompat/ua_overrides.js
@@ -20,34 +20,16 @@ for (const override of [
     config: {
       matches: ["*://webcompat-addon-testcases.schub.io/*"],
       uaTransformer: (originalUA) => {
         return UAHelpers.getPrefix(originalUA) + " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36";
       },
     },
   }, {
     /*
-     * Bug 1464106 - directvnow.com - Create a UA override for Directvnow.com for playback on desktop
-     * WebCompat issue #3846 - https://webcompat.com/issues/3846
-     *
-     * directvnow.com is blocking Firefox via UA sniffing. Outreach is still going
-     * on, and playback works fine if we spoof as Chrome.
-     */
-    id: "bug1464106",
-    platform: "desktop",
-    domain: "directvnow.com",
-    bug: "1464106",
-    config: {
-      matches: ["*://*.directvnow.com/*"],
-      uaTransformer: (originalUA) => {
-        return UAHelpers.getPrefix(originalUA) + " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36";
-      },
-    },
-  }, {
-    /*
      * Bug 1480710 - m.imgur.com - Build UA override
      * WebCompat issue #13154 - https://webcompat.com/issues/13154
      *
      * imgur returns a 404 for requests to CSS and JS file if requested with a Fennec
      * User Agent. By removing the Fennec identifies and adding Chrome Mobile's, we
      * receive the correct CSS and JS files.
      */
     id: "bug1480710",
@@ -57,34 +39,16 @@ for (const override of [
     config: {
       matches: ["*://m.imgur.com/*"],
       uaTransformer: (originalUA) => {
         return UAHelpers.getPrefix(originalUA) + " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.85 Mobile Safari/537.36";
       },
     },
   }, {
     /*
-     * Bug 755590 - sites.google.com - top bar doesn't show up in Firefox for Android
-     *
-     * Google Sites does show a different top bar template based on the User Agent.
-     * For Fennec, this results in a broken top bar. Appending Chrome and Mobile Safari
-     * identifiers to the UA results in a correct rendering.
-     */
-    id: "bug755590",
-    platform: "android",
-    domain: "sites.google.com",
-    bug: "755590",
-    config: {
-      matches: ["*://sites.google.com/*"],
-      uaTransformer: (originalUA) => {
-        return originalUA + " Chrome/68.0.3440.85 Mobile Safari/537.366";
-      },
-    },
-  }, {
-    /*
      * Bug 945963 - tieba.baidu.com serves simplified mobile content to Firefox Android
      * WebCompat issue #18455 - https://webcompat.com/issues/18455
      *
      * tieba.baidu.com and tiebac.baidu.com serve a heavily simplified and less functional
      * mobile experience to Firefox for Android users. Adding the AppleWebKit indicator
      * to the User Agent gets us the same experience.
      */
     id: "bug945963",
@@ -94,60 +58,16 @@ for (const override of [
     config: {
       matches: ["*://tieba.baidu.com/*", "*://tiebac.baidu.com/*"],
       uaTransformer: (originalUA) => {
         return originalUA + " AppleWebKit/537.36 (KHTML, like Gecko)";
       },
     },
   }, {
     /*
-     * Bug 1518625 - rottentomatoes.com - Add UA override for videos on www.rottentomatoes.com
-     *
-     * The video framework loaded in via pdk.theplatform.com fails to
-     * acknowledge that Firefox does support HLS, so it fails to find a
-     * supported video format and shows the loading bar forever. Spoofing as
-     * Chrome works.
-     *
-     * Contrary to other PDK sites, rottentomatoes sometimes uses an iFrame to
-     * player.theplatform.com to show a video, so we need to override that domain
-     * as well.
-     */
-    id: "bug1518625",
-    platform: "android",
-    domain: "rottentomatoes.com",
-    bug: "1518625",
-    config: {
-      matches: [
-        "*://*.rottentomatoes.com/*",
-        "*://player.theplatform.com/*",
-      ],
-      uaTransformer: (_) => {
-        return "Mozilla/5.0 (Linux; Android 6.0.1; SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36";
-      },
-    },
-  }, {
-    /*
-     * Bug 1177298 - Write UA overrides for top Japanese Sites
-     * (Imported from ua-update.json.in)
-     *
-     * To receive the proper mobile version instead of the desktop version or
-     * a lower grade mobile experience, the UA is spoofed.
-     */
-    id: "bug1177298-1",
-    platform: "android",
-    domain: "weather.yahoo.co.jp",
-    bug: "1177298",
-    config: {
-      matches: ["*://weather.yahoo.co.jp/*"],
-      uaTransformer: (_) => {
-        return "Mozilla/5.0 (Linux; Android 5.0.2; Galaxy Nexus Build/IMM76B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.93 Mobile Safari/537.36";
-      },
-    },
-  }, {
-    /*
      * Bug 1177298 - Write UA overrides for top Japanese Sites
      * (Imported from ua-update.json.in)
      *
      * To receive the proper mobile version instead of the desktop version or
      * a lower grade mobile experience, the UA is spoofed.
      */
     id: "bug1177298-2",
     platform: "android",
@@ -174,34 +94,16 @@ for (const override of [
     config: {
       matches: ["*://*.nhk.or.jp/*"],
       uaTransformer: (originalUA) => {
         return originalUA + " AppleWebKit";
       },
     },
   }, {
     /*
-     * Bug 1177298 - Write UA overrides for top Japanese Sites
-     * (Imported from ua-update.json.in)
-     *
-     * To receive the proper mobile version instead of the desktop version or
-     * a lower grade mobile experience, the UA is spoofed.
-     */
-    id: "bug1177298-4",
-    platform: "android",
-    domain: "uniqlo.com",
-    bug: "1177298",
-    config: {
-      matches: ["*://*.uniqlo.com/*"],
-      uaTransformer: (originalUA) => {
-        return originalUA + " Mobile Safari";
-      },
-    },
-  }, {
-    /*
      * Bug 1338260 - Add UA override for directTV
      * (Imported from ua-update.json.in)
      *
      * DirectTV has issues with scrolling and cut-off images. Pretending to be
      * Chrome for Android fixes those issues.
      */
     id: "bug1338260",
     platform: "android",
@@ -243,35 +145,16 @@ for (const override of [
     config: {
       matches: ["*://*.mobile.de/*"],
       uaTransformer: (_) => {
         return "Mozilla/5.0 (Linux; Android 6.0.1; SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36";
       },
     },
   }, {
     /*
-     * Bug 1476436 - mobile.bet365.com - add UA override for fennec
-     * WebCompat issue #17010 - https://webcompat.com/issues/17010
-     *
-     * mobile.bet365.com serves fennec an alternative version with less interactive
-     * elements, although they work just fine. Spoofing as Chrome makes the
-     * interactive elements appear.
-     */
-    id: "bug1476436",
-    platform: "android",
-    domain: "mobile.bet365.com",
-    bug: "1476436",
-    config: {
-      matches: ["*://mobile.bet365.com/*"],
-      uaTransformer: (_) => {
-        return "Mozilla/5.0 (Linux; Android 6.0.1; SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36";
-      },
-    },
-  }, {
-    /*
      * Bug 1509831 - cc.com - Add UA override for CC.com
      * WebCompat issue #329 - https://webcompat.com/issues/329
      *
      * ComedyCentral blocks Firefox for not being able to play HLS, which was
      * true in previous versions, but no longer is. With a spoofed Chrome UA,
      * the site works just fine.
      */
     id: "bug1509831",
@@ -281,36 +164,16 @@ for (const override of [
     config: {
       matches: ["*://*.cc.com/*"],
       uaTransformer: (_) => {
         return "Mozilla/5.0 (Linux; Android 6.0.1; SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36";
       },
     },
   }, {
     /*
-     * Bug 1508564 - cnbc.com - Add UA override for videos on www.cnbc.com
-     * WebCompat issue #8410 - https://webcompat.com/issues/8410
-     *
-     * The video framework loaded in via pdk.theplatform.com fails to
-     * acknowledge that Firefox does support HLS, so it fails to find a
-     * supported video format and shows the loading bar forever. Spoofing as
-     * Chrome works.
-     */
-    id: "bug1508564",
-    platform: "android",
-    domain: "cnbc.com",
-    bug: "1508564",
-    config: {
-      matches: ["*://*.cnbc.com/*"],
-      uaTransformer: (_) => {
-        return "Mozilla/5.0 (Linux; Android 6.0.1; SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36";
-      },
-    },
-  }, {
-    /*
      * Bug 1508516 - cineflix.com.br - Add UA override for cineflix.com.br/m/
      * WebCompat issue #21553 - https://webcompat.com/issues/21553
      *
      * The site renders a blank page with any Firefox snipped in the UA as it
      * is running into an exception. Spoofing as Chrome makes the site work
      * fine.
      */
     id: "bug1508516",