Merge autoland to m-c. a=merge
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 25 May 2017 16:31:52 -0400
changeset 360694 bdf2d1918fb0b434ab8782d003afbe3f9639cd45
parent 360691 f7adbf457ee20eeffde72694e0d17d73616e3cfd (current diff)
parent 360693 6953f7b4d74917385af231b3cea8abd9c7daeb3f (diff)
child 360695 55e5723b1e62190a38c00927eda796e2ad14778f
push id90713
push userryanvm@gmail.com
push dateThu, 25 May 2017 20:36:06 +0000
treeherdermozilla-inbound@348e3ebeb9ac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone55.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
Merge autoland to m-c. a=merge
browser/extensions/shield-recipe-client/test/unit/xpc_head.js
browser/themes/shared/icons/copy-url.svg
layout/reftests/bugs/1348481-3.html
layout/style/crashtests/147777-1.html
toolkit/themes/osx/global/icons/search-textbox.svg
--- a/accessible/tests/browser/.eslintrc.js
+++ b/accessible/tests/browser/.eslintrc.js
@@ -36,20 +36,18 @@ module.exports = {
     "no-caller": "error",
     "no-catch-shadow": "error",
     "no-comma-dangle": "off",
     "no-console": "off",
     "no-constant-condition": "off",
     "no-continue": "off",
     "no-control-regex": "error",
     "no-div-regex": "off",
-    "no-eval": "error",
     "no-extend-native": "error",
     "no-extra-parens": "off",
-    "no-extra-semi": "error",
     "no-extra-strict": "off",
     "no-fallthrough": "error",
     "no-floating-decimal": "off",
     "no-inline-comments": "off",
     "no-mixed-requires": "off",
     "no-multi-str": "error",
     "no-multiple-empty-lines": ["error", {"max": 1}],
     "no-new-require": "off",
@@ -61,17 +59,16 @@ module.exports = {
     "no-proto": "error",
     "no-reserved-keys": "off",
     "no-restricted-modules": "off",
     "no-return-assign": "error",
     "no-script-url": "off",
     "no-sequences": "error",
     "no-shadow": "error",
     "no-space-before-semi": "off",
-    "no-sparse-arrays": "error",
     "no-sync": "off",
     "no-ternary": "off",
     "no-throw-literal": "error",
     "no-underscore-dangle": "off",
     "no-undefined": "off",
     "no-unneeded-ternary": "error",
     "no-unused-vars": ["error", {"vars": "all", "args": "none"}],
     "no-use-before-define": "off",
@@ -101,28 +98,26 @@ module.exports = {
     "no-eq-null": "off",
     "no-func-assign": "off",
     "no-implied-eval": "off",
     "no-inner-declarations": "off",
     "no-invalid-regexp": "off",
     "no-irregular-whitespace": "off",
     "no-iterator": "off",
     "no-label-var": "off",
-    "no-labels": "error",
     "no-lone-blocks": "off",
     "no-loop-func": "off",
     "no-negated-in-lhs": "off",
     "no-new": "off",
     "no-new-func": "off",
     "no-new-object": "off",
     "no-new-wrappers": "off",
     "no-obj-calls": "off",
     "no-octal-escape": "off",
     "no-undef-init": "error",
-    "no-unexpected-multiline": "error",
     "object-curly-spacing": "off",
     "no-unused-expressions": "off",
     "no-void": "off",
     "no-wrap-func": "off",
     "operator-assignment": "off",
     "operator-linebreak": ["error", "after"]
   }
 };
--- a/browser/base/content/test/general/browser_bug435325.js
+++ b/browser/base/content/test/general/browser_bug435325.js
@@ -1,69 +1,44 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /* Ensure that clicking the button in the Offline mode neterror page makes the browser go online. See bug 435325. */
 
-var proxyPrefValue;
-
-function test() {
-  waitForExplicitFinish();
+add_task(async function checkSwitchPageToOnlineMode() {
 
   // Go offline and disable the proxy and cache, then try to load the test URL.
   Services.io.offline = true;
 
   // Tests always connect to localhost, and per bug 87717, localhost is now
   // reachable in offline mode.  To avoid this, disable any proxy.
-  proxyPrefValue = Services.prefs.getIntPref("network.proxy.type");
-  Services.prefs.setIntPref("network.proxy.type", 0);
-
-  Services.prefs.setBoolPref("browser.cache.disk.enable", false);
-  Services.prefs.setBoolPref("browser.cache.memory.enable", false);
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "http://example.com/");
+  let proxyPrefValue = SpecialPowers.getIntPref("network.proxy.type");
+  await SpecialPowers.pushPrefEnv({"set": [
+    ["network.proxy.type", 0],
+    ["browser.cache.disk.enable", false],
+    ["browser.cache.memory.enable", false],
+  ]});
 
-  let contentScript = `
-    let listener = function () {
-      removeEventListener("DOMContentLoaded", listener);
-      sendAsyncMessage("Test:DOMContentLoaded", { uri: content.document.documentURI });
-    };
-    addEventListener("DOMContentLoaded", listener);
-  `;
+  await BrowserTestUtils.withNewTab("about:blank", async function(browser) {
+    let netErrorLoaded = BrowserTestUtils.waitForErrorPage(browser);
 
-  function pageloaded({ data }) {
-    mm.removeMessageListener("Test:DOMContentLoaded", pageloaded);
-    checkPage(data);
-  }
+    await BrowserTestUtils.loadURI(browser, "http://example.com/");
+    await netErrorLoaded;
 
-  let mm = gBrowser.selectedBrowser.messageManager;
-  mm.addMessageListener("Test:DOMContentLoaded", pageloaded);
-  mm.loadFrameScript("data:," + contentScript, true);
-}
-
-function checkPage(data) {
-  ok(Services.io.offline, "Setting Services.io.offline to true.");
-
-  is(data.uri.substring(0, 27),
-     "about:neterror?e=netOffline", "Loading the Offline mode neterror page.");
+    // Re-enable the proxy so example.com is resolved to localhost, rather than
+    // the actual example.com.
+    await SpecialPowers.pushPrefEnv({"set": [["network.proxy.type", proxyPrefValue]]});
+    let changeObserved = TestUtils.topicObserved("network:offline-status-changed");
 
-  // Re-enable the proxy so example.com is resolved to localhost, rather than
-  // the actual example.com.
-  Services.prefs.setIntPref("network.proxy.type", proxyPrefValue);
+    // Click on the 'Try again' button.
+    await ContentTask.spawn(browser, null, function* () {
+      ok(content.document.documentURI.startsWith("about:neterror?e=netOffline"), "Should be showing error page");
+      content.document.getElementById("errorTryAgain").click();
+    });
 
-  Services.obs.addObserver(function observer(aSubject, aTopic) {
-    ok(!Services.io.offline, "After clicking the Try Again button, we're back " +
-                             "online.");
-    Services.obs.removeObserver(observer, "network:offline-status-changed");
-    finish();
-  }, "network:offline-status-changed");
-
-  ContentTask.spawn(gBrowser.selectedBrowser, null, async function() {
-    content.document.getElementById("errorTryAgain").click();
+    await changeObserved;
+    ok(!Services.io.offline, "After clicking the 'Try Again' button, we're back online.");
   });
-}
+});
 
 registerCleanupFunction(function() {
-  Services.prefs.setBoolPref("browser.cache.disk.enable", true);
-  Services.prefs.setBoolPref("browser.cache.memory.enable", true);
   Services.io.offline = false;
-  gBrowser.removeCurrentTab();
 });
--- a/browser/components/extensions/ext-c-devtools-panels.js
+++ b/browser/components/extensions/ext-c-devtools-panels.js
@@ -1,14 +1,18 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+Cu.import("resource://gre/modules/Services.jsm");
+
 XPCOMUtils.defineLazyModuleGetter(this, "EventEmitter",
                                   "resource://gre/modules/EventEmitter.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "ExtensionChildDevToolsUtils",
+                                  "resource://gre/modules/ExtensionChildDevToolsUtils.jsm");
 
 var {
   promiseDocumentLoaded,
 } = ExtensionUtils;
 
 /**
  * Represents an addon devtools panel in the child process.
  *
@@ -127,29 +131,44 @@ class ChildDevToolsPanel extends EventEm
 
     this._panelContext = null;
     this.context = null;
   }
 }
 
 this.devtools_panels = class extends ExtensionAPI {
   getAPI(context) {
+    const themeChangeObserver = ExtensionChildDevToolsUtils.getThemeChangeObserver();
+
     return {
       devtools: {
         panels: {
           create(title, icon, url) {
             return context.cloneScope.Promise.resolve().then(async () => {
               const panelId = await context.childManager.callParentAsyncFunction(
                 "devtools.panels.create", [title, icon, url]);
 
               const devtoolsPanel = new ChildDevToolsPanel(context, {id: panelId});
 
               const devtoolsPanelAPI = Cu.cloneInto(devtoolsPanel.api(),
                                                     context.cloneScope,
                                                     {cloneFunctions: true});
               return devtoolsPanelAPI;
             });
           },
+          get themeName() {
+            return themeChangeObserver.themeName;
+          },
+          onThemeChanged: new SingletonEventManager(
+            context, "devtools.panels.onThemeChanged", fire => {
+              const listener = (eventName, themeName) => {
+                fire.async(themeName);
+              };
+              themeChangeObserver.on("themeChanged", listener);
+              return () => {
+                themeChangeObserver.off("themeChanged", listener);
+              };
+            }).api(),
         },
       },
     };
   }
 };
--- a/browser/components/extensions/ext-devtools.js
+++ b/browser/components/extensions/ext-devtools.js
@@ -133,16 +133,17 @@ class DevToolsPage extends HiddenExtensi
 
         this.resolveTopLevelContext(context);
       }
     });
 
     extensions.emit("extension-browser-inserted", this.browser, {
       devtoolsToolboxInfo: {
         inspectedWindowTabId: getTargetTabIdForToolbox(this.toolbox),
+        themeName: gDevTools.getTheme(),
       },
     });
 
     this.browser.loadURI(this.url);
 
     await this.waitForTopLevelContext;
   }
 
@@ -195,39 +196,53 @@ class DevToolsPageDefinition {
 
     this.url = url;
     this.extension = extension;
 
     // Map[TabTarget -> DevToolsPage]
     this.devtoolsPageForTarget = new Map();
   }
 
+  onThemeChanged(evt, themeName) {
+    Services.ppmm.broadcastAsyncMessage("Extension:DevToolsThemeChanged", {themeName});
+  }
+
   buildForToolbox(toolbox) {
     if (this.devtoolsPageForTarget.has(toolbox.target)) {
       return Promise.reject(new Error("DevtoolsPage has been already created for this toolbox"));
     }
 
     const devtoolsPage = new DevToolsPage(this.extension, {
       toolbox, url: this.url, devToolsPageDefinition: this,
     });
+
+    // If this is the first DevToolsPage, subscribe to the theme-changed event
+    if (this.devtoolsPageForTarget.size === 0) {
+      gDevTools.on("theme-changed", this.onThemeChanged);
+    }
     this.devtoolsPageForTarget.set(toolbox.target, devtoolsPage);
 
     return devtoolsPage.build();
   }
 
   shutdownForTarget(target) {
     if (this.devtoolsPageForTarget.has(target)) {
       const devtoolsPage = this.devtoolsPageForTarget.get(target);
       devtoolsPage.close();
 
       // `devtoolsPage.close()` should remove the instance from the map,
       // raise an exception if it is still there.
       if (this.devtoolsPageForTarget.has(target)) {
         throw new Error(`Leaked DevToolsPage instance for target "${target.toString()}"`);
       }
+
+      // If this was the last DevToolsPage, unsubscribe from the theme-changed event
+      if (this.devtoolsPageForTarget.size === 0) {
+        gDevTools.off("theme-changed", this.onThemeChanged);
+      }
     }
   }
 
   forgetForTarget(target) {
     this.devtoolsPageForTarget.delete(target);
   }
 
   shutdown() {
--- a/browser/components/extensions/schemas/devtools_panels.json
+++ b/browser/components/extensions/schemas/devtools_panels.json
@@ -311,16 +311,20 @@
     "properties": {
       "elements": {
         "$ref": "ElementsPanel",
         "description": "Elements panel."
       },
       "sources": {
         "$ref": "SourcesPanel",
         "description": "Sources panel."
+      },
+      "themeName": {
+        "type": "string",
+        "description": "The name of the current devtools theme."
       }
     },
     "functions": [
       {
         "name": "create",
         "type": "function",
         "description": "Creates an extension panel.",
         "async": "callback",
@@ -397,11 +401,25 @@
           {
             "name": "callback",
             "type": "function",
             "optional": true,
             "description": "A function that is called when the resource has been successfully loaded."
           }
         ]
       }
+    ],
+    "events": [
+      {
+        "name": "onThemeChanged",
+        "type": "function",
+        "description": "Fired when the devtools theme changes.",
+        "parameters": [
+          {
+            "name": "themeName",
+            "type": "string",
+            "description": "The name of the current devtools theme."
+          }
+        ]
+      }
     ]
   }
 ]
--- a/browser/components/extensions/test/browser/browser_ext_devtools_panel.js
+++ b/browser/components/extensions/test/browser/browser_ext_devtools_panel.js
@@ -1,23 +1,104 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
 XPCOMUtils.defineLazyModuleGetter(this, "devtools",
                                   "resource://devtools/shared/Loader.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "gDevTools",
                                   "resource://devtools/client/framework/gDevTools.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
+                                  "resource://gre/modules/Preferences.jsm");
+
+const DEVTOOLS_THEME_PREF = "devtools.theme";
 
 /**
  * This test file ensures that:
  *
- * - ensures that devtools.panel.create is able to create a devtools panel
+ * - devtools.panels.themeName returns the correct value,
+ *   both from a page and a panel.
+ * - devtools.panels.onThemeChanged fires for theme changes,
+ *   both from a page and a panel.
+ * - devtools.panels.create is able to create a devtools panel.
  */
 
+async function switchTheme(theme) {
+  const waitforThemeChanged = new Promise(resolve => gDevTools.once("theme-changed", resolve));
+  Preferences.set(DEVTOOLS_THEME_PREF, theme);
+  await waitforThemeChanged;
+}
+
+async function testThemeSwitching(extension, locations = ["page"]) {
+  for (let newTheme of ["dark", "light"]) {
+    await switchTheme(newTheme);
+    for (let location of locations) {
+      is(await extension.awaitMessage(`devtools_theme_changed_${location}`),
+        newTheme,
+        `The onThemeChanged event listener fired for the ${location}.`);
+      is(await extension.awaitMessage(`current_theme_${location}`),
+        newTheme,
+        `The current theme is reported as expected for the ${location}.`);
+    }
+  }
+}
+
+add_task(async function test_theme_name_no_panel() {
+  let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, "http://mochi.test:8888/");
+
+  async function devtools_page() {
+    browser.devtools.panels.onThemeChanged.addListener(themeName => {
+      browser.test.sendMessage("devtools_theme_changed_page", themeName);
+      browser.test.sendMessage("current_theme_page", browser.devtools.panels.themeName);
+    });
+
+    browser.test.sendMessage("initial_theme", browser.devtools.panels.themeName);
+  }
+
+  let extension = ExtensionTestUtils.loadExtension({
+    manifest: {
+      devtools_page: "devtools_page.html",
+    },
+    files: {
+      "devtools_page.html": `<!DOCTYPE html>
+      <html>
+       <head>
+         <meta charset="utf-8">
+       </head>
+       <body>
+         <script src="devtools_page.js"></script>
+       </body>
+      </html>`,
+      "devtools_page.js": devtools_page,
+    },
+  });
+
+  // Ensure that the initial value of the devtools theme is "light".
+  await SpecialPowers.pushPrefEnv({set: [[DEVTOOLS_THEME_PREF, "light"]]});
+
+  await extension.startup();
+
+  let target = devtools.TargetFactory.forTab(tab);
+  await gDevTools.showToolbox(target, "webconsole");
+  info("developer toolbox opened");
+
+  is(await extension.awaitMessage("initial_theme"),
+    "light",
+    "The initial theme is reported as expected.");
+
+  await testThemeSwitching(extension);
+
+  await gDevTools.closeToolbox(target);
+  await target.destroy();
+
+  await extension.unload();
+
+  await BrowserTestUtils.removeTab(tab);
+});
+
 add_task(async function test_devtools_page_panels_create() {
   let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, "http://mochi.test:8888/");
 
   async function devtools_page() {
     const result = {
       devtoolsPageTabId: browser.devtools.inspectedWindow.tabId,
       panelCreated: 0,
       panelShown: 0,
@@ -41,31 +122,44 @@ add_task(async function test_devtools_pa
       });
 
       panel.onHidden.addListener(() => {
         result.panelHidden++;
 
         browser.test.sendMessage("devtools_panel_hidden", result);
       });
 
+      browser.devtools.panels.onThemeChanged.addListener(themeName => {
+        browser.test.sendMessage("devtools_theme_changed_page", themeName);
+        browser.test.sendMessage("current_theme_page", browser.devtools.panels.themeName);
+      });
+
       browser.test.sendMessage("devtools_panel_created");
+      browser.test.sendMessage("initial_theme_page", browser.devtools.panels.themeName);
     } catch (err) {
       // Make the test able to fail fast when it is going to be a failure.
       browser.test.sendMessage("devtools_panel_created");
       throw err;
     }
   }
 
   function devtools_panel() {
     // Set a property in the global and check that it is defined
     // and accessible from the devtools_page when the panel.onShown
     // event has been received.
     window.TEST_PANEL_GLOBAL = "test_panel_global";
+
+    browser.devtools.panels.onThemeChanged.addListener(themeName => {
+      browser.test.sendMessage("devtools_theme_changed_panel", themeName);
+      browser.test.sendMessage("current_theme_panel", browser.devtools.panels.themeName);
+    });
+
     browser.test.sendMessage("devtools_panel_inspectedWindow_tabId",
                              browser.devtools.inspectedWindow.tabId);
+    browser.test.sendMessage("initial_theme_panel", browser.devtools.panels.themeName);
   }
 
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       devtools_page: "devtools_page.html",
     },
     files: {
       "devtools_page.html": `<!DOCTYPE html>
@@ -87,39 +181,56 @@ add_task(async function test_devtools_pa
          DEVTOOLS PANEL
          <script src="devtools_panel.js"></script>
        </body>
       </html>`,
       "devtools_panel.js": devtools_panel,
     },
   });
 
+  registerCleanupFunction(function() {
+    Preferences.reset(DEVTOOLS_THEME_PREF);
+  });
+
+  // Ensure that the initial value of the devtools theme is "light".
+  Preferences.set(DEVTOOLS_THEME_PREF, "light");
+
   await extension.startup();
 
   let target = devtools.TargetFactory.forTab(tab);
 
   const toolbox = await gDevTools.showToolbox(target, "webconsole");
   info("developer toolbox opened");
 
   await extension.awaitMessage("devtools_panel_created");
+  is(await extension.awaitMessage("initial_theme_page"),
+    "light",
+    "The initial theme is reported as expected from a devtools page.");
 
   const toolboxAdditionalTools = toolbox.getAdditionalTools();
 
   is(toolboxAdditionalTools.length, 1,
      "Got the expected number of toolbox specific panel registered.");
 
+  await testThemeSwitching(extension);
+
   const panelId = toolboxAdditionalTools[0].id;
 
   await gDevTools.showToolbox(target, panelId);
   const {devtoolsPageTabId} = await extension.awaitMessage("devtools_panel_shown");
   const devtoolsPanelTabId = await extension.awaitMessage("devtools_panel_inspectedWindow_tabId");
   is(devtoolsPanelTabId, devtoolsPageTabId,
      "Got the same devtools.inspectedWindow.tabId from devtools page and panel");
+  is(await extension.awaitMessage("initial_theme_panel"),
+    "light",
+    "The initial theme is reported as expected from a devtools panel.");
   info("Addon Devtools Panel shown");
 
+  await testThemeSwitching(extension, ["page", "panel"]);
+
   await gDevTools.showToolbox(target, "webconsole");
   const results = await extension.awaitMessage("devtools_panel_hidden");
   info("Addon Devtools Panel hidden");
 
   is(results.panelCreated, 1, "devtools.panel.create callback has been called once");
   is(results.panelShown, 1, "panel.onShown listener has been called once");
   is(results.panelHidden, 1, "panel.onHidden listener has been called once");
 
@@ -165,31 +276,33 @@ add_task(async function test_devtools_pa
      "The tool has been added on visibilityswitch set to true");
   is(toolbox.visibleAdditionalTools.filter(toolId => toolId == panelId).length, 1,
      "The tool is visible on visibilityswitch set to true");
 
   // Test devtools panel is loaded correctly after being toggled and
   // devtools panel events has been fired as expected.
   await gDevTools.showToolbox(target, panelId);
   await extension.awaitMessage("devtools_panel_shown");
+  is(await extension.awaitMessage("initial_theme_panel"),
+    "light",
+    "The initial theme is reported as expected from a devtools panel.");
   info("Addon Devtools Panel shown - after visibilityswitch toggled");
 
   info("Wait until the Addon Devtools Panel has been loaded - after visibilityswitch toggled");
   const panelTabIdAfterToggle = await extension.awaitMessage("devtools_panel_inspectedWindow_tabId");
   is(panelTabIdAfterToggle, devtoolsPageTabId,
      "Got the same devtools.inspectedWindow.tabId from devtools panel after visibility toggled");
 
   await gDevTools.showToolbox(target, "webconsole");
   const toolToggledResults = await extension.awaitMessage("devtools_panel_hidden");
   info("Addon Devtools Panel hidden - after visibilityswitch toggled");
 
   is(toolToggledResults.panelCreated, 1, "devtools.panel.create callback has been called once");
   is(toolToggledResults.panelShown, 3, "panel.onShown listener has been called three times");
   is(toolToggledResults.panelHidden, 3, "panel.onHidden listener has been called three times");
 
   await gDevTools.closeToolbox(target);
-
   await target.destroy();
 
   await extension.unload();
 
   await BrowserTestUtils.removeTab(tab);
 });
--- a/browser/components/migration/.eslintrc.js
+++ b/browser/components/migration/.eslintrc.js
@@ -11,17 +11,16 @@ module.exports = {
     "comma-style": ["error", "last"],
     "complexity": ["error", {"max": 21}],
     "dot-notation": "error",
     "indent": ["error", 2, {"SwitchCase": 1, "ArrayExpression": "first", "ObjectExpression": "first"}],
     "max-nested-callbacks": ["error", 3],
     "new-parens": "error",
     "no-array-constructor": "error",
     "no-control-regex": "error",
-    "no-eval": "error",
     "no-extend-native": "error",
     "no-fallthrough": ["error", { "commentPattern": ".*[Ii]ntentional(?:ly)?\\s+fall(?:ing)?[\\s-]*through.*" }],
     "no-multi-str": "error",
     "no-return-assign": "error",
     "no-sequences": "error",
     "no-shadow": "error",
     "no-throw-literal": "error",
     "no-unneeded-ternary": "error",
--- a/browser/components/preferences/in-content-old/tests/browser_advanced_siteData.js
+++ b/browser/components/preferences/in-content-old/tests/browser_advanced_siteData.js
@@ -711,16 +711,34 @@ add_task(async function() {
       persisted: true
     },
     {
       usage: 1024,
       principal: Services.scriptSecurityManager
                          .createCodebasePrincipalFromOrigin("http://email.bar.com"),
       persisted: false
     },
+    {
+      usage: 1024,
+      principal: Services.scriptSecurityManager
+                         .createCodebasePrincipalFromOrigin("https://s3-us-west-2.amazonaws.com"),
+      persisted: true
+    },
+    {
+      usage: 1024,
+      principal: Services.scriptSecurityManager
+                         .createCodebasePrincipalFromOrigin("https://127.0.0.1"),
+      persisted: false
+    },
+    {
+      usage: 1024,
+      principal: Services.scriptSecurityManager
+                         .createCodebasePrincipalFromOrigin("https://[0:0:0:0:0:0:0:1]"),
+      persisted: true
+    },
   ];
   let fakeHosts = mockSiteDataManager.fakeSites.map(site => site.principal.URI.host);
 
   let updatePromise = promiseSitesUpdated();
   await openPreferencesViaOpenPreferencesAPI("advanced", "networkTab", { leaveOpen: true });
   await updatePromise;
   await openSettingsDialog();
 
--- a/browser/components/preferences/in-content/tests/browser_siteData2.js
+++ b/browser/components/preferences/in-content/tests/browser_siteData2.js
@@ -153,16 +153,34 @@ add_task(async function() {
       persisted: true
     },
     {
       usage: 1024,
       principal: Services.scriptSecurityManager
                          .createCodebasePrincipalFromOrigin("http://email.bar.com"),
       persisted: false
     },
+    {
+      usage: 1024,
+      principal: Services.scriptSecurityManager
+                         .createCodebasePrincipalFromOrigin("https://s3-us-west-2.amazonaws.com"),
+      persisted: true
+    },
+    {
+      usage: 1024,
+      principal: Services.scriptSecurityManager
+                         .createCodebasePrincipalFromOrigin("https://127.0.0.1"),
+      persisted: false
+    },
+    {
+      usage: 1024,
+      principal: Services.scriptSecurityManager
+                         .createCodebasePrincipalFromOrigin("https://[0:0:0:0:0:0:0:1]"),
+      persisted: true
+    },
   ];
   let fakeHosts = mockSiteDataManager.fakeSites.map(site => site.principal.URI.host);
 
   let updatePromise = promiseSiteDataManagerSitesUpdated();
   await openPreferencesViaOpenPreferencesAPI("privacy", { leaveOpen: true });
   await updatePromise;
   await openSiteDataSettingsDialog();
 
--- a/browser/components/preferences/siteDataSettings.js
+++ b/browser/components/preferences/siteDataSettings.js
@@ -1,13 +1,13 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
 /* 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/. */
-const { interfaces: Ci, utils: Cu } = Components;
+const { interfaces: Ci, utils: Cu, results: Cr } = Components;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "SiteDataManager",
                                   "resource:///modules/SiteDataManager.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "DownloadUtils",
                                   "resource://gre/modules/DownloadUtils.jsm");
@@ -170,30 +170,48 @@ let gSiteDataSettings = {
       if (siteForHost) {
         siteForHost.userAction = "remove";
       }
       item.remove();
     }
     this._updateButtonsState();
   },
 
+  _getBaseDomainFromHost(host) {
+    let result = host;
+    try {
+      result = Services.eTLD.getBaseDomainFromHost(host);
+    } catch (e) {
+      if (e.result == Cr.NS_ERROR_HOST_IS_IP_ADDRESS ||
+          e.result == Cr.NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS) {
+        // For this 2 expected errors, just take the host as the result.
+        // - NS_ERROR_HOST_IS_IP_ADDRESS: the host is in ipv4/ipv6.
+        // - NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS: not enough domain part to extract.
+        result = host;
+      } else {
+        throw e;
+      }
+    }
+    return result;
+  },
+
   saveChanges() {
     let allowed = true;
 
     // Confirm user really wants to remove site data starts
-    let removals = [];
+    let removals = new Set();
     this._sites = this._sites.filter(site => {
       if (site.userAction === "remove") {
-        removals.push(site.host);
+        removals.add(site.host);
         return false;
       }
       return true;
     });
 
-    if (removals.length > 0) {
+    if (removals.size > 0) {
       if (this._sites.length == 0) {
         // User selects all sites so equivalent to clearing all data
         let flags =
           Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0 +
           Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1 +
           Services.prompt.BUTTON_POS_0_DEFAULT;
         let prefStrBundle = document.getElementById("bundlePreferences");
         let title = prefStrBundle.getString("clearSiteDataPromptTitle");
@@ -207,27 +225,28 @@ let gSiteDataSettings = {
       } else {
         // User only removes partial sites.
         // We will remove cookies based on base domain, say, user selects "news.foo.com" to remove.
         // The cookies under "music.foo.com" will be removed together.
         // We have to prompt user about this action.
         let hostsTable = new Map();
         // Group removed sites by base domain
         for (let host of removals) {
-          let baseDomain = Services.eTLD.getBaseDomainFromHost(host);
+          let baseDomain = this._getBaseDomainFromHost(host);
           let hosts = hostsTable.get(baseDomain);
           if (!hosts) {
             hosts = [];
             hostsTable.set(baseDomain, hosts);
           }
           hosts.push(host);
         }
+
         // Pick out sites with the same base domain as removed sites
         for (let site of this._sites) {
-          let baseDomain = Services.eTLD.getBaseDomainFromHost(site.host);
+          let baseDomain = this._getBaseDomainFromHost(site.host);
           let hosts = hostsTable.get(baseDomain);
           if (hosts) {
             hosts.push(site.host);
           }
         }
 
         let args = {
           hostsTable,
--- a/browser/components/resistfingerprinting/test/browser/.eslintrc.js
+++ b/browser/components/resistfingerprinting/test/browser/.eslintrc.js
@@ -1,11 +1,8 @@
 "use strict";
 
 module.exports = {
   "extends": [
     "plugin:mozilla/browser-test"
   ],
 
-  "rules": {
-    "no-undef": "error"
-  }
 };
--- a/browser/config/mozconfigs/linux64/hazards
+++ b/browser/config/mozconfigs/linux64/hazards
@@ -2,16 +2,18 @@
 # analysis build (labeled H on treeherder). See
 # https://wiki.mozilla.org/Javascript:SpiderMonkey:ExactStackRooting
 
 # Do NOT include build/unix/mozconfig.linux because it points directly at the
 # tooltool-installed gcc, and the analysis works by wrapping the gcc invocation
 # with a script that invokes the real gcc with -fplugin and its configuration
 # directives. Instead, duplicate the contents of that mozconfig here:
 
+MOZ_HAZARD=1
+
 MOZ_AUTOMATION_BUILD_SYMBOLS=0
 MOZ_AUTOMATION_L10N_CHECK=0
 MOZ_AUTOMATION_PACKAGE=0
 MOZ_AUTOMATION_PACKAGE_TESTS=0
 MOZ_AUTOMATION_UPLOAD=0
 
 . "$topsrcdir/build/mozconfig.common"
 ac_add_options --enable-elf-hack
--- a/browser/extensions/formautofill/.eslintrc.js
+++ b/browser/extensions/formautofill/.eslintrc.js
@@ -25,26 +25,26 @@ module.exports = {
         "Number": "number",
         "String": "string",
         "bool": "boolean",
       },
       "requireParamDescription": false,
       "requireReturn": false,
       "requireReturnDescription": false,
     }],
-   
+
     // Forbid spaces inside the square brackets of array literals.
     "array-bracket-spacing": ["error", "never"],
 
     // Forbid spaces inside the curly brackets of object literals.
     "object-curly-spacing": ["error", "never"],
 
     // No space padding in parentheses
     "space-in-parens": ["error", "never"],
-   
+
     // Commas at the end of the line not the start
     "comma-style": "error",
 
     // Require braces around blocks that start a new line
     "curly": ["error", "all"],
 
     // Require function* name()
     "generator-star-spacing": ["error", {"before": false, "after": true}],
@@ -52,17 +52,17 @@ module.exports = {
     // Two space indent
     "indent": ["error", 2, {"SwitchCase": 1}],
 
     // Always require parenthesis for new calls
     "new-parens": "error",
 
     // Use [] instead of Array()
     "no-array-constructor": "error",
-   
+
     // No expressions where a statement is expected
     "no-unused-expressions": "error",
 
     // No declaring variables that are never used
     "no-unused-vars": ["error", {"args": "none", "varsIgnorePattern": "^(Cc|Ci|Cr|Cu|EXPORTED_SYMBOLS)$"}],
 
     // No using variables before defined
     "no-use-before-define": "error",
@@ -99,19 +99,16 @@ module.exports = {
     "no-caller": "error",
 
     // Disallow using the console API.
     "no-console": "error",
 
     // Disallow control characters in regular expressions.
     "no-control-regex": "error",
 
-    // Disallow use of eval(). We have other APIs to evaluate code in content.
-    "no-eval": "error",
-
     // Disallow fallthrough of case statements, except if there is a comment.
     "no-fallthrough": "error",
 
     // Disallow use of multiline strings (use template strings instead).
     "no-multi-str": "warn",
 
     // Disallow multiple empty lines.
     "no-multiple-empty-lines": ["warn", {"max": 2}],
@@ -140,18 +137,15 @@ module.exports = {
     "semi-spacing": ["error", {"before": false, "after": true}],
 
     // Require "use strict" to be defined globally in the script.
     "strict": ["error", "global"],
 
     // Disallow Yoda conditions (where literal value comes first).
     "yoda": "error",
 
-    // disallow use of eval()-like methods
-    "no-implied-eval": "error",
-
     // Disallow function or variable declarations in nested blocks
     "no-inner-declarations": "error",
 
     // Disallow creating new instances of String, Number, and Boolean
     "no-new-wrappers": "error",
   },
 };
--- a/browser/extensions/formautofill/FormAutofillContent.jsm
+++ b/browser/extensions/formautofill/FormAutofillContent.jsm
@@ -9,16 +9,17 @@
 /* eslint-disable no-use-before-define */
 
 "use strict";
 
 this.EXPORTED_SYMBOLS = ["FormAutofillContent"];
 
 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr, manager: Cm} = Components;
 
+Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://formautofill/FormAutofillUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "ProfileAutoCompleteResult",
                                   "resource://formautofill/ProfileAutoCompleteResult.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "FormAutofillHandler",
                                   "resource://formautofill/FormAutofillHandler.jsm");
@@ -314,30 +315,63 @@ var FormAutofillContent = {
          Services.prefs.getBoolPref("extensions.formautofill.addresses.enabled"))) {
       ProfileAutocomplete.ensureRegistered();
     }
 
     this.savedFieldNames =
       Services.cpmm.initialProcessData.autofillSavedFieldNames;
   },
 
-  _onFormSubmit(handler) {
-    // TODO: Handle form submit event for profile saving(bug 990219) and metrics(bug 1341569).
+  /**
+   * Send the profile to parent for doorhanger and storage saving/updating.
+   *
+   * @param {Object} profile Submitted form's address/creditcard guid and record.
+   */
+  _onFormSubmit(profile) {
+    Services.cpmm.sendAsyncMessage("FormAutofill:OnFormSubmit", profile);
   },
 
-  notify(formElement) {
-    this.log.debug("notified for form early submission");
+  /**
+   * Handle earlyformsubmit event and early return when:
+   * 1. In private browsing mode.
+   * 2. Could not map any autofill handler by form element.
+   * 3. Number of filled fields is less than autofill threshold
+   *
+   * @param {HTMLElement} formElement Root element which receives earlyformsubmit event.
+   * @param {Object} domWin Content window
+   * @returns {boolean} Should always return true so form submission isn't canceled.
+   */
+  notify(formElement, domWin) {
+    this.log.debug("Notifying form early submission");
+
+    if (domWin && PrivateBrowsingUtils.isContentWindowPrivate(domWin)) {
+      this.log.debug("Ignoring submission in a private window");
+      return true;
+    }
 
     let handler = this._formsDetails.get(formElement);
     if (!handler) {
       this.log.debug("Form element could not map to an existing handler");
-    } else {
-      this._onFormSubmit(handler);
+      return true;
+    }
+
+    let pendingAddress = handler.createProfile();
+    if (Object.keys(pendingAddress).length < AUTOFILL_FIELDS_THRESHOLD) {
+      this.log.debug(`Not saving since there are only ${Object.keys(pendingAddress).length} usable fields`);
+      return true;
     }
 
+    this._onFormSubmit({
+      address: {
+        guid: handler.filledProfileGUID,
+        record: pendingAddress,
+      },
+      // creditCard: {}
+    });
+
     return true;
   },
 
   receiveMessage({name, data}) {
     switch (name) {
       case "FormAutofill:enabledStatus": {
         if (data) {
           ProfileAutocomplete.ensureRegistered();
--- a/browser/extensions/formautofill/FormAutofillHandler.jsm
+++ b/browser/extensions/formautofill/FormAutofillHandler.jsm
@@ -128,9 +128,32 @@ FormAutofillHandler.prototype = {
       // We keep the highlight of all fields if this form has
       // already been auto-filled with a profile.
       if (this.filledProfileGUID == null) {
         // TODO: Remove highlight style
       }
     }
     */
   },
+
+  /**
+   * Return the profile that is converted from fieldDetails and only non-empty fields
+   * are included.
+   *
+   * @returns {Object} The new profile that convert from details with trimmed result.
+   */
+  createProfile() {
+    let profile = {};
+
+    this.fieldDetails.forEach(detail => {
+      let element = detail.elementWeakRef.get();
+      // Remove the unnecessary spaces
+      let value = element && element.value.trim();
+      if (!value) {
+        return;
+      }
+
+      profile[detail.fieldName] = value;
+    });
+
+    return profile;
+  },
 };
--- a/browser/extensions/formautofill/FormAutofillParent.jsm
+++ b/browser/extensions/formautofill/FormAutofillParent.jsm
@@ -75,16 +75,17 @@ FormAutofillParent.prototype = {
    * Initializes ProfileStorage and registers the message handler.
    */
   async init() {
     Services.obs.addObserver(this, "advanced-pane-loaded");
     Services.ppmm.addMessageListener("FormAutofill:InitStorage", this);
     Services.ppmm.addMessageListener("FormAutofill:GetAddresses", this);
     Services.ppmm.addMessageListener("FormAutofill:SaveAddress", this);
     Services.ppmm.addMessageListener("FormAutofill:RemoveAddresses", this);
+    Services.ppmm.addMessageListener("FormAutofill:OnFormSubmit", this);
 
     // Observing the pref and storage changes
     Services.prefs.addObserver(ENABLED_PREF, this);
     Services.obs.addObserver(this, "formautofill-storage-changed");
   },
 
   observe(subject, topic, data) {
     log.debug("observe:", topic, "with data:", data);
@@ -187,16 +188,19 @@ FormAutofillParent.prototype = {
           this.profileStorage.addresses.add(data.address);
         }
         break;
       }
       case "FormAutofill:RemoveAddresses": {
         data.guids.forEach(guid => this.profileStorage.addresses.remove(guid));
         break;
       }
+      case "FormAutofill:OnFormSubmit": {
+        this._onFormSubmit(data, target);
+      }
     }
   },
 
   /**
    * Uninitializes FormAutofillParent. This is for testing only.
    *
    * @private
    */
@@ -256,9 +260,22 @@ FormAutofillParent.prototype = {
     this.profileStorage.INTERNAL_FIELDS.forEach((fieldName) => {
       Services.ppmm.initialProcessData.autofillSavedFieldNames.delete(fieldName);
     });
 
     Services.ppmm.broadcastAsyncMessage("FormAutofill:savedFieldNames",
                                         Services.ppmm.initialProcessData.autofillSavedFieldNames);
     this._updateStatus();
   },
+
+  _onFormSubmit(data, target) {
+    let {address} = data;
+
+    if (address.guid) {
+      // TODO: Show update doorhanger(bug 1303513) and set probe(bug 990200)
+      // if (!profileStorage.addresses.mergeIfPossible(address.guid, address.record)) {
+      // }
+    } else {
+      // TODO: Add first time use probe(bug 990199) and doorhanger(bug 1303510)
+      // profileStorage.addresses.add(address.record);
+    }
+  },
 };
--- a/browser/extensions/formautofill/test/browser/browser.ini
+++ b/browser/extensions/formautofill/test/browser/browser.ini
@@ -1,7 +1,11 @@
 [DEFAULT]
 head = head.js
 
+support-files =
+  ../fixtures/autocomplete_basic.html
+
 [browser_check_installed.js]
 [browser_editProfileDialog.js]
 [browser_privacyPreferences.js]
 [browser_manageProfilesDialog.js]
+[browser_submission_in_private_mode.js]
new file mode 100644
--- /dev/null
+++ b/browser/extensions/formautofill/test/browser/browser_submission_in_private_mode.js
@@ -0,0 +1,31 @@
+"use strict";
+
+const FORM_URL = "http://mochi.test:8888/browser/browser/extensions/formautofill/test/browser/autocomplete_basic.html";
+
+add_task(async function test_add_address() {
+  let privateWin = await BrowserTestUtils.openNewBrowserWindow({private: true});
+  let addresses = await getAddresses();
+
+  is(addresses.length, 0, "No address in storage");
+
+  await BrowserTestUtils.withNewTab(
+    {gBrowser: privateWin.gBrowser, url: FORM_URL},
+    async function(privateBrowser) {
+      await ContentTask.spawn(privateBrowser, null, async function() {
+        content.document.getElementById("organization").focus();
+        content.document.getElementById("organization").value = "Mozilla";
+        content.document.getElementById("street-address").value = "331 E. Evelyn Avenue";
+        content.document.getElementById("tel").value = "1-650-903-0800";
+
+        content.document.querySelector("input[type=submit]").click();
+      });
+    }
+  );
+
+  // Wait 1 second to make sure the profile has not been saved
+  await new Promise(resolve => setTimeout(resolve, 1000));
+  addresses = await getAddresses();
+  is(addresses.length, 0, "No address saved in private browsing mode");
+
+  await BrowserTestUtils.closeWindow(privateWin);
+});
--- a/browser/extensions/formautofill/test/unit/test_onFormSubmitted.js
+++ b/browser/extensions/formautofill/test/unit/test_onFormSubmitted.js
@@ -7,24 +7,118 @@ const MOCK_DOC = MockDocument.createTest
                       <input id="street-addr" autocomplete="street-address">
                       <input id="city" autocomplete="address-level2">
                       <input id="country" autocomplete="country">
                       <input id="email" autocomplete="email">
                       <input id="tel" autocomplete="tel">
                       <input id="submit" type="submit">
                     </form>`);
 
-add_task(function* () {
-  do_print("Starting testcase: Make sure content handle earlyformsubmit correctly");
+const TESTCASES = [
+  {
+    description: "Should not trigger saving if the number of fields is less than 3",
+    formValue: {
+      "street-addr": "331 E. Evelyn Avenue",
+      "tel": "1-650-903-0800",
+    },
+    expectedResult: {
+      formSubmission: false,
+    },
+  },
+  {
+    description: "Trigger profile saving",
+    formValue: {
+      "street-addr": "331 E. Evelyn Avenue",
+      "country": "USA",
+      "tel": "1-650-903-0800",
+    },
+    expectedResult: {
+      formSubmission: true,
+      profile: {
+        address: {
+          guid: null,
+          record: {
+            "street-address": "331 E. Evelyn Avenue",
+            "country": "USA",
+            "tel": "1-650-903-0800",
+          },
+        },
+      },
+    },
+  },
+  {
+    description: "Profile saved with trimmed string",
+    formValue: {
+      "street-addr": "331 E. Evelyn Avenue  ",
+      "country": "USA",
+      "tel": "  1-650-903-0800",
+    },
+    expectedResult: {
+      formSubmission: true,
+      profile: {
+        address: {
+          guid: null,
+          record: {
+            "street-address": "331 E. Evelyn Avenue",
+            "country": "USA",
+            "tel": "1-650-903-0800",
+          },
+        },
+      },
+    },
+  },
+  {
+    description: "Eliminate the field that is empty after trimmed",
+    formValue: {
+      "street-addr": "331 E. Evelyn Avenue",
+      "country": "USA",
+      "email": "  ",
+      "tel": "1-650-903-0800",
+    },
+    expectedResult: {
+      formSubmission: true,
+      profile: {
+        address: {
+          guid: null,
+          record: {
+            "street-address": "331 E. Evelyn Avenue",
+            "country": "USA",
+            "tel": "1-650-903-0800",
+          },
+        },
+      },
+    },
+  },
+];
 
-  let form = MOCK_DOC.getElementById("form1");
-  FormAutofillContent.identifyAutofillFields(MOCK_DOC);
+add_task(async function handle_earlyformsubmit_event() {
+  do_print("Starting testcase: Test an invalid form element");
+  let fakeForm = MOCK_DOC.createElement("form");
   sinon.spy(FormAutofillContent, "_onFormSubmit");
 
-  do_check_eq(FormAutofillContent.notify(form), true);
-  do_check_eq(FormAutofillContent._onFormSubmit.called, true);
-
-  let fakeForm = MOCK_DOC.createElement("form");
-  FormAutofillContent._onFormSubmit.reset();
-
   do_check_eq(FormAutofillContent.notify(fakeForm), true);
   do_check_eq(FormAutofillContent._onFormSubmit.called, false);
+  FormAutofillContent._onFormSubmit.restore();
 });
+
+TESTCASES.forEach(testcase => {
+  add_task(async function check_profile_saving_is_called_correctly() {
+    do_print("Starting testcase: " + testcase.description);
+
+    let form = MOCK_DOC.getElementById("form1");
+    for (let key in testcase.formValue) {
+      let input = MOCK_DOC.getElementById(key);
+      input.value = testcase.formValue[key];
+    }
+    sinon.spy(FormAutofillContent, "_onFormSubmit");
+
+    FormAutofillContent.identifyAutofillFields(MOCK_DOC);
+    FormAutofillContent.notify(form);
+
+    do_check_eq(FormAutofillContent._onFormSubmit.called,
+                testcase.expectedResult.formSubmission);
+    if (FormAutofillContent._onFormSubmit.called) {
+      Assert.deepEqual(FormAutofillContent._onFormSubmit.args[0][0],
+                       testcase.expectedResult.profile);
+    }
+    FormAutofillContent._onFormSubmit.restore();
+  });
+});
--- a/browser/extensions/mortar/host/common/ppapi-runtime.jsm
+++ b/browser/extensions/mortar/host/common/ppapi-runtime.jsm
@@ -1806,17 +1806,18 @@ class PPAPIInstance {
   }
 
   viewportActionHandler(message) {
     switch(message.type) {
       case 'setFullscreen':
         this.mm.sendAsyncMessage("ppapi.js:setFullscreen", message.fullscreen);
         break;
       case 'save':
-        this.mm.sendAsyncMessage("ppapipdf.js:save");
+        this.mm.sendAsyncMessage("ppapipdf.js:save", {
+          url: this.info.url });
         break;
       case 'setHash':
         this.mm.sendAsyncMessage("ppapipdf.js:setHash", message.hash);
         break;
       case 'startPrint':
         // We need permission for showing print dialog to get print settings
         this.mm.sendAsyncMessage("ppapipdf.js:getPrintSettings", {
           url: this.info.url });
--- a/browser/extensions/mortar/host/pdf/ppapi-content-sandbox.js
+++ b/browser/extensions/mortar/host/pdf/ppapi-content-sandbox.js
@@ -217,18 +217,18 @@ mm.addMessageListener("ppapipdf.js:openL
     case PDFIUM_WINDOW_OPEN_DISPOSITION.NEW_WINDOW:
       containerWindow.open(data.url, "",
         "noopener=1,menubar=1,toolbar=1," +
         "location=1,personalbar=1,status=1,resizable");
       break;
   }
 });
 
-mm.addMessageListener("ppapipdf.js:save", () => {
-  let url = containerWindow.document.location;
+mm.addMessageListener("ppapipdf.js:save", ({ data }) => {
+  let url = new containerWindow.URL(data.url);
   let filename = getFileName(url);
   let originalUri = NetUtil.newURI(url.href);
   let extHelperAppSvc =
         Cc["@mozilla.org/uriloader/external-helper-app-service;1"].
            getService(Ci.nsIExternalHelperAppService);
 
   let docIsPrivate =
     PrivateBrowsingUtils.isContentWindowPrivate(containerWindow);
--- a/browser/extensions/shield-recipe-client/install.rdf.in
+++ b/browser/extensions/shield-recipe-client/install.rdf.in
@@ -3,17 +3,17 @@
 #filter substitution
 
 <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
   <Description about="urn:mozilla:install-manifest">
     <em:id>shield-recipe-client@mozilla.org</em:id>
     <em:type>2</em:type>
     <em:bootstrap>true</em:bootstrap>
     <em:unpack>false</em:unpack>
-    <em:version>51</em:version>
+    <em:version>55</em:version>
     <em:name>Shield Recipe Client</em:name>
     <em:description>Client to download and run recipes for SHIELD, Heartbeat, etc.</em:description>
     <em:multiprocessCompatible>true</em:multiprocessCompatible>
 
     <em:targetApplication>
       <Description>
         <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
         <em:minVersion>@MOZ_APP_VERSION@</em:minVersion>
--- a/browser/extensions/shield-recipe-client/lib/Heartbeat.jsm
+++ b/browser/extensions/shield-recipe-client/lib/Heartbeat.jsm
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const {utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/Preferences.jsm");
 Cu.import("resource://gre/modules/TelemetryController.jsm");
-Cu.import("resource://gre/modules/Timer.jsm"); /* globals setTimeout, clearTimeout */
+Cu.import("resource://gre/modules/Timer.jsm");
 Cu.import("resource://shield-recipe-client/lib/CleanupManager.jsm");
 Cu.import("resource://shield-recipe-client/lib/EventEmitter.jsm");
 Cu.import("resource://shield-recipe-client/lib/LogManager.jsm");
 
 Cu.importGlobalProperties(["URL"]); /* globals URL */
 
 this.EXPORTED_SYMBOLS = ["Heartbeat"];
 
--- a/browser/extensions/shield-recipe-client/lib/NormandyApi.jsm
+++ b/browser/extensions/shield-recipe-client/lib/NormandyApi.jsm
@@ -57,19 +57,22 @@ this.NormandyApi = {
       return url;
     } else if (url.startsWith("/")) {
       return server + url;
     }
     throw new Error("Can't use relative urls");
   },
 
   async getApiUrl(name) {
-    const apiBase = prefs.getCharPref("api_url");
     if (!indexPromise) {
-      indexPromise = this.get(apiBase).then(res => res.json());
+      let apiBase = new URL(prefs.getCharPref("api_url"));
+      if (!apiBase.pathname.endsWith("/")) {
+        apiBase.pathname += "/";
+      }
+      indexPromise = this.get(apiBase.toString()).then(res => res.json());
     }
     const index = await indexPromise;
     if (!(name in index)) {
       throw new Error(`API endpoint with name "${name}" not found.`);
     }
     const url = index[name];
     return this.absolutify(url);
   },
--- a/browser/extensions/shield-recipe-client/lib/NormandyDriver.jsm
+++ b/browser/extensions/shield-recipe-client/lib/NormandyDriver.jsm
@@ -5,17 +5,17 @@
 "use strict";
 
 const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/Preferences.jsm");
 Cu.import("resource:///modules/ShellService.jsm");
 Cu.import("resource://gre/modules/AddonManager.jsm");
-Cu.import("resource://gre/modules/Timer.jsm"); /* globals setTimeout, clearTimeout */
+Cu.import("resource://gre/modules/Timer.jsm");
 Cu.import("resource://shield-recipe-client/lib/LogManager.jsm");
 Cu.import("resource://shield-recipe-client/lib/Storage.jsm");
 Cu.import("resource://shield-recipe-client/lib/Heartbeat.jsm");
 Cu.import("resource://shield-recipe-client/lib/FilterExpressions.jsm");
 Cu.import("resource://shield-recipe-client/lib/ClientEnvironment.jsm");
 Cu.import("resource://shield-recipe-client/lib/PreferenceExperiments.jsm");
 Cu.import("resource://shield-recipe-client/lib/Sampling.jsm");
 
@@ -118,25 +118,30 @@ this.NormandyDriver = function(sandboxMa
     },
 
     uuid() {
       let ret = generateUUID().toString();
       ret = ret.slice(1, ret.length - 1);
       return ret;
     },
 
-    createStorage(keyPrefix) {
-      let storage;
-      try {
-        storage = Storage.makeStorage(keyPrefix, sandbox);
-      } catch (e) {
-        log.error(e.stack);
-        throw e;
+    createStorage(prefix) {
+      const storage = new Storage(prefix);
+
+      // Wrapped methods that we expose to the sandbox. These are documented in
+      // the driver spec in docs/dev/driver.rst.
+      const storageInterface = {};
+      for (const method of ["getItem", "setItem", "removeItem", "clear"]) {
+        storageInterface[method] = sandboxManager.wrapAsync(storage[method].bind(storage), {
+          cloneArguments: true,
+          cloneInto: true,
+        });
       }
-      return storage;
+
+      return sandboxManager.cloneInto(storageInterface, {cloneFunctions: true});
     },
 
     setTimeout(cb, time) {
       if (typeof cb !== "function") {
         throw new sandbox.Error(`setTimeout must be called with a function, got "${typeof cb}"`);
       }
       const token = setTimeout(() => {
         cb();
--- a/browser/extensions/shield-recipe-client/lib/PreferenceExperiments.jsm
+++ b/browser/extensions/shield-recipe-client/lib/PreferenceExperiments.jsm
@@ -36,18 +36,16 @@
  *   Value to change the preference to during the experiment.
  * @property {string} preferenceType
  *   Type of the preference value being set.
  * @property {string|integer|boolean|undefined} previousPreferenceValue
  *   Value of the preference prior to the experiment, or undefined if it was
  *   unset.
  * @property {PreferenceBranchType} preferenceBranchType
  *   Controls how we modify the preference to affect the client.
- * @rejects {Error}
- *   If the given preferenceType does not match the existing stored preference.
  *
  *   If "default", when the experiment is active, the default value for the
  *   preference is modified on startup of the add-on. If "user", the user value
  *   for the preference is modified when the experiment starts, and is reset to
  *   its original value when the experiment ends.
  */
 
 "use strict";
@@ -168,18 +166,19 @@ this.PreferenceExperiments = {
    * Start a new preference experiment.
    * @param {Object} experiment
    * @param {string} experiment.name
    * @param {string} experiment.branch
    * @param {string} experiment.preferenceName
    * @param {string|integer|boolean} experiment.preferenceValue
    * @param {PreferenceBranchType} experiment.preferenceBranchType
    * @rejects {Error}
-   *   If an experiment with the given name already exists, or if an experiment
-   *   for the given preference is active.
+   *   - If an experiment with the given name already exists
+   *   - if an experiment for the given preference is active
+   *   - If the given preferenceType does not match the existing stored preference
    */
   async start({name, branch, preferenceName, preferenceValue, preferenceBranchType, preferenceType}) {
     log.debug(`PreferenceExperiments.start(${name}, ${branch})`);
 
     const store = await ensureStorage();
     if (name in store.data) {
       throw new Error(`A preference experiment named "${name}" already exists.`);
     }
@@ -216,17 +215,18 @@ this.PreferenceExperiments = {
     const givenPrefType = PREFERENCE_TYPE_MAP[preferenceType];
 
     if (!preferenceType || !givenPrefType) {
       throw new Error(`Invalid preferenceType provided (given "${preferenceType}")`);
     }
 
     if (prevPrefType !== Services.prefs.PREF_INVALID && prevPrefType !== givenPrefType) {
       throw new Error(
-        `Previous preference value is of type "${prevPrefType}", but was given "${givenPrefType}" (${preferenceType})`
+        `Previous preference value is of type "${prevPrefType}", but was given ` +
+        `"${givenPrefType}" (${preferenceType})`
       );
     }
 
     preferences.set(preferenceName, preferenceValue);
     PreferenceExperiments.startObserver(name, preferenceName, preferenceValue);
     store.data[name] = experiment;
     store.saveSoon();
 
--- a/browser/extensions/shield-recipe-client/lib/RecipeRunner.jsm
+++ b/browser/extensions/shield-recipe-client/lib/RecipeRunner.jsm
@@ -25,17 +25,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource://shield-recipe-client/lib/SandboxManager.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "ClientEnvironment",
                                   "resource://shield-recipe-client/lib/ClientEnvironment.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "CleanupManager",
                                   "resource://shield-recipe-client/lib/CleanupManager.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "ActionSandboxManager",
                                   "resource://shield-recipe-client/lib/ActionSandboxManager.jsm");
 
-Cu.importGlobalProperties(["fetch"]); /* globals fetch */
+Cu.importGlobalProperties(["fetch"]);
 
 this.EXPORTED_SYMBOLS = ["RecipeRunner"];
 
 const log = LogManager.getLogger("recipe-runner");
 const prefs = Services.prefs.getBranch("extensions.shield-recipe-client.");
 const TIMER_NAME = "recipe-client-addon-run";
 const RUN_INTERVAL_PREF = "run_interval_seconds";
 
--- a/browser/extensions/shield-recipe-client/lib/Storage.jsm
+++ b/browser/extensions/shield-recipe-client/lib/Storage.jsm
@@ -1,147 +1,89 @@
 /* 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";
 
 const {utils: Cu} = Components;
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://shield-recipe-client/lib/LogManager.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "JSONFile", "resource://gre/modules/JSONFile.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
 
 this.EXPORTED_SYMBOLS = ["Storage"];
 
-const log = LogManager.getLogger("storage");
-let storePromise;
-
-function loadStorage() {
-  if (storePromise === undefined) {
-    const path = OS.Path.join(OS.Constants.Path.profileDir, "shield-recipe-client.json");
-    const storage = new JSONFile({path});
-    storePromise = (async function() {
-      await storage.load();
-      return storage;
-    })();
-  }
-  return storePromise;
-}
-
-this.Storage = {
-  makeStorage(prefix, sandbox) {
-    if (!sandbox) {
-      throw new Error("No sandbox passed");
-    }
-
-    const storageInterface = {
-      /**
-       * Sets an item in the prefixed storage.
-       * @returns {Promise}
-       * @resolves With the stored value, or null.
-       * @rejects Javascript exception.
-       */
-      getItem(keySuffix) {
-        return new sandbox.Promise((resolve, reject) => {
-          loadStorage()
-            .then(store => {
-              const namespace = store.data[prefix] || {};
-              const value = namespace[keySuffix] || null;
-              resolve(Cu.cloneInto(value, sandbox));
-            })
-            .catch(err => {
-              log.error(err);
-              reject(new sandbox.Error());
-            });
-        });
-      },
+// Lazy-load JSON file that backs Storage instances.
+XPCOMUtils.defineLazyGetter(this, "lazyStore", async function() {
+  const path = OS.Path.join(OS.Constants.Path.profileDir, "shield-recipe-client.json");
+  const store = new JSONFile({path});
+  await store.load();
+  return store;
+});
 
-      /**
-       * Sets an item in the prefixed storage.
-       * @returns {Promise}
-       * @resolves When the operation is completed succesfully
-       * @rejects Javascript exception.
-       */
-      setItem(keySuffix, value) {
-        return new sandbox.Promise((resolve, reject) => {
-          loadStorage()
-            .then(store => {
-              if (!(prefix in store.data)) {
-                store.data[prefix] = {};
-              }
-              store.data[prefix][keySuffix] = Cu.cloneInto(value, {});
-              store.saveSoon();
-              resolve();
-            })
-            .catch(err => {
-              log.error(err);
-              reject(new sandbox.Error());
-            });
-        });
-      },
-
-      /**
-       * Removes a single item from the prefixed storage.
-       * @returns {Promise}
-       * @resolves When the operation is completed succesfully
-       * @rejects Javascript exception.
-       */
-      removeItem(keySuffix) {
-        return new sandbox.Promise((resolve, reject) => {
-          loadStorage()
-            .then(store => {
-              if (!(prefix in store.data)) {
-                return;
-              }
-              delete store.data[prefix][keySuffix];
-              store.saveSoon();
-              resolve();
-            })
-            .catch(err => {
-              log.error(err);
-              reject(new sandbox.Error());
-            });
-        });
-      },
-
-      /**
-       * Clears all storage for the prefix.
-       * @returns {Promise}
-       * @resolves When the operation is completed succesfully
-       * @rejects Javascript exception.
-       */
-      clear() {
-        return new sandbox.Promise((resolve, reject) => {
-          return loadStorage()
-            .then(store => {
-              store.data[prefix] = {};
-              store.saveSoon();
-              resolve();
-            })
-            .catch(err => {
-              log.error(err);
-              reject(new sandbox.Error());
-            });
-        });
-      },
-    };
-
-    return Cu.cloneInto(storageInterface, sandbox, {
-      cloneFunctions: true,
-    });
-  },
+this.Storage = class {
+  constructor(prefix) {
+    this.prefix = prefix;
+  }
 
   /**
    * Clear ALL storage data and save to the disk.
    */
-  clearAllStorage() {
-    return loadStorage()
-      .then(store => {
-        store.data = {};
-        store.saveSoon();
-      })
-      .catch(err => {
-        log.error(err);
-      });
-  },
+  static async clearAllStorage() {
+    const store = await lazyStore;
+    store.data = {};
+    store.saveSoon();
+  }
+
+  /**
+   * Sets an item in the prefixed storage.
+   * @returns {Promise}
+   * @resolves With the stored value, or null.
+   * @rejects Javascript exception.
+   */
+  async getItem(name) {
+    const store = await lazyStore;
+    const namespace = store.data[this.prefix] || {};
+    return namespace[name] || null;
+  }
+
+  /**
+   * Sets an item in the prefixed storage.
+   * @returns {Promise}
+   * @resolves When the operation is completed succesfully
+   * @rejects Javascript exception.
+   */
+  async setItem(name, value) {
+    const store = await lazyStore;
+    if (!(this.prefix in store.data)) {
+      store.data[this.prefix] = {};
+    }
+    store.data[this.prefix][name] = value;
+    store.saveSoon();
+  }
+
+  /**
+   * Removes a single item from the prefixed storage.
+   * @returns {Promise}
+   * @resolves When the operation is completed succesfully
+   * @rejects Javascript exception.
+   */
+  async removeItem(name) {
+    const store = await lazyStore;
+    if (this.prefix in store.data) {
+      delete store.data[this.prefix][name];
+      store.saveSoon();
+    }
+  }
+
+  /**
+   * Clears all storage for the prefix.
+   * @returns {Promise}
+   * @resolves When the operation is completed succesfully
+   * @rejects Javascript exception.
+   */
+  async clear() {
+    const store = await lazyStore;
+    store.data[this.prefix] = {};
+    store.saveSoon();
+  }
 };
--- a/browser/extensions/shield-recipe-client/test/.eslintrc.js
+++ b/browser/extensions/shield-recipe-client/test/.eslintrc.js
@@ -1,16 +1,9 @@
 "use strict";
 
 module.exports = {
-  globals: {
-    Assert: false,
-    add_task: false,
-    getRootDirectory: false,
-    gTestPath: false,
-    Cu: false,
-  },
   rules: {
     "spaced-comment": 2,
     "space-before-function-paren": 2,
     "require-yield": 0
   }
 };
--- a/browser/extensions/shield-recipe-client/test/browser/.eslintrc.js
+++ b/browser/extensions/shield-recipe-client/test/browser/.eslintrc.js
@@ -1,23 +1,17 @@
 "use strict";
 
 module.exports = {
+  extends: [
+    "plugin:mozilla/browser-test"
+  ],
+
+  plugins: [
+    "mozilla"
+  ],
+
   globals: {
-    BrowserTestUtils: false,
-    is: false,
-    isnot: false,
-    ok: false,
-    SpecialPowers: false,
-    SimpleTest: false,
-    registerCleanupFunction: false,
-    window: false,
-    sinon: false,
-    Cu: false,
-    Ci: false,
-    Cc: false,
-    UUID_REGEX: false,
-    withSandboxManager: false,
-    withDriver: false,
-    withMockNormandyApi: false,
-    withMockPreferences: false,
-  },
+    // Bug 1366720 - SimpleTest isn't being exported correctly, so list
+    // it here for now.
+    "SimpleTest": false
+  }
 };
--- a/browser/extensions/shield-recipe-client/test/browser/browser_NormandyDriver.js
+++ b/browser/extensions/shield-recipe-client/test/browser/browser_NormandyDriver.js
@@ -1,10 +1,12 @@
 "use strict";
 
+Cu.import("resource://shield-recipe-client/lib/NormandyDriver.jsm", this);
+
 add_task(withDriver(Assert, async function uuids(driver) {
   // Test that it is a UUID
   const uuid1 = driver.uuid();
   ok(UUID_REGEX.test(uuid1), "valid uuid format");
 
   // Test that UUIDs are different each time
   const uuid2 = driver.uuid();
   isnot(uuid1, uuid2, "uuids are unique");
@@ -37,8 +39,44 @@ add_task(withDriver(Assert, async functi
 add_task(withDriver(Assert, async function distribution(driver) {
   let client = await driver.client();
   is(client.distribution, "default", "distribution has a default value");
 
   await SpecialPowers.pushPrefEnv({set: [["distribution.id", "funnelcake"]]});
   client = await driver.client();
   is(client.distribution, "funnelcake", "distribution is read from preferences");
 }));
+
+add_task(withSandboxManager(Assert, async function testCreateStorage(sandboxManager) {
+  const driver = new NormandyDriver(sandboxManager);
+  sandboxManager.cloneIntoGlobal("driver", driver, {cloneFunctions: true});
+
+  // Assertion helpers
+  sandboxManager.addGlobal("is", is);
+  sandboxManager.addGlobal("deepEqual", (...args) => Assert.deepEqual(...args));
+
+  await sandboxManager.evalInSandbox(`
+    (async function sandboxTest() {
+      const store = driver.createStorage("testprefix");
+      const otherStore = driver.createStorage("othertestprefix");
+      await store.clear();
+      await otherStore.clear();
+
+      await store.setItem("willremove", 7);
+      await otherStore.setItem("willremove", 4);
+      is(await store.getItem("willremove"), 7, "createStorage stores sandbox values");
+      is(
+        await otherStore.getItem("willremove"),
+        4,
+        "values are not shared between createStorage stores",
+      );
+
+      const deepValue = {"foo": ["bar", "baz"]};
+      await store.setItem("deepValue", deepValue);
+      deepEqual(await store.getItem("deepValue"), deepValue, "createStorage clones stored values");
+
+      await store.removeItem("willremove");
+      is(await store.getItem("willremove"), null, "createStorage removes items");
+
+      is('prefix' in store, false, "createStorage doesn't expose non-whitelist attributes");
+    })();
+  `);
+}));
--- a/browser/extensions/shield-recipe-client/test/browser/browser_Storage.js
+++ b/browser/extensions/shield-recipe-client/test/browser/browser_Storage.js
@@ -1,17 +1,16 @@
 "use strict";
 
 Cu.import("resource://shield-recipe-client/lib/Storage.jsm", this);
 Cu.import("resource://shield-recipe-client/lib/SandboxManager.jsm", this);
 
 add_task(async function() {
-  const fakeSandbox = {Promise};
-  const store1 = Storage.makeStorage("prefix1", fakeSandbox);
-  const store2 = Storage.makeStorage("prefix2", fakeSandbox);
+  const store1 = new Storage("prefix1");
+  const store2 = new Storage("prefix2");
 
   // Make sure values return null before being set
   Assert.equal(await store1.getItem("key"), null);
   Assert.equal(await store2.getItem("key"), null);
 
   // Set values to check
   await store1.setItem("key", "value1");
   await store2.setItem("key", "value2");
@@ -40,30 +39,8 @@ add_task(async function() {
   await store1.setItem("removeTest", 1);
   await store2.setItem("removeTest", 2);
   Assert.equal(await store1.getItem("removeTest"), 1);
   Assert.equal(await store2.getItem("removeTest"), 2);
   await Storage.clearAllStorage();
   Assert.equal(await store1.getItem("removeTest"), null);
   Assert.equal(await store2.getItem("removeTest"), null);
 });
-
-add_task(async function testSandboxValueStorage() {
-  const manager1 = new SandboxManager();
-  const manager2 = new SandboxManager();
-  const store1 = Storage.makeStorage("testSandboxValueStorage", manager1.sandbox);
-  const store2 = Storage.makeStorage("testSandboxValueStorage", manager2.sandbox);
-  manager1.addGlobal("store", store1);
-  manager2.addGlobal("store", store2);
-  manager1.addHold("testing");
-  manager2.addHold("testing");
-
-  await manager1.evalInSandbox("store.setItem('foo', {foo: 'bar'});");
-  manager1.removeHold("testing");
-  await manager1.isNuked();
-
-  const objectMatches = await manager2.evalInSandbox(`
-    store.getItem("foo").then(item => item.foo === "bar");
-  `);
-  ok(objectMatches, "Values persisted in a store survive after their originating sandbox is nuked");
-
-  manager2.removeHold("testing");
-});
--- a/browser/extensions/shield-recipe-client/test/browser/head.js
+++ b/browser/extensions/shield-recipe-client/test/browser/head.js
@@ -5,16 +5,17 @@ Cu.import("resource://gre/modules/Prefer
 Cu.import("resource://shield-recipe-client/lib/SandboxManager.jsm", this);
 Cu.import("resource://shield-recipe-client/lib/NormandyDriver.jsm", this);
 Cu.import("resource://shield-recipe-client/lib/NormandyApi.jsm", this);
 Cu.import("resource://shield-recipe-client/lib/Utils.jsm", this);
 
 // Load mocking/stubbing library, sinon
 // docs: http://sinonjs.org/docs/
 const loader = Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader);
+/* global sinon */
 loader.loadSubScript("resource://testing-common/sinon-1.16.1.js");
 
 // Make sinon assertions fail in a way that mochitest understands
 sinon.assert.fail = function(message) {
   ok(false, message);
 };
 
 registerCleanupFunction(async function() {
--- a/browser/extensions/shield-recipe-client/test/unit/.eslintrc.js
+++ b/browser/extensions/shield-recipe-client/test/unit/.eslintrc.js
@@ -1,15 +1,11 @@
 "use strict";
 
 module.exports = {
-  globals: {
-    do_get_file: false,
-    equal: false,
-    Cu: false,
-    ok: false,
-    load: false,
-    do_register_cleanup: false,
-    sinon: false,
-    notEqual: false,
-    deepEqual: false,
-  },
+  extends: [
+    "plugin:mozilla/xpcshell-test"
+  ],
+
+  plugins: [
+    "mozilla"
+  ],
 };
rename from browser/extensions/shield-recipe-client/test/unit/xpc_head.js
rename to browser/extensions/shield-recipe-client/test/unit/head_xpc.js
--- a/browser/extensions/shield-recipe-client/test/unit/xpc_head.js
+++ b/browser/extensions/shield-recipe-client/test/unit/head_xpc.js
@@ -1,10 +1,12 @@
 "use strict";
 
+// List these manually due to bug 1366719.
+/* global Cc, Ci, Cu */
 const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
 
 // Load our bootstrap extension manifest so we can access our chrome/resource URIs.
 // Cargo culted from formautofill system add-on
 const EXTENSION_ID = "shield-recipe-client@mozilla.org";
 let extensionDir = Services.dirsvc.get("GreD", Ci.nsIFile);
@@ -19,10 +21,12 @@ if (!extensionDir.exists()) {
 Components.manager.addBootstrappedManifestLocation(extensionDir);
 
 // Load Sinon for mocking/stubbing during tests.
 // Sinon assumes that setTimeout and friends are available, and looks for a
 // global object named self during initialization.
 Cu.import("resource://gre/modules/Timer.jsm");
 const self = {}; // eslint-disable-line no-unused-vars
 
+/* global sinon */
+/* exported sinon */
 const loader = Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader);
 loader.loadSubScript("resource://testing-common/sinon-1.16.1.js");
--- a/browser/extensions/shield-recipe-client/test/unit/test_NormandyApi.js
+++ b/browser/extensions/shield-recipe-client/test/unit/test_NormandyApi.js
@@ -1,31 +1,29 @@
 "use strict";
-// Cu is defined in xpc_head.js
-/* globals Cu */
 
 Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://testing-common/httpd.js"); /* globals HttpServer */
-Cu.import("resource://gre/modules/osfile.jsm", this); /* globals OS */
+Cu.import("resource://testing-common/httpd.js");
+Cu.import("resource://gre/modules/osfile.jsm", this);
 Cu.import("resource://shield-recipe-client/lib/NormandyApi.jsm", this);
 
 load("utils.js"); /* globals withMockPreferences */
 
 function withServer(server, task) {
   return withMockPreferences(async function inner(preferences) {
     const serverUrl = `http://localhost:${server.identity.primaryPort}`;
     preferences.set("extensions.shield-recipe-client.api_url", `${serverUrl}/api/v1`);
     preferences.set(
       "security.content.signature.root_hash",
       // Hash of the key that signs the normandy dev certificates
       "4C:35:B1:C3:E3:12:D9:55:E7:78:ED:D0:A7:E7:8A:38:83:04:EF:01:BF:FA:03:29:B2:46:9F:3C:C5:EC:36:04"
     );
 
     try {
-      await task(serverUrl);
+      await task(serverUrl, preferences);
     } finally {
       await new Promise(resolve => server.stop(resolve));
     }
   });
 }
 
 function makeScriptServer(scriptPath) {
   const server = new HttpServer();
@@ -72,28 +70,60 @@ function makeMockApiServer() {
 }
 
 function withMockApiServer(task) {
   return withServer(makeMockApiServer(), task);
 }
 
 add_task(withMockApiServer(async function test_get(serverUrl) {
   // Test that NormandyApi can fetch from the test server.
-  const response = await NormandyApi.get(`${serverUrl}/api/v1`);
+  const response = await NormandyApi.get(`${serverUrl}/api/v1/`);
   const data = await response.json();
   equal(data["recipe-list"], "/api/v1/recipe/", "Expected data in response");
 }));
 
 add_task(withMockApiServer(async function test_getApiUrl(serverUrl) {
   const apiBase = `${serverUrl}/api/v1`;
   // Test that NormandyApi can use the self-describing API's index
   const recipeListUrl = await NormandyApi.getApiUrl("action-list");
   equal(recipeListUrl, `${apiBase}/action/`, "Can retrieve action-list URL from API");
 }));
 
+add_task(withMockApiServer(async function test_getApiUrlSlashes(serverUrl, preferences) {
+  const fakeResponse = {
+    async json() {
+      return {"test-endpoint": `${serverUrl}/test/`};
+    },
+  };
+  const mockGet = sinon.stub(NormandyApi, "get", async () => fakeResponse);
+
+  // without slash
+  {
+    NormandyApi.clearIndexCache();
+    preferences.set("extensions.shield-recipe-client.api_url", `${serverUrl}/api/v1`);
+    const endpoint = await NormandyApi.getApiUrl("test-endpoint");
+    equal(endpoint, `${serverUrl}/test/`);
+    ok(mockGet.calledWithExactly(`${serverUrl}/api/v1/`), "trailing slash was added");
+    mockGet.reset();
+  }
+
+  // with slash
+  {
+    NormandyApi.clearIndexCache();
+    preferences.set("extensions.shield-recipe-client.api_url", `${serverUrl}/api/v1/`);
+    const endpoint = await NormandyApi.getApiUrl("test-endpoint");
+    equal(endpoint, `${serverUrl}/test/`);
+    ok(mockGet.calledWithExactly(`${serverUrl}/api/v1/`), "existing trailing slash was preserved");
+    mockGet.reset();
+  }
+
+  NormandyApi.clearIndexCache();
+  mockGet.restore();
+}));
+
 add_task(withMockApiServer(async function test_fetchRecipes() {
   const recipes = await NormandyApi.fetchRecipes();
   equal(recipes.length, 1);
   equal(recipes[0].name, "system-addon-test");
 }));
 
 add_task(withMockApiServer(async function test_classifyClient() {
   const classification = await NormandyApi.classifyClient();
--- a/browser/extensions/shield-recipe-client/test/unit/test_Sampling.js
+++ b/browser/extensions/shield-recipe-client/test/unit/test_Sampling.js
@@ -1,11 +1,9 @@
 "use strict";
-// Cu is defined in xpc_head.js
-/* globals Cu */
 
 Cu.import("resource://shield-recipe-client/lib/Sampling.jsm", this);
 
 add_task(async function testStableSample() {
   // Absolute samples
   equal(await Sampling.stableSample("test", 1), true, "stableSample returns true for 100% sample");
   equal(await Sampling.stableSample("test", 0), false, "stableSample returns false for 0% sample");
 
--- a/browser/extensions/shield-recipe-client/test/unit/test_SandboxManager.js
+++ b/browser/extensions/shield-recipe-client/test/unit/test_SandboxManager.js
@@ -1,15 +1,15 @@
 "use strict";
 
 Cu.import("resource://shield-recipe-client/lib/SandboxManager.jsm");
 
 // wrapAsync should wrap privileged Promises with Promises that are usable by
 // the sandbox.
-add_task(async function() {
+add_task(function* () {
   const manager = new SandboxManager();
   manager.addHold("testing");
 
   manager.cloneIntoGlobal("driver", {
     async privileged() {
       return "privileged";
     },
     wrapped: manager.wrapAsync(async function() {
@@ -20,17 +20,17 @@ add_task(async function() {
       return this.aValue;
     }),
   }, {cloneFunctions: true});
 
   // Assertion helpers
   manager.addGlobal("ok", ok);
   manager.addGlobal("equal", equal);
 
-  const sandboxResult = await new Promise(resolve => {
+  const sandboxResult = yield new Promise(resolve => {
     manager.addGlobal("resolve", result => resolve(result));
     manager.evalInSandbox(`
       // Unwrapped privileged promises are not accessible in the sandbox
       try {
         const privilegedResult = driver.privileged().then(() => false);
         ok(false, "The sandbox could not use a privileged Promise");
       } catch (err) { }
 
@@ -40,31 +40,31 @@ add_task(async function() {
 
       // Resolve the Promise around the sandbox with the wrapped result to test
       // that the Promise in the sandbox works.
       wrappedResult.then(resolve);
     `);
   });
   equal(sandboxResult, "wrapped", "wrapAsync methods return Promises that work in the sandbox");
 
-  await manager.evalInSandbox(`
+  yield manager.evalInSandbox(`
     (async function sandboxTest() {
       equal(
         await driver.wrappedThis(),
         "aValue",
         "wrapAsync preserves the behavior of the this keyword",
       );
     })();
   `);
 
   manager.removeHold("testing");
 });
 
 // wrapAsync cloning options
-add_task(async function() {
+add_task(function* () {
   const manager = new SandboxManager();
   manager.addHold("testing");
 
   // clonedArgument stores the argument passed to cloned(), which we use to test
   // that arguments from within the sandbox are cloned outside.
   let clonedArgument = null;
   manager.cloneIntoGlobal("driver", {
     uncloned: manager.wrapAsync(async function() {
@@ -75,17 +75,17 @@ add_task(async function() {
       return {value: "cloned"};
     }, {cloneInto: true, cloneArguments: true}),
   }, {cloneFunctions: true});
 
   // Assertion helpers
   manager.addGlobal("ok", ok);
   manager.addGlobal("deepEqual", deepEqual);
 
-  await new Promise(resolve => {
+  yield new Promise(resolve => {
     manager.addGlobal("resolve", resolve);
     manager.evalInSandbox(`
       (async function() {
         // The uncloned return value should be privileged and inaccesible.
         const uncloned = await driver.uncloned();
         ok(!("value" in uncloned), "The sandbox could not use an uncloned return value");
 
         // The cloned return value should be usable.
--- a/browser/extensions/shield-recipe-client/test/unit/test_Utils.js
+++ b/browser/extensions/shield-recipe-client/test/unit/test_Utils.js
@@ -1,10 +1,9 @@
 "use strict";
-/* globals Cu */
 
 Cu.import("resource://shield-recipe-client/lib/Utils.jsm");
 
 add_task(async function testKeyBy() {
   const list = [];
   deepEqual(Utils.keyBy(list, "foo"), {});
 
   const foo = {name: "foo", value: 1};
--- a/browser/extensions/shield-recipe-client/test/unit/utils.js
+++ b/browser/extensions/shield-recipe-client/test/unit/utils.js
@@ -1,11 +1,14 @@
 "use strict";
 /* eslint-disable no-unused-vars */
 
+// Loaded into the same scope as head_xpc.js
+/* import-globals-from head_xpc.js */
+
 Cu.import("resource://gre/modules/Preferences.jsm");
 
 const preferenceBranches = {
   user: Preferences,
   default: new Preferences({defaultBranch: true}),
 };
 
 // duplicated from test/browser/head.js until we move everything over to mochitests.
--- a/browser/extensions/shield-recipe-client/test/unit/xpcshell.ini
+++ b/browser/extensions/shield-recipe-client/test/unit/xpcshell.ini
@@ -1,10 +1,10 @@
 [DEFAULT]
-head = xpc_head.js
+head = head_xpc.js
 support-files =
   mock_api/**
   query_server.sjs
   echo_server.sjs
   utils.js
 
 [test_NormandyApi.js]
 [test_Sampling.js]
--- a/browser/themes/linux/compacttheme.css
+++ b/browser/themes/linux/compacttheme.css
@@ -35,22 +35,16 @@
 
 .urlbar-history-dropmarker {
   -moz-appearance: none;
   padding: 0 3px;
   list-style-image: var(--urlbar-dropmarker-url);
   -moz-image-region: var(--urlbar-dropmarker-region);
 }
 
-/* Add the proper background for tab overflow */
-#alltabs-button,
-#new-tab-button {
-  background: var(--chrome-background-color);
-}
-
 #new-tab-button:hover > .toolbarbutton-icon {
   border-color: transparent !important;
 }
 
 /* Prevent double border below tabs toolbar */
 #TabsToolbar:not([collapsed="true"]) + #nav-bar {
   border-top-width: 0 !important;
 }
--- a/browser/themes/shared/browser.inc.css
+++ b/browser/themes/shared/browser.inc.css
@@ -84,17 +84,17 @@
   fill: currentColor;
 }
 
 #urlbar-page-action-button > .toolbarbutton-icon {
   width: 16px;
 }
 
 #page-action-copy-url-button {
-  list-style-image: url("chrome://browser/skin/copy-url.svg");
+  list-style-image: url("chrome://browser/skin/link.svg");
 }
 
 #page-action-email-link-button {
   list-style-image: url("chrome://browser/skin/email-link.svg");
 }
 
 #page-action-send-to-device-button {
   list-style-image: url("chrome://browser/skin/device-mobile.svg");
deleted file mode 100644
--- a/browser/themes/shared/icons/copy-url.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<!-- 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/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
-  <path fill="context-fill" d="M14.707 8.293l-3-3A1 1 0 0 0 11 5h-1V4a1 1 0 0 0-.293-.707l-3-3A1 1 0 0 0 6 0H3a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3v3a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2V9a1 1 0 0 0-.293-.707zM12.586 9H11V7.414zm-5-5H6V2.414zM6 7v2H3V2h2v2.5a.5.5 0 0 0 .5.5H8a2 2 0 0 0-2 2zm2 7V7h2v2.5a.5.5 0 0 0 .5.5H13v4z"/>
-</svg>
new file mode 100644
--- /dev/null
+++ b/browser/themes/shared/icons/link.svg
@@ -0,0 +1,8 @@
+<!-- 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/. -->
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+  <rect x="7" y="3.286" width="2" height="9.429" rx="1" ry="1" transform="rotate(-45 8 8)"/>
+  <path fill="context-fill" d="M2.354 4.522L4.485 2.39a.5.5 0 0 1 .711 0l3.19 3.19.014-.015a2 2 0 0 0 0-2.821L6.272.616a2 2 0 0 0-2.821 0L.616 3.451a2 2 0 0 0 0 2.821L2.744 8.4a1.993 1.993 0 0 0 2.8.02l-3.19-3.186a.5.5 0 0 1 0-.712z"/>
+  <path fill="context-fill" d="M15.416 9.759L13.287 7.63a2 2 0 0 0-2.821 0l-.015.015 3.189 3.189a.5.5 0 0 1 0 .711l-2.132 2.132a.5.5 0 0 1-.711 0L7.61 10.49a1.993 1.993 0 0 0 .02 2.8l2.128 2.128a2 2 0 0 0 2.821 0l2.835-2.835a2 2 0 0 0 .002-2.824z"/>
+</svg>
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
@@ -196,17 +196,17 @@
   skin/classic/browser/privatebrowsing/tracking-protection-off.svg (../shared/privatebrowsing/tracking-protection-off.svg)
   skin/classic/browser/privatebrowsing/tracking-protection.svg (../shared/privatebrowsing/tracking-protection.svg)
   skin/classic/browser/compacttheme/loading-inverted.png (../shared/compacttheme/loading-inverted.png)
   skin/classic/browser/compacttheme/loading-inverted@2x.png (../shared/compacttheme/loading-inverted@2x.png)
   skin/classic/browser/compacttheme/urlbar-history-dropmarker.svg (../shared/compacttheme/urlbar-history-dropmarker.svg)
   skin/classic/browser/urlbar-star.svg                         (../shared/urlbar-star.svg)
   skin/classic/browser/urlbar-tab.svg                          (../shared/urlbar-tab.svg)
   skin/classic/browser/page-action.svg                         (../shared/icons/page-action.svg)
-  skin/classic/browser/copy-url.svg                            (../shared/icons/copy-url.svg)
+  skin/classic/browser/link.svg                                (../shared/icons/link.svg)
   skin/classic/browser/email-link.svg                          (../shared/icons/email-link.svg)
   skin/classic/browser/device-mobile.svg                       (../shared/icons/device-mobile.svg)
   skin/classic/browser/device-desktop.svg                      (../shared/icons/device-desktop.svg)
   skin/classic/browser/menu-icons/back.svg                     (../shared/menu-icons/back.svg)
   skin/classic/browser/menu-icons/back-small.svg               (../shared/menu-icons/back-small.svg)
   skin/classic/browser/menu-icons/addons.svg                   (../shared/menu-icons/addons.svg)
   skin/classic/browser/menu-icons/check.svg                    (../shared/menu-icons/check.svg)
   skin/classic/browser/menu-icons/customize.svg                (../shared/menu-icons/customize.svg)
--- a/browser/themes/shared/tab-selected.svg
+++ b/browser/themes/shared/tab-selected.svg
@@ -14,23 +14,24 @@
 %endif
       #tab-background-fill {
         background-color: @fgTabBackgroundColor@;
         background-image: @fgTabTexture@;
         background-repeat: no-repeat;
         height: 100%;
         width: 100%;
       }
+%ifndef MOZ_PHOTON_THEME
 %ifdef XP_WIN
-      @media (-moz-windows-default-theme) and (-moz-os-version: windows-vista),
-             (-moz-windows-default-theme) and (-moz-os-version: windows-win7) {
+      @media (-moz-windows-default-theme) and (-moz-os-version: windows-win7) {
         #tab-background-fill {
           background-color: @customToolbarColor@;
         }
       }
 %endif
+%endif
     </style>
 %include ../../base/content/tab-shape.inc.svg
   </defs>
   <foreignObject width="30" height="31" clip-path="url(#tab-curve-clip-path-@TAB_SIDE@)">
     <div id="tab-background-fill" xmlns="http://www.w3.org/1999/xhtml"></div>
   </foreignObject>
 </svg>
--- a/browser/themes/windows/browser-aero.css
+++ b/browser/themes/windows/browser-aero.css
@@ -17,28 +17,26 @@
     -moz-appearance: none;
     border-bottom: none;
   }
 
   .menu-accel,
   .menu-iconic-accel {
     color: graytext;
   }
-
+%ifndef MOZ_PHOTON_THEME
   @media (-moz-os-version: windows-win7) {
     #navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(:-moz-lwtheme),
     #browser-bottombox:not(:-moz-lwtheme),
-    .browserContainer > findbar {
-      background-color: @customToolbarColor@;
-    }
-
+    .browserContainer > findbar,
     .tab-background-middle[selected=true]:not(:-moz-lwtheme) {
       background-color: @customToolbarColor@;
     }
   }
+%endif
 }
 
 @media (-moz-windows-compositor) {
   #main-window {
     -moz-appearance: -moz-win-glass;
   }
 
 
--- a/browser/themes/windows/places/organizer.css
+++ b/browser/themes/windows/places/organizer.css
@@ -179,21 +179,22 @@
 @media (-moz-windows-default-theme) and (-moz-os-version: windows-win7) {
   #placesView,
   #infoPane,
   #placesList,
   #placeContent {
     background-color: #EEF3FA;
   }
 
+%ifndef MOZ_PHOTON_THEME
   #placesToolbar {
     background-color: @customToolbarColor@;
     color: black;
   }
-
+%endif
   #detailsDeck {
     border-top-color: #A9B7C9;
   }
 
   #searchFilter {
     -moz-appearance: none;
     padding: 2px;
     padding-inline-start: 4px;
--- a/browser/themes/windows/windowsShared.inc
+++ b/browser/themes/windows/windowsShared.inc
@@ -3,9 +3,11 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 %filter substitution
 
 %define toolbarHighlight rgba(255,255,255,.4)
 %define fgTabTexture linear-gradient(transparent 2px, @toolbarHighlight@ 2px, @toolbarHighlight@)
 %define fgTabBackgroundColor -moz-dialog
 %define fgTabTextureLWT @fgTabTexture@
+%ifndef MOZ_PHOTON_THEME
 %define customToolbarColor hsl(210,75%,92%)
+%endif
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -135,16 +135,19 @@ set_config('MOZ_USING_SCCACHE', using_sc
 option(env='SCCACHE_VERBOSE_STATS', help='Print verbose sccache stats after build')
 
 @depends(using_sccache, 'SCCACHE_VERBOSE_STATS')
 def sccache_verbose_stats(using_sccache, verbose_stats):
     return using_sccache and bool(verbose_stats)
 
 set_config('SCCACHE_VERBOSE_STATS', sccache_verbose_stats)
 
+option(env='MOZ_HAZARD', help='Build for the GC rooting hazard analysis')
+set_config('MOZ_HAZARD', depends_if('MOZ_HAZARD')(lambda _: True))
+
 @depends('--with-compiler-wrapper', ccache)
 @imports(_from='mozbuild.shellutil', _import='split', _as='shell_split')
 def compiler_wrapper(wrapper, ccache):
     if wrapper:
         raw_wrapper = wrapper[0]
         wrapper = shell_split(raw_wrapper)
         wrapper_program = find_program(wrapper[0])
         if not wrapper_program:
--- a/chrome/test/unit/test_data_protocol_registration.js
+++ b/chrome/test/unit/test_data_protocol_registration.js
@@ -4,39 +4,77 @@
  * 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/. */
 
 var manifests = [
   do_get_file("data/test_data_protocol_registration.manifest"),
 ];
 registerManifests(manifests);
 
-var XULAppInfoFactory = {
-  // These two are used when we register all our factories (and unregister)
-  CID: XULAPPINFO_CID,
-  scheme: "XULAppInfo",
-  contractID: XULAPPINFO_CONTRACTID,
-  createInstance: function (outer, iid) {
-    if (outer != null)
-      throw Cr.NS_ERROR_NO_AGGREGATION;
-    return XULAppInfo.QueryInterface(iid);
-  }
-};
-
 function run_test()
 {
+  const uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);
+
+  Components.utils.import("resource://testing-common/AppInfo.jsm", this);
+  let XULAppInfo = newAppInfo({
+    name: "XPCShell",
+    ID: "{39885e5f-f6b4-4e2a-87e5-6259ecf79011}",
+    version: "5",
+    platformVersion: "1.9",
+  });
+
+  let XULAppInfoFactory = {
+    // These two are used when we register all our factories (and unregister)
+    CID: uuidGenerator.generateUUID(),
+    scheme: "XULAppInfo",
+    contractID: XULAPPINFO_CONTRACTID,
+    createInstance: function (outer, iid) {
+      if (outer != null)
+        throw Cr.NS_ERROR_NO_AGGREGATION;
+      return XULAppInfo.QueryInterface(iid);
+    }
+  };
+
   // Add our XULAppInfo factory
   let factories = [XULAppInfoFactory];
+  let old_factories = [];
+  let old_factories_inds = [];
+
+  let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
 
   // Register our factories
   for (let i = 0; i < factories.length; i++) {
     let factory = factories[i];
-    Components.manager.QueryInterface(Ci.nsIComponentRegistrar)
-              .registerFactory(factory.CID, "test-" + factory.scheme,
-                               factory.contractID, factory);
+
+    // Make sure the class ID has not already been registered
+    if (!registrar.isCIDRegistered(factory.CID)) {
+
+      // Check to see if a contract was already registered and
+      // register it if it is not. Otherwise, store the previous one
+      // to be restored later and register the new one.
+      if (registrar.isContractIDRegistered(factory.contractID)) {
+        dump(factory.scheme + " is already registered. Storing currently registered object for restoration later.")
+        old_factories.push({
+          CID: registrar.contractIDToCID(factory.contractID),
+          factory: Components.manager.getClassObject(Cc[factory.contractID], Ci.nsIFactory)
+        });
+        old_factories_inds.push(true);
+        registrar.unregisterFactory(old_factories[i].CID, old_factories[i].factory);
+      }
+      else {
+        dump(factory.scheme + " has never been registered. Registering...")
+        old_factories.push({CID: "", factory: null});
+        old_factories_inds.push(false);
+      }
+
+      registrar.registerFactory(factory.CID, "test-" + factory.scheme, factory.contractID, factory);
+    }
+    else {
+      do_throw("CID " + factory.CID +  " has already been registered!");
+    }
   }
 
   // Check for new chrome
   let cr = Cc["@mozilla.org/chrome/chrome-registry;1"].
            getService(Ci.nsIChromeRegistry);
   cr.checkForNewChrome();
 
   // Check that our override worked
@@ -54,12 +92,17 @@ function run_test()
   catch (e) {
     dump(e + "\n");
     do_throw("Should have registered our URI!");
   }
 
   // Unregister our factories so we do not leak
   for (let i = 0; i < factories.length; i++) {
     let factory = factories[i];
-    Components.manager.QueryInterface(Ci.nsIComponentRegistrar)
-              .unregisterFactory(factory.CID, factory);
+    let ind = old_factories_inds[i];
+    registrar.unregisterFactory(factory.CID, factory);
+
+    if (ind == true) {
+      let old_factory = old_factories[i];
+      registrar.registerFactory(old_factory.CID, factory.scheme, factory.contractID, old_factory.factory);
+    }
   }
 }
--- a/chrome/test/unit/test_no_remote_registration.js
+++ b/chrome/test/unit/test_no_remote_registration.js
@@ -6,36 +6,16 @@
 
 var manifests = [
   do_get_file("data/test_no_remote_registration.manifest"),
 ];
 registerManifests(manifests);
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-Components.utils.import("resource://testing-common/AppInfo.jsm", this);
-var XULAppInfo = newAppInfo({
-  name: "XPCShell",
-  ID: "{39885e5f-f6b4-4e2a-87e5-6259ecf79011}",
-  version: "5",
-  platformVersion: "1.9",
-});
-
-var XULAppInfoFactory = {
-  // These two are used when we register all our factories (and unregister)
-  CID: Components.ID("{c763b610-9d49-455a-bbd2-ede71682a1ac}"),
-  scheme: "XULAppInfo",
-  contractID: "@mozilla.org/xre/app-info;1",
-  createInstance: function (outer, iid) {
-    if (outer != null)
-      throw Cr.NS_ERROR_NO_AGGREGATION;
-    return XULAppInfo.QueryInterface(iid);
-  }
-};
-
 function ProtocolHandler(aScheme, aFlags)
 {
   this.scheme = aScheme;
   this.protocolFlags = aFlags;
   this.contractID = "@mozilla.org/network/protocol;1?name=" + aScheme;
 }
 
 ProtocolHandler.prototype =
@@ -85,16 +65,40 @@ var testProtocols = [
   {scheme: "moz-protocol-local-resource",
    flags: Ci.nsIProtocolHandler.URI_IS_LOCAL_RESOURCE,
    CID: Components.ID("{b79e977c-f840-469a-b413-0125cc1b62a5}"),
    shouldRegister: true
   },
 ];
 function run_test()
 {
+  Components.utils.import("resource://testing-common/AppInfo.jsm", this);
+  let XULAppInfo = newAppInfo({
+    name: "XPCShell",
+    ID: "{39885e5f-f6b4-4e2a-87e5-6259ecf79011}",
+    version: "5",
+    platformVersion: "1.9",
+  });
+
+  const uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);
+
+  let XULAppInfoFactory = {
+    // These two are used when we register all our factories (and unregister)
+    CID: uuidGenerator.generateUUID(),
+    scheme: "XULAppInfo",
+    contractID: "@mozilla.org/xre/app-info;1",
+    createInstance: function (outer, iid) {
+      if (outer != null)
+        throw Cr.NS_ERROR_NO_AGGREGATION;
+      return XULAppInfo.QueryInterface(iid);
+    }
+  };
+
+  let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
+
   // Create factories
   let factories = [];
   for (let i = 0; i < testProtocols.length; i++) {
     factories[i] = {
       scheme: testProtocols[i].scheme,
       flags: testProtocols[i].flags,
       CID: testProtocols[i].CID,
       contractID: "@mozilla.org/network/protocol;1?name=" + testProtocols[i].scheme,
@@ -102,27 +106,48 @@ function run_test()
       {
         if (aOuter != null)
           throw Cr.NS_ERROR_NO_AGGREGATION;
         let handler = new ProtocolHandler(this.scheme, this.flags, this.CID);
         return handler.QueryInterface(aIID);
       }
     };
   }
-  // Add our XULAppInfo factory
-  factories.push(XULAppInfoFactory);
 
   // Register our factories
   for (let i = 0; i < factories.length; i++) {
     let factory = factories[i];
-    Components.manager.QueryInterface(Ci.nsIComponentRegistrar)
-              .registerFactory(factory.CID, "test-" + factory.scheme,
+    registrar.registerFactory(factory.CID, "test-" + factory.scheme,
                                factory.contractID, factory);
   }
 
+  // Register the XULAppInfoFactory
+  // Make sure the class ID has not already been registered
+  let old_factory = {CID: "", factory: null};
+  if (!registrar.isCIDRegistered(XULAppInfoFactory.CID)) {
+
+    // Check to see if a contract was already registered and
+    // register it if it is not. Otherwise, store the previous one
+    // to be restored later and register the new one.
+    if (registrar.isContractIDRegistered(XULAppInfoFactory.contractID)) {
+      dump(XULAppInfoFactory.scheme + " is already registered. Storing currently registered object for restoration later.")
+      old_factory.CID = registrar.contractIDToCID(XULAppInfoFactory.contractID);
+      old_factory.factory = Components.manager.getClassObject(Cc[XULAppInfoFactory.contractID], Ci.nsIFactory);
+      registrar.unregisterFactory(old_factory.CID, old_factory.factory);
+    }
+    else {
+      dump(XULAppInfoFactory.scheme + " has never been registered. Registering...")
+    }
+
+    registrar.registerFactory(XULAppInfoFactory.CID, "test-" + XULAppInfoFactory.scheme, XULAppInfoFactory.contractID, XULAppInfoFactory);
+  }
+  else {
+    do_throw("CID " + XULAppInfoFactory.CID +  " has already been registered!");
+  }
+
   // Check for new chrome
   let cr = Cc["@mozilla.org/chrome/chrome-registry;1"].
            getService(Ci.nsIChromeRegistry);
   cr.checkForNewChrome();
 
   // See if our various things were able to register
   let registrationTypes = [
     "content",
@@ -191,12 +216,17 @@ function run_test()
         }
       }
     }
   }
 
   // Unregister our factories so we do not leak
   for (let i = 0; i < factories.length; i++) {
     let factory = factories[i];
-    Components.manager.QueryInterface(Ci.nsIComponentRegistrar)
-              .unregisterFactory(factory.CID, factory);
+    registrar.unregisterFactory(factory.CID, factory);
+  }
+
+  // Unregister XULAppInfoFactory
+  registrar.unregisterFactory(XULAppInfoFactory.CID, XULAppInfoFactory);
+  if (old_factory.factory != null) {
+    registrar.registerFactory(old_factory.CID, "", XULAppInfoFactory.contractID, old_factory.factory);
   }
 }
--- a/chrome/test/unit/xpcshell.ini
+++ b/chrome/test/unit/xpcshell.ini
@@ -9,12 +9,10 @@ support-files = data/**
 [test_bug399707.js]
 [test_bug401153.js]
 [test_bug415367.js]
 [test_bug564667.js]
 tags = addons
 [test_bug848297.js]
 [test_crlf.js]
 [test_data_protocol_registration.js]
-skip-if = coverage # bug 1362816
 [test_no_remote_registration.js]
-skip-if = coverage # bug 1362816
 [test_resolve_uris.js]
--- a/devtools/client/framework/devtools.js
+++ b/devtools/client/framework/devtools.js
@@ -16,16 +16,18 @@ loader.lazyRequireGetter(this, "ToolboxH
 loader.lazyRequireGetter(this, "gDevToolsBrowser", "devtools/client/framework/devtools-browser", true);
 
 const {defaultTools: DefaultTools, defaultThemes: DefaultThemes} =
   require("devtools/client/definitions");
 const EventEmitter = require("devtools/shared/event-emitter");
 const {JsonView} = require("devtools/client/jsonview/main");
 const AboutDevTools = require("devtools/client/framework/about-devtools-toolbox");
 const {Task} = require("devtools/shared/task");
+const {getTheme, setTheme, addThemeObserver, removeThemeObserver} =
+  require("devtools/client/shared/theme");
 
 const FORBIDDEN_IDS = new Set(["toolbox", ""]);
 const MAX_ORDINAL = 99;
 
 /**
  * DevTools is a class that represents a set of developer tools, it holds a
  * set of tools and keeps track of open toolboxes in the browser.
  */
@@ -38,16 +40,20 @@ function DevTools() {
 
   // JSON Viewer for 'application/json' documents.
   JsonView.initialize();
 
   AboutDevTools.register();
 
   EventEmitter.decorate(this);
 
+  // Listen for changes to the theme pref.
+  this._onThemeChanged = this._onThemeChanged.bind(this);
+  addThemeObserver(this._onThemeChanged);
+
   // This is important step in initialization codepath where we are going to
   // start registering all default tools and themes: create menuitems, keys, emit
   // related events.
   this.registerDefaults();
 
   // Register this new DevTools instance to Firefox. DevToolsShim is part of Firefox,
   // integrating with all Firefox codebase and making the glue between code from
   // mozilla-central and DevTools add-on on github
@@ -239,16 +245,33 @@ DevTools.prototype = {
         definitions.push(definition);
       }
     }
 
     return definitions.sort(this.ordinalSort);
   },
 
   /**
+   * Returns the name of the current theme for devtools.
+   *
+   * @return {string} theme
+   *         The name of the current devtools theme.
+   */
+  getTheme() {
+    return getTheme();
+  },
+
+  /**
+   * Called when the developer tools theme changes.
+   */
+  _onThemeChanged() {
+    this.emit("theme-changed", getTheme());
+  },
+
+  /**
    * Register a new theme for developer tools toolbox.
    *
    * A definition is a light object that holds various information about a
    * theme.
    *
    * Each themeDefinition has the following properties:
    * - id: Unique identifier for this theme (string|required)
    * - label: Localized name for the theme to be displayed to the user
@@ -292,30 +315,30 @@ DevTools.prototype = {
     let themeId = null;
     if (typeof theme == "string") {
       themeId = theme;
       theme = this._themes.get(theme);
     } else {
       themeId = theme.id;
     }
 
-    let currTheme = Services.prefs.getCharPref("devtools.theme");
+    let currTheme = getTheme();
 
     // Note that we can't check if `theme` is an item
     // of `DefaultThemes` as we end up reloading definitions
     // module and end up with different theme objects
     let isCoreTheme = DefaultThemes.some(t => t.id === themeId);
 
     // Reset the theme if an extension theme that's currently applied
     // is being removed.
     // Ignore shutdown since addons get disabled during that time.
     if (!Services.startup.shuttingDown &&
         !isCoreTheme &&
         theme.id == currTheme) {
-      Services.prefs.setCharPref("devtools.theme", "light");
+      setTheme("light");
 
       this.emit("theme-unregistered", theme);
     }
 
     this._themes.delete(themeId);
   },
 
   /**
@@ -510,16 +533,18 @@ DevTools.prototype = {
     for (let [key, ] of this.getToolDefinitionMap()) {
       this.unregisterTool(key, true);
     }
 
     JsonView.destroy();
 
     gDevTools.unregisterDefaults();
 
+    removeThemeObserver(this._onThemeChanged);
+
     // Notify the DevToolsShim that DevTools are no longer available, particularly if the
     // destroy was caused by disabling/removing the DevTools add-on.
     DevToolsShim.unregister();
 
     // Cleaning down the toolboxes: i.e.
     //   for (let [target, toolbox] of this._toolboxes) toolbox.destroy();
     // Is taken care of by the gDevToolsBrowser.forgetBrowserWindow
   },
--- a/devtools/client/framework/gDevTools.jsm
+++ b/devtools/client/framework/gDevTools.jsm
@@ -67,16 +67,19 @@ let gDevToolsMethods = [
   "registerTheme",
   "unregisterTool",
   "unregisterTheme",
 
   // Used by main.js and test
   "getToolDefinitionArray",
   "getThemeDefinitionArray",
 
+  // Used by WebExtensions devtools API
+  "getTheme",
+
   // Used by theme-switching.js
   "getThemeDefinition",
   "emit",
 
   // Used by /devtools
   "on",
   "off",
   "once",
--- a/devtools/client/framework/test/browser_toolbox_theme_registration.js
+++ b/devtools/client/framework/test/browser_toolbox_theme_registration.js
@@ -3,100 +3,129 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /* import-globals-from shared-head.js */
 "use strict";
 
 // Test for dynamically registering and unregistering themes
 const CHROME_URL = "chrome://mochitests/content/browser/devtools/client/framework/test/";
+const TEST_THEME_NAME = "test-theme";
+const LIGHT_THEME_NAME = "light";
 
 var toolbox;
 
 add_task(function* themeRegistration() {
   let tab = yield addTab("data:text/html,test");
   let target = TargetFactory.forTab(tab);
   toolbox = yield gDevTools.showToolbox(target, "options");
 
   let themeId = yield new Promise(resolve => {
     gDevTools.once("theme-registered", (e, registeredThemeId) => {
       resolve(registeredThemeId);
     });
 
     gDevTools.registerTheme({
-      id: "test-theme",
+      id: TEST_THEME_NAME,
       label: "Test theme",
       stylesheets: [CHROME_URL + "doc_theme.css"],
       classList: ["theme-test"],
     });
   });
 
-  is(themeId, "test-theme", "theme-registered event handler sent theme id");
+  is(themeId, TEST_THEME_NAME, "theme-registered event handler sent theme id");
 
   ok(gDevTools.getThemeDefinitionMap().has(themeId), "theme added to map");
 });
 
 add_task(function* themeInOptionsPanel() {
   let panelWin = toolbox.getCurrentPanel().panelWin;
   let doc = panelWin.frameElement.contentDocument;
   let themeBox = doc.getElementById("devtools-theme-box");
   let testThemeOption = themeBox.querySelector(
-    "input[type=radio][value=test-theme]");
+    `input[type=radio][value=${TEST_THEME_NAME}]`);
+  let eventsRecorded = [];
+
+  function onThemeChanged(event, theme) {
+    eventsRecorded.push(theme);
+  }
+  gDevTools.on("theme-changed", onThemeChanged);
 
   ok(testThemeOption, "new theme exists in the Options panel");
 
   let lightThemeOption = themeBox.querySelector(
-    "input[type=radio][value=light]");
+    `input[type=radio][value=${LIGHT_THEME_NAME}]`);
 
   let color = panelWin.getComputedStyle(themeBox).color;
   isnot(color, "rgb(255, 0, 0)", "style unapplied");
 
   let onThemeSwithComplete = once(panelWin, "theme-switch-complete");
 
   // Select test theme.
   testThemeOption.click();
 
   info("Waiting for theme to finish loading");
   yield onThemeSwithComplete;
 
+  is(gDevTools.getTheme(), TEST_THEME_NAME, "getTheme returns the expected theme");
+  is(eventsRecorded.pop(), TEST_THEME_NAME, "theme-changed fired with the expected theme");
+
   color = panelWin.getComputedStyle(themeBox).color;
   is(color, "rgb(255, 0, 0)", "style applied");
 
   onThemeSwithComplete = once(panelWin, "theme-switch-complete");
 
   // Select light theme
   lightThemeOption.click();
 
   info("Waiting for theme to finish loading");
   yield onThemeSwithComplete;
 
+  is(gDevTools.getTheme(), LIGHT_THEME_NAME, "getTheme returns the expected theme");
+  is(eventsRecorded.pop(), LIGHT_THEME_NAME, "theme-changed fired with the expected theme");
+
   color = panelWin.getComputedStyle(themeBox).color;
   isnot(color, "rgb(255, 0, 0)", "style unapplied");
 
   onThemeSwithComplete = once(panelWin, "theme-switch-complete");
   // Select test theme again.
   testThemeOption.click();
   yield onThemeSwithComplete;
+  is(gDevTools.getTheme(), TEST_THEME_NAME, "getTheme returns the expected theme");
+  is(eventsRecorded.pop(), TEST_THEME_NAME, "theme-changed fired with the expected theme");
+
+  gDevTools.off("theme-changed", onThemeChanged);
 });
 
 add_task(function* themeUnregistration() {
   let panelWin = toolbox.getCurrentPanel().panelWin;
   let onUnRegisteredTheme = once(gDevTools, "theme-unregistered");
   let onThemeSwitchComplete = once(panelWin, "theme-switch-complete");
-  gDevTools.unregisterTheme("test-theme");
+  let eventsRecorded = [];
+
+  function onThemeChanged(event, theme) {
+    eventsRecorded.push(theme);
+  }
+  gDevTools.on("theme-changed", onThemeChanged);
+
+  gDevTools.unregisterTheme(TEST_THEME_NAME);
   yield onUnRegisteredTheme;
   yield onThemeSwitchComplete;
 
-  ok(!gDevTools.getThemeDefinitionMap().has("test-theme"),
+  is(gDevTools.getTheme(), LIGHT_THEME_NAME, "getTheme returns the expected theme");
+  is(eventsRecorded.pop(), LIGHT_THEME_NAME, "theme-changed fired with the expected theme");
+  ok(!gDevTools.getThemeDefinitionMap().has(TEST_THEME_NAME),
     "theme removed from map");
 
   let doc = panelWin.frameElement.contentDocument;
   let themeBox = doc.getElementById("devtools-theme-box");
 
   // The default light theme must be selected now.
-  is(themeBox.querySelector("#devtools-theme-box [value=light]").checked, true,
-    "light theme must be selected");
+  is(themeBox.querySelector(`#devtools-theme-box [value=${LIGHT_THEME_NAME}]`).checked, true,
+    `${LIGHT_THEME_NAME} theme must be selected`);
+
+  gDevTools.off("theme-changed", onThemeChanged);
 });
 
 add_task(function* cleanup() {
   yield toolbox.destroy();
   toolbox = null;
 });
--- a/devtools/client/netmonitor/src/components/status-bar.js
+++ b/devtools/client/netmonitor/src/components/status-bar.js
@@ -35,17 +35,17 @@ function StatusBar({ summary, openStatis
       count, L10N.getFormatStrWithNumbers("networkMenu.summary.requestsCount", count)
   );
   let transferText = L10N.getFormatStrWithNumbers("networkMenu.summary.transferred",
     getFormattedSize(contentSize), getFormattedSize(transferredSize));
   let finishText = L10N.getFormatStrWithNumbers("networkMenu.summary.finish",
     getFormattedTime(millis));
 
   return (
-    div({ className: "devtools-toolbar devtools-status-bottom" },
+    div({ className: "devtools-toolbar devtools-toolbar-bottom" },
       button({
         className: "devtools-button requests-list-network-summary-button",
         title: L10N.getStr("networkMenu.summary.tooltip.perf"),
         onClick: openStatistics,
       },
         div({ className: "summary-info-icon" }),
       ),
       div({
--- a/devtools/client/shared/theme.js
+++ b/devtools/client/shared/theme.js
@@ -13,16 +13,17 @@ const Services = require("Services");
 
 const variableFileContents = require("raw!devtools/client/themes/variables.css");
 
 const THEME_SELECTOR_STRINGS = {
   light: ":root.theme-light {",
   dark: ":root.theme-dark {",
   firebug: ":root.theme-firebug {"
 };
+const THEME_PREF = "devtools.theme";
 
 /**
  * Takes a theme name and returns the contents of its variable rule block.
  * The first time this runs fetches the variables CSS file and caches it.
  */
 function getThemeFile(name) {
   // If there's no theme expected for this name, use `light` as default.
   let selector = THEME_SELECTOR_STRINGS[name] ||
@@ -41,17 +42,17 @@ function getThemeFile(name) {
   return theme;
 }
 
 /**
  * Returns the string value of the current theme,
  * like "dark" or "light".
  */
 const getTheme = exports.getTheme = () => {
-  return Services.prefs.getCharPref("devtools.theme");
+  return Services.prefs.getCharPref(THEME_PREF);
 };
 
 /**
  * Returns a color indicated by `type` (like "toolbar-background", or
  * "highlight-red"), with the ability to specify a theme, or use whatever the
  * current theme is if left unset. If theme not found, falls back to "light"
  * theme. Returns null if the type cannot be found for the theme given.
  */
@@ -64,11 +65,25 @@ const getColor = exports.getColor = (typ
   // Return the appropriate variable in the theme, or otherwise, null.
   return match ? match[1] : null;
 };
 
 /**
  * Set the theme preference.
  */
 const setTheme = exports.setTheme = (newTheme) => {
-  Services.prefs.setCharPref("devtools.theme", newTheme);
+  Services.prefs.setCharPref(THEME_PREF, newTheme);
+};
+
+/**
+ * Add an observer for theme changes.
+ */
+const addThemeObserver = exports.addThemeObserver = observer => {
+  Services.prefs.addObserver(THEME_PREF, observer);
+};
+
+/**
+ * Remove an observer for theme changes.
+ */
+const removeThemeObserver = exports.removeThemeObserver = observer => {
+  Services.prefs.removeObserver(THEME_PREF, observer);
 };
 /* eslint-enable */
--- a/docshell/shistory/nsISHEntry.idl
+++ b/docshell/shistory/nsISHEntry.idl
@@ -330,19 +330,21 @@ interface nsISHEntry : nsISupports
 
     /**
      * Flag to indicate that the history entry was originally loaded in the
      * current process. This flag does not survive a browser process switch.
      */
     readonly attribute boolean loadedInThisProcess;
 
     /**
-     * Set the session history it belongs to. It's only set on root entries.
+     * The session history it belongs to. It's usually only set on root entries.
+     * SHEntry is strictly bound to the SHistory it belongs to; it should not be
+     * changed once set to a non-null value.
      */
-    [noscript] void setSHistory(in nsISHistory aSHistory);
+    [noscript] attribute nsISHistory SHistory;
 };
 
 [scriptable, uuid(bb66ac35-253b-471f-a317-3ece940f04c5)]
 interface nsISHEntryInternal : nsISupports
 {
     [notxpcom] void RemoveFromBFCacheAsync();
     [notxpcom] void RemoveFromBFCacheSync();
 
--- a/docshell/shistory/nsSHEntry.cpp
+++ b/docshell/shistory/nsSHEntry.cpp
@@ -970,16 +970,24 @@ nsSHEntry::GetLastTouched(uint32_t* aLas
 NS_IMETHODIMP
 nsSHEntry::SetLastTouched(uint32_t aLastTouched)
 {
   mShared->mLastTouched = aLastTouched;
   return NS_OK;
 }
 
 NS_IMETHODIMP
+nsSHEntry::GetSHistory(nsISHistory** aSHistory)
+{
+  nsCOMPtr<nsISHistory> shistory(do_QueryReferent(mShared->mSHistory));
+  shistory.forget(aSHistory);
+  return NS_OK;
+}
+
+NS_IMETHODIMP
 nsSHEntry::SetSHistory(nsISHistory* aSHistory)
 {
   nsWeakPtr shistory = do_GetWeakReference(aSHistory);
   // mSHistory can not be changed once it's set
-  MOZ_DIAGNOSTIC_ASSERT(!mShared->mSHistory || (mShared->mSHistory == shistory));
+  MOZ_ASSERT(!mShared->mSHistory || (mShared->mSHistory == shistory));
   mShared->mSHistory = shistory;
   return NS_OK;
 }
--- a/docshell/shistory/nsSHEntryShared.cpp
+++ b/docshell/shistory/nsSHEntryShared.cpp
@@ -132,17 +132,17 @@ nsSHEntryShared::SetContentViewer(nsICon
 
   if (mContentViewer || !aViewer) {
     DropPresentationState();
   }
 
   // If we're setting mContentViewer to null, state should already be cleared
   // in the DropPresentationState() call above; If we're setting it to a
   // non-null content viewer, the entry shouldn't have been tracked either.
-  MOZ_DIAGNOSTIC_ASSERT(!GetExpirationState()->IsTracked());
+  MOZ_ASSERT(!GetExpirationState()->IsTracked());
   mContentViewer = aViewer;
 
   if (mContentViewer) {
     // mSHistory is only set for root entries, but in general bfcache only
     // applies to root entries as well. BFCache for subframe navigation has been
     // disabled since 2005 in bug 304860.
     nsCOMPtr<nsISHistoryInternal> shistory = do_QueryReferent(mSHistory);
     if (shistory) {
--- a/docshell/shistory/nsSHistory.cpp
+++ b/docshell/shistory/nsSHistory.cpp
@@ -380,16 +380,25 @@ nsSHistory::Shutdown()
 /* Add an entry to the History list at mIndex and
  * increment the index to point to the new entry
  */
 NS_IMETHODIMP
 nsSHistory::AddEntry(nsISHEntry* aSHEntry, bool aPersist)
 {
   NS_ENSURE_ARG(aSHEntry);
 
+  nsCOMPtr<nsISHistory> shistoryOfEntry;
+  aSHEntry->GetSHistory(getter_AddRefs(shistoryOfEntry));
+  if (shistoryOfEntry && shistoryOfEntry != this) {
+    NS_WARNING("The entry has been associated to another nsISHistory instance. "
+               "Try nsISHEntry.clone() and nsISHEntry.abandonBFCacheEntry() "
+               "first if you're copying an entry from another nsISHistory.");
+    return NS_ERROR_FAILURE;
+  }
+
   aSHEntry->SetSHistory(this);
 
   // If we have a root docshell, update the docshell id of the root shentry to
   // match the id of that docshell
   if (mRootDocShell) {
     nsID docshellID = mRootDocShell->HistoryID();
     aSHEntry->SetDocshellID(&docshellID);
   }
@@ -862,16 +871,27 @@ nsSHistory::ReplaceEntry(int32_t aIndex,
   if (!mListRoot) {
     // Session History is not initialised.
     return NS_ERROR_FAILURE;
   }
 
   rv = GetTransactionAtIndex(aIndex, getter_AddRefs(currentTxn));
 
   if (currentTxn) {
+    nsCOMPtr<nsISHistory> shistoryOfEntry;
+    aReplaceEntry->GetSHistory(getter_AddRefs(shistoryOfEntry));
+    if (shistoryOfEntry && shistoryOfEntry != this) {
+      NS_WARNING("The entry has been associated to another nsISHistory instance. "
+                 "Try nsISHEntry.clone() and nsISHEntry.abandonBFCacheEntry() "
+                 "first if you're copying an entry from another nsISHistory.");
+      return NS_ERROR_FAILURE;
+    }
+
+    aReplaceEntry->SetSHistory(this);
+
     NOTIFY_LISTENERS(OnHistoryReplaceEntry, (aIndex));
 
     // Set the replacement entry in the transaction
     rv = currentTxn->SetSHEntry(aReplaceEntry);
     rv = currentTxn->SetPersist(true);
   }
   return rv;
 }
@@ -1315,17 +1335,17 @@ nsSHistory::AddToExpirationTracker(nsIBF
   mHistoryTracker->AddObject(entry);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSHistory::RemoveFromExpirationTracker(nsIBFCacheEntry* aEntry)
 {
   RefPtr<nsSHEntryShared> entry = static_cast<nsSHEntryShared*>(aEntry);
-  MOZ_DIAGNOSTIC_ASSERT(mHistoryTracker && !mHistoryTracker->IsEmpty());
+  MOZ_ASSERT(mHistoryTracker && !mHistoryTracker->IsEmpty());
   if (!mHistoryTracker || !entry) {
     return NS_ERROR_FAILURE;
   }
 
   mHistoryTracker->RemoveObject(entry);
   return NS_OK;
 }
 
@@ -1923,29 +1943,34 @@ nsSHistory::InitiateLoad(nsISHEntry* aFr
   return aFrameDS->LoadURI(nextURI, loadInfo,
                            nsIWebNavigation::LOAD_FLAGS_NONE, false);
 
 }
 
 NS_IMETHODIMP
 nsSHistory::SetRootDocShell(nsIDocShell* aDocShell)
 {
-  MOZ_DIAGNOSTIC_ASSERT(!aDocShell || !mRootDocShell);
   mRootDocShell = aDocShell;
 
   // Init mHistoryTracker on setting mRootDocShell so we can bind its event
   // target to the tabGroup.
   if (mRootDocShell) {
     nsCOMPtr<nsPIDOMWindowOuter> win = mRootDocShell->GetWindow();
     if (!win) {
       return NS_ERROR_UNEXPECTED;
     }
 
-    // mHistroyTracker can only be set once.
-    MOZ_DIAGNOSTIC_ASSERT(!mHistoryTracker);
+    // Seamonkey moves shistory between <xul:browser>s when restoring a tab.
+    // Let's try not to break our friend too badly...
+    if (mHistoryTracker) {
+      NS_WARNING("Change the root docshell of a shistory is unsafe and "
+                 "potentially problematic.");
+      mHistoryTracker->AgeAllGenerations();
+    }
+
     RefPtr<mozilla::dom::TabGroup> tabGroup = win->TabGroup();
     mHistoryTracker = mozilla::MakeUnique<HistoryTracker>(
       this,
       mozilla::Preferences::GetUint(CONTENT_VIEWER_TIMEOUT_SECONDS,
                                     CONTENT_VIEWER_TIMEOUT_SECONDS_DEFAULT),
       tabGroup->EventTargetFor(mozilla::TaskCategory::Other));
   }
 
--- a/dom/base/test/browser_force_process_selector.js
+++ b/dom/base/test/browser_force_process_selector.js
@@ -1,31 +1,38 @@
 "use strict";
 
+const CONTENT_CREATED = "ipc:content-created";
+
 // Make sure that BTU.withNewTab({ ..., forceNewProcess: true }) loads
 // new tabs in their own process.
 async function spawnNewAndTest(recur, pids) {
+  let processCreated = TestUtils.topicObserved(CONTENT_CREATED);
   await BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank", forceNewProcess: true },
                                     function* (browser) {
-      // Make sure our new browser is in its own process.
+      // Make sure our new browser is in its own process. The processCreated
+      // promise should have already resolved by this point.
+      yield processCreated;
       let newPid = browser.frameLoader.tabParent.osPid;
       ok(!pids.has(newPid), "new tab is in its own process");
       pids.add(newPid);
 
       if (recur) {
         yield spawnNewAndTest(recur - 1, pids);
       } else {
+        let observer = () => {
+          ok(false, "shouldn't have created a new process");
+        };
+        Services.obs.addObserver(observer, CONTENT_CREATED);
+
         yield BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" }, function* (browser) {
-          // This browser should share a PID with one of the existing tabs.
-          // This is a todo because the process we end up using is actually
-          // an extra process that gets started early in startup and not one
-          // of the ones we use for the tabs.
-          todo(pids.has(browser.frameLoader.tabParent.osPid),
-               "we should be reusing processes if not asked to force the " +
-               "tab into its own process");
+          // If this new tab caused us to create a new process, the ok(false)
+          // should have already happened. Therefore, if we get here, we've
+          // passed. Simply remove the observer.
+          Services.obs.removeObserver(observer, CONTENT_CREATED);
         });
       }
   });
 }
 
 add_task(async function test() {
   let curPid = gBrowser.selectedBrowser.frameLoader.tabParent.osPid;
   let maxCount = Services.prefs.getIntPref("dom.ipc.processCount");
new file mode 100644
--- /dev/null
+++ b/dom/canvas/test/reftest/clipped-dash-stroke-rect-ref.html
@@ -0,0 +1,19 @@
+<!doctype html>
+<html>
+<body>
+<script>
+canvas = document.createElement('canvas');
+document.body.appendChild(canvas);
+ctx = canvas.getContext('2d');
+
+canvas.width = 1000;
+canvas.height = 1000;
+ctx.translate(420.31465167323177, 40.531991340689785);
+
+
+ctx.strokeStyle = 'red';
+ctx.lineWidth = 3;
+ctx.setLineDash([24, 12]);
+ctx.strokeRect(15, -441, 60, 420);
+
+</script>
new file mode 100644
--- /dev/null
+++ b/dom/canvas/test/reftest/clipped-dash-stroke-rect.html
@@ -0,0 +1,19 @@
+<!doctype html>
+<html>
+<body>
+<script>
+canvas = document.createElement('canvas');
+document.body.appendChild(canvas);
+ctx = canvas.getContext('2d');
+
+canvas.width = 1000;
+canvas.height = 1000;
+ctx.translate(420.31465167323177, 40.531991340689785);
+ctx.scale(3, 3);
+
+ctx.strokeStyle = 'red';
+ctx.lineWidth = 1;
+ctx.setLineDash([8, 4]);
+ctx.strokeRect(5, -147, 20, 140);
+
+</script>
--- a/dom/canvas/test/reftest/reftest.list
+++ b/dom/canvas/test/reftest/reftest.list
@@ -166,8 +166,11 @@ pref(canvas.customfocusring.enabled,true
 fuzzy-if(azureSkia,16,2) fuzzy-if(Android,3,40) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),1,1) == 1177726-text-stroke-bounds.html 1177726-text-stroke-bounds-ref.html
 
 # Canvas Filter Reftests
 include filters/reftest.list
 
 # Bug 1305963
 == mozCurrentTransform.html mozCurrentTransform-ref.html
 == mozCurrentTransformInverse.html mozCurrentTransform-ref.html
+
+# Bug 1366027
+== clipped-dash-stroke-rect.html clipped-dash-stroke-rect-ref.html
--- a/dom/html/HTMLMenuElement.cpp
+++ b/dom/html/HTMLMenuElement.cpp
@@ -20,41 +20,39 @@
 NS_IMPL_NS_NEW_HTML_ELEMENT(Menu)
 
 namespace mozilla {
 namespace dom {
 
 enum MenuType : uint8_t
 {
   MENU_TYPE_CONTEXT = 1,
-  MENU_TYPE_TOOLBAR,
-  MENU_TYPE_LIST
+  MENU_TYPE_TOOLBAR
 };
 
 static const nsAttrValue::EnumTable kMenuTypeTable[] = {
   { "context", MENU_TYPE_CONTEXT },
   { "toolbar", MENU_TYPE_TOOLBAR },
-  { "list", MENU_TYPE_LIST },
   { nullptr, 0 }
 };
 
 static const nsAttrValue::EnumTable* kMenuDefaultType =
-  &kMenuTypeTable[2];
+  &kMenuTypeTable[1];
 
 enum SeparatorType
 {
   ST_TRUE_INIT = -1,
   ST_FALSE = 0,
   ST_TRUE = 1
 };
 
 
 
 HTMLMenuElement::HTMLMenuElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
-  : nsGenericHTMLElement(aNodeInfo), mType(MENU_TYPE_LIST)
+  : nsGenericHTMLElement(aNodeInfo), mType(MENU_TYPE_TOOLBAR)
 {
 }
 
 HTMLMenuElement::~HTMLMenuElement()
 {
 }
 
 NS_IMPL_ISUPPORTS_INHERITED(HTMLMenuElement, nsGenericHTMLElement,
@@ -79,17 +77,17 @@ HTMLMenuElement::SendShowEvent()
   WidgetEvent event(true, eShow);
   event.mFlags.mBubbles = false;
   event.mFlags.mCancelable = false;
 
   nsCOMPtr<nsIPresShell> shell = document->GetShell();
   if (!shell) {
     return;
   }
- 
+
   RefPtr<nsPresContext> presContext = shell->GetPresContext();
   nsEventStatus status = nsEventStatus_eIgnore;
   EventDispatcher::Dispatch(static_cast<nsIContent*>(this), presContext,
                             &event, nullptr, &status);
 }
 
 already_AddRefed<nsIMenuBuilder>
 HTMLMenuElement::CreateBuilder()
@@ -239,17 +237,17 @@ HTMLMenuElement::TraverseContent(nsICont
 }
 
 inline void
 HTMLMenuElement::AddSeparator(nsIMenuBuilder* aBuilder, int8_t& aSeparator)
 {
   if (aSeparator) {
     return;
   }
- 
+
   aBuilder->AddSeparator();
   aSeparator = ST_TRUE;
 }
 
 JSObject*
 HTMLMenuElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return HTMLMenuElementBinding::Wrap(aCx, this, aGivenProto);
--- a/dom/html/reftests/autofocus/reftest.list
+++ b/dom/html/reftests/autofocus/reftest.list
@@ -1,14 +1,14 @@
 default-preferences pref(dom.forms.number,true) pref(dom.forms.datetime,true)
 fuzzy-if(skiaContent,1,3) needs-focus == input-load.html input-ref.html
 fuzzy-if(skiaContent,1,3) needs-focus == input-create.html input-ref.html
-fuzzy-if(skiaContent,1,3) needs-focus skip-if(stylo) == input-number.html input-number-ref.html
-fuzzy-if(skiaContent,1,3) needs-focus fails-if(stylo) == input-time.html input-time-ref.html
+fuzzy-if(skiaContent,1,3) needs-focus skip-if(styloVsGecko) == input-number.html input-number-ref.html
+fuzzy-if(skiaContent,1,3) needs-focus fails-if(styloVsGecko) == input-time.html input-time-ref.html
 fuzzy-if(skiaContent,1,3) needs-focus == button-load.html button-ref.html
 fuzzy-if(skiaContent,1,3) needs-focus == button-create.html button-ref.html
-fuzzy-if(skiaContent,1,3) needs-focus fails-if(stylo) == textarea-load.html textarea-ref.html
-fuzzy-if(skiaContent,1,3) needs-focus fails-if(stylo) == textarea-create.html textarea-ref.html
+fuzzy-if(skiaContent,1,3) needs-focus fails-if(styloVsGecko) == textarea-load.html textarea-ref.html
+fuzzy-if(skiaContent,1,3) needs-focus fails-if(styloVsGecko) == textarea-create.html textarea-ref.html
 fuzzy-if(skiaContent,9,6) needs-focus == select-load.html select-ref.html
 fuzzy-if(skiaContent,2,4) needs-focus == select-create.html select-ref.html
-needs-focus fails-if(stylo) == autofocus-after-load.html autofocus-after-load-ref.html
+needs-focus fails-if(styloVsGecko) == autofocus-after-load.html autofocus-after-load-ref.html
 fuzzy-if(skiaContent,2,5) needs-focus == autofocus-leaves-iframe.html autofocus-leaves-iframe-ref.html
 fuzzy-if(skiaContent,2,5) needs-focus == autofocus-after-body-focus.html autofocus-after-body-focus-ref.html
--- a/dom/html/reftests/reftest.list
+++ b/dom/html/reftests/reftest.list
@@ -1,34 +1,34 @@
 # autofocus attribute (we can't test with mochitests)
 include autofocus/reftest.list
 include toblob-todataurl/reftest.list
 
-fails-if(stylo) == 41464-1a.html 41464-1-ref.html
-fails-if(stylo) == 41464-1b.html 41464-1-ref.html
+fails-if(styloVsGecko) == 41464-1a.html 41464-1-ref.html
+fails-if(styloVsGecko) == 41464-1b.html 41464-1-ref.html
 == 52019-1.html 52019-1-ref.html
-fails-if(stylo) == 82711-1.html 82711-1-ref.html
-fails-if(stylo) == 82711-2.html 82711-2-ref.html
-fails-if(stylo) != 82711-1-ref.html 82711-2-ref.html
+fails-if(styloVsGecko) == 82711-1.html 82711-1-ref.html
+fails-if(styloVsGecko) == 82711-2.html 82711-2-ref.html
+fails-if(styloVsGecko) != 82711-1-ref.html 82711-2-ref.html
 != 468263-1a.html about:blank
 != 468263-1b.html about:blank
 != 468263-1c.html about:blank
 != 468263-1d.html about:blank
 == 468263-2.html 468263-2-ref.html
 == 468263-2.html 468263-2-alternate-ref.html
 == 484200-1.html 484200-1-ref.html
 == 485377.html 485377-ref.html
 == 557840.html 557840-ref.html
 == 560059-video-dimensions.html 560059-video-dimensions-ref.html
 == 573322-quirks.html 573322-quirks-ref.html
 == 573322-no-quirks.html 573322-no-quirks-ref.html
-fails-if(stylo) == 596455-1a.html 596455-ref-1.html
-fails-if(stylo) == 596455-1b.html 596455-ref-1.html
-fails-if(stylo) == 596455-2a.html 596455-ref-2.html
-fails-if(stylo) == 596455-2b.html 596455-ref-2.html
+fails-if(styloVsGecko) == 596455-1a.html 596455-ref-1.html
+fails-if(styloVsGecko) == 596455-1b.html 596455-ref-1.html
+fails-if(styloVsGecko) == 596455-2a.html 596455-ref-2.html
+fails-if(styloVsGecko) == 596455-2b.html 596455-ref-2.html
 == 610935.html 610935-ref.html
 == 649134-1.html 649134-ref.html
 skip-if(Android) == 649134-2.html 649134-2-ref.html
 == 741776-1.vtt 741776-1-ref.html
 
 == bug448564-1_malformed.html bug448564-1_well-formed.html
 == bug448564-1_malformed.html bug448564-1_ideal.html
 
--- a/dom/imptests/html/html/dom/elements/global-attributes/reftest.list
+++ b/dom/imptests/html/html/dom/elements/global-attributes/reftest.list
@@ -47,10 +47,10 @@
 == dir_auto-R.html dir_auto-R-ref.html
 == dir_auto-textarea-mixed.html dir_auto-textarea-mixed-ref.html
 fails-if(Android&&asyncPan) == dir_auto-textarea-N-between-Rs.html dir_auto-textarea-N-between-Rs-ref.html
 == dir_auto-textarea-N-EN.html dir_auto-textarea-N-EN-ref.html
 == dir_auto-textarea-script-mixed.html dir_auto-textarea-script-mixed-ref.html
 fails-if(Android&&asyncPan) == dir_auto-textarea-script-N-between-Rs.html dir_auto-textarea-script-N-between-Rs-ref.html
 == dir_auto-textarea-script-N-EN.html dir_auto-textarea-script-N-EN-ref.html
 == lang-xyzzy.html lang-xyzzy-ref.html
-fails-if(stylo) == lang-xmllang-01.html lang-xmllang-01-ref.html
-fails-if(stylo) == style-01.html style-01-ref.html
+fails-if(styloVsGecko) == lang-xmllang-01.html lang-xmllang-01-ref.html
+fails-if(styloVsGecko) == style-01.html style-01-ref.html
--- a/dom/media/FileBlockCache.cpp
+++ b/dom/media/FileBlockCache.cpp
@@ -15,43 +15,59 @@
 
 namespace mozilla {
 
 #undef LOG
 LazyLogModule gFileBlockCacheLog("FileBlockCache");
 #define LOG(x, ...) MOZ_LOG(gFileBlockCacheLog, LogLevel::Debug, \
   ("%p " x, this, ##__VA_ARGS__))
 
+static void
+CloseFD(PRFileDesc* aFD)
+{
+  PRStatus prrc;
+  prrc = PR_Close(aFD);
+  if (prrc != PR_SUCCESS) {
+    NS_WARNING("PR_Close() failed.");
+  }
+}
+
 void
 FileBlockCache::SetCacheFile(PRFileDesc* aFD)
 {
   LOG("SetFD(aFD=%p) mIsOpen=%d", aFD, mIsOpen);
 
   if (!aFD) {
     // Failed to get a temporary file. Shutdown.
     Close();
     return;
   }
   {
     MutexAutoLock lock(mFileMutex);
     mFD = aFD;
   }
   {
     MutexAutoLock lock(mDataMutex);
-    if (!mIsOpen) {
-      // We've been closed while waiting for the file descriptor. Bail out.
-      // Rely on the destructor to close the file descriptor.
+    if (mIsOpen) {
+      // Still open, complete the initialization.
+      mInitialized = true;
+      if (mIsWriteScheduled) {
+        // A write was scheduled while waiting for FD. We need to run/dispatch a
+        // task to service the request.
+        mThread->Dispatch(this, NS_DISPATCH_NORMAL);
+      }
       return;
     }
-    mInitialized = true;
-    if (mIsWriteScheduled) {
-      // A write was scheduled while waiting for FD. We need to run/dispatch a
-      // task to service the request.
-      mThread->Dispatch(this, NS_DISPATCH_NORMAL);
-    }
+  }
+  // We've been closed while waiting for the file descriptor.
+  // Close the file descriptor we've just received, if still there.
+  MutexAutoLock lock(mFileMutex);
+  if (mFD) {
+    CloseFD(mFD);
+    mFD = nullptr;
   }
 }
 
 nsresult
 FileBlockCache::Init()
 {
   LOG("Init()");
 
@@ -130,21 +146,17 @@ void FileBlockCache::Close()
     mFD = nullptr;
   }
 
   // Let the thread close the FD, and then trigger its own shutdown.
   // Note that mThread is now empty, so no other task will be posted there.
   // Also mThread and mFD are empty and therefore can be reused immediately.
   nsresult rv = thread->Dispatch(NS_NewRunnableFunction([thread, fd] {
     if (fd) {
-      PRStatus prrc;
-      prrc = PR_Close(fd);
-      if (prrc != PR_SUCCESS) {
-        NS_WARNING("PR_Close() failed.");
-      }
+      CloseFD(fd);
     }
     // We must shut down the thread in another runnable. This is called
     // while we're shutting down the media cache, and nsIThread::Shutdown()
     // can cause events to run before it completes, which could end up
     // opening more streams, while the media cache is shutting down and
     // releasing memory etc!
     nsCOMPtr<nsIRunnable> event = new ShutdownThreadEvent(thread);
     SystemGroup::Dispatch(
@@ -284,17 +296,16 @@ nsresult FileBlockCache::MoveBlockInFile
 }
 
 nsresult FileBlockCache::Run()
 {
   NS_ASSERTION(!NS_IsMainThread(), "Don't call on main thread");
   MutexAutoLock mon(mDataMutex);
   NS_ASSERTION(!mChangeIndexList.empty(), "Only dispatch when there's work to do");
   NS_ASSERTION(mIsWriteScheduled, "Should report write running or scheduled.");
-  MOZ_ASSERT(mFD);
 
   LOG("Run() mFD=%p mIsOpen=%d", mFD, mIsOpen);
 
   while (!mChangeIndexList.empty()) {
     if (!mIsOpen) {
       // We've been closed, abort, discarding unwritten changes.
       mIsWriteScheduled = false;
       return NS_ERROR_FAILURE;
@@ -313,30 +324,35 @@ nsresult FileBlockCache::Run()
     // memory, rather than the not-yet up to date data written to file.
     // This also ensures we will insert a new index into mChangeIndexList
     // when this happens.
 
     // Hold a reference to the change, in case another change
     // overwrites the mBlockChanges entry for this block while we drop
     // mDataMutex to take mFileMutex.
     int32_t blockIndex = mChangeIndexList.front();
-    mChangeIndexList.pop_front();
     RefPtr<BlockChange> change = mBlockChanges[blockIndex];
     MOZ_ASSERT(change,
                "Change index list should only contain entries for blocks "
                "with changes");
     {
       MutexAutoUnlock unlock(mDataMutex);
       MutexAutoLock lock(mFileMutex);
+      if (!mFD) {
+        // We may be here if mFD has been reset because we're closing, so we
+        // don't care anymore about writes.
+        return NS_OK;
+      }
       if (change->IsWrite()) {
         WriteBlockToFile(blockIndex, change->mData.get());
       } else if (change->IsMove()) {
         MoveBlockInFile(change->mSourceBlockIndex, blockIndex);
       }
     }
+    mChangeIndexList.pop_front();
     // If a new change has not been made to the block while we dropped
     // mDataMutex, clear reference to the old change. Otherwise, the old
     // reference has been cleared already.
     if (mBlockChanges[blockIndex] == change) {
       mBlockChanges[blockIndex] = nullptr;
     }
   }
 
@@ -393,16 +409,20 @@ nsresult FileBlockCache::Read(int64_t aO
       }
       // Block has been written to file, either as the source block of a move,
       // or as a stable (all changes made) block. Read the data directly
       // from file.
       nsresult res;
       {
         MutexAutoUnlock unlock(mDataMutex);
         MutexAutoLock lock(mFileMutex);
+        if (!mFD) {
+          // Not initialized yet, or closed.
+          return NS_ERROR_FAILURE;
+        }
         res = ReadFromFile(BlockIndexToOffset(blockIndex) + start,
                            dst,
                            amount,
                            bytesRead);
       }
       NS_ENSURE_SUCCESS(res,res);
     }
     dst += bytesRead;
--- a/dom/media/MediaShutdownManager.cpp
+++ b/dom/media/MediaShutdownManager.cpp
@@ -73,17 +73,17 @@ MediaShutdownManager::InitStatics()
   sInitDone = true;
   sInstance = new MediaShutdownManager();
 
   nsresult rv = GetShutdownBarrier()->AddBlocker(
     sInstance, NS_LITERAL_STRING(__FILE__), __LINE__,
     NS_LITERAL_STRING("MediaShutdownManager shutdown"));
   if (NS_FAILED(rv)) {
     LOGW("Failed to add shutdown blocker! rv=%x", uint32_t(rv));
-    sInstance = nullptr;
+    sInstance->mError = rv;
   }
 }
 
 void
 MediaShutdownManager::RemoveBlocker()
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mIsDoingXPCOMShutDown);
@@ -94,17 +94,17 @@ MediaShutdownManager::RemoveBlocker()
   sInstance = nullptr;
   DECODER_LOG(LogLevel::Debug, ("MediaShutdownManager::BlockShutdown() end."));
 }
 
 nsresult
 MediaShutdownManager::Register(MediaDecoder* aDecoder)
 {
   MOZ_ASSERT(NS_IsMainThread());
-  if (!sInstance) {
+  if (NS_FAILED(mError)) {
     return NS_ERROR_NOT_INITIALIZED;
   }
   if (mIsDoingXPCOMShutDown) {
     return NS_ERROR_ABORT;
   }
   // Don't call Register() after you've Unregistered() all the decoders,
   // that's not going to work.
   MOZ_ASSERT(!mDecoders.Contains(aDecoder));
--- a/dom/media/MediaShutdownManager.h
+++ b/dom/media/MediaShutdownManager.h
@@ -78,13 +78,14 @@ private:
   static StaticRefPtr<MediaShutdownManager> sInstance;
 
   // References to the MediaDecoder. The decoders unregister themselves
   // in their Shutdown() method, so we'll drop the reference naturally when
   // we're shutting down (in the non xpcom-shutdown case).
   nsTHashtable<nsRefPtrHashKey<MediaDecoder>> mDecoders;
 
   bool mIsDoingXPCOMShutDown = false;
+  nsresult mError = NS_OK;
 };
 
 } // namespace mozilla
 
 #endif
new file mode 100644
--- /dev/null
+++ b/dom/media/test/reftest/generateREF.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script type="application/javascript">
+</script>
+</head>
+<body>
+<video id="v1" style="position:absolute; left:0; top:0"></video>
+<canvas id="canvas"></canvas>
+<script type="application/javascript">
+/* READ ME first.
+The script is trying to make a reftest sample for reftest.
+HOW TO USE:
+1. Choose the first or last frame you want to generate. And set
+window.onload function to dumpFirstFrameToConsole/dumpLastFrameToConsole.
+2. Set the video.src in dumpFirstFrameToConsole/dumpLastFrameToConsole.
+3. Run the script on browser.
+4. Open console (ctrl+shift+k) to get the first/last frame.
+5. Copy the url to your xxx-ref.html(short.mp4.firstframe-ref.html).
+You might hit security error if the video.src cross origin.
+Enable "media.seekToNextFrame.enabled" for the seekToNextFrame function
+or using nightly, the seekToNextFrame() ensure the ended event fired.
+*/
+
+//window.onload = function() { setTimeout(dumpFirstFrameToConsole, 0); };
+window.onload = function() { setTimeout(dumpLastFrameToConsole, 0); };
+
+function drawVideoToConsole(v) {
+  var canvas = document.getElementById("canvas");
+  canvas.width = v.videoWidth;
+  canvas.height = v.videoHeight;
+  var ctx = canvas.getContext("2d");
+  ctx.drawImage(v, 0, 0, v.videoWidth, v.videoHeight);
+  var dataURL = canvas.toDataURL();
+  console.log(dataURL);
+}
+
+function dumpFirstFrameToConsole() {
+  var video = document.getElementById("v1");
+  video.src = "short.mp4";
+  video.preload = "metadata";
+  video.addEventListener("loadeddata", function() {
+    drawVideoToConsole(video);
+  });
+}
+
+function dumpLastFrameToConsole() {
+  var video = document.getElementById("v1");
+  video.src = "short.mp4";
+  video.preload = "metadata";
+  video.seenEnded = false;
+  // Seek to the end
+  video.addEventListener("loadeddata", function() {
+    video.currentTime = video.duration;
+    video.onseeked = () => {
+      video.onseeked = null;
+      callSeekToNextFrame();
+    };
+  });
+
+  function callSeekToNextFrame() {
+    video.seekToNextFrame().then(
+      () => {
+        if (!video.seenEnded)
+          callSeekToNextFrame();
+      },
+      () => {
+        // Reach the end, do nothing.
+      }
+    );
+  }
+
+  video.addEventListener("ended", function() {
+    video.seenEnded = true;
+    drawVideoToConsole(video);
+  });
+}
+</script>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/media/test/reftest/reftest.list
@@ -0,0 +1,2 @@
+skip-if(Android) fuzzy-if(OSX,22,49977) skip-if(winWidget) HTTP(..) == short.mp4.firstframe.html short.mp4.firstframe-ref.html
+skip-if(Android) fuzzy-if(OSX,23,51392) fuzzy-if(winWidget,59,76797) HTTP(..) == short.mp4.lastframe.html short.mp4.lastframe-ref.html
new file mode 100644
--- /dev/null
+++ b/dom/media/test/reftest/short.mp4.firstframe-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<img style="position:absolute; left:0; top:0"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAADwCAYAAABxLb1rAAAHv0lEQVR4nO3dQWyfdR3H8R8d7XBjMDYcYzqCQY0SkWhQAomJJ2/GgyeNiTExHk3URE9e1INGEz3NA5CYETwQFi8YEvAgGg6LogFDIojbEBTGpsyNrWNt9/HQso0Btus2vu2+r1/yypN/+/x/+fbyzpP/0z4dGSMAHY3qAQCqCCDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSCl/jNGsmFi/vUVk5mZHDk2Rl4ZI5kaOTo25MC4/NT5h8b894+PTTk+NpXPz+omgJSaGyOZGDm48PrfY2R6YmRmzMvk9cm67afOPzpGpsfIsbExx8bG8vlZ3QSQFeFPYyQ3fyzJwSRHkiQ5+lqS55P9u5P163P0De+ZWlA/O6uXALICrEk+cEvy9W8nOZTk1Zxe/5yP4JVX5vgb3jOVjCtWwOysZgJIqSNjazJ5c+75zleTnMib12tJppOJLTnziu/IGHl1BczP6iaAlNoz1iSbbl+48nvlLQJ4/IwATp56nwByIQggpXbc+enk4d+edcV3IslskrnTX558YwDhQhBAaj3yaPLyoTMCOLsQwDkB5KITQEo8dP2G5N4dycwZkft/a921mRlryufm0iKA1Lh3R7L/2aXFTwC5SASQd9TOmzYnD9y99PC9vq7aeNbvAcL5E0DeWQ/cnTz3hACyIgggF8XJhePcmMihMfLzz9yW/PHhcw+fAHIRCSAX3sTEqeOJMZKP3568/Nfk8D4BZEURQC6eDRvy+599N8nR5YfvVACvyrHqn4dLjgBycWzfnnz/B8nJg0mOCSArkgByQcyNtTk6Ru6/447krrvy+hNdTi5atpnMPwFmkbXh7IchwPkTQM7fmg2ZHVPJ+29LnnoqOXDgHC7tZhYIIO88AWRZXr/L++jnPpvHv/TF5F9/yann+C2y5k4eTQ6eTHb/Lfd97fPJkX1LCOC6+RsqcAEJIMv30VuTx36XHNif0w8xWOJ6+kD+8OVv5Cs3XZ0c3iOAlBBAluWRa65Knt+7pNYdS5LZhU8D9+1JfrUrGZuSqffmnmu3Jc/sE0BKCCDLci4BPHPNfuub+cV1W5KxKRkb5wP47D8EkBICyLLs2rIteekcbnbs+HVy5xfetM9Da7cmTzwngJQQQJZlyQGcnsnuH/4key+/KU+PG07vMTF/fGjt1uRJV4DUEECW5b5t25KDbxHAuePzHns8+d6PkhuvSybffp+dm69N/u4mCDUEkGV52wBOH85/d96TJ2+9PQ9es3XRfQSQSgLIsjy45erkxb2Z/yuOY8lju5Mf/zT54KeSsXn+H54vwc7Nm5I9S3gwqgByEQggy3IqgIefyZO7duTPn7wzj37oI5kdIxlXJxNrl7SPAFJJAFmWE2Mkt3w42bg+WbP8fQSQSgLIssyMkVxx+XnvI4BUEkBKLTmA69ct+XNFWCoBpNQvr3t3sm/v4gGcmhJALjgBpNT929+TvPjC4gFcAbNy6RFASu163w3J/hcFkBICSCkBpJIAUkoAqSSAlBJAKgkgpQSQSgJIKQGkkgBSSgCpJICUEkAqCSClBJBKAkgpAaSSAFJKAKkkgJQSQCoJIKUEkEoCSCkBpJIAUkoAqSSAlBJAKgkgpQSQSgJIKQGkkgBSSgCpJICUEkAqCSClBJBKAkgpAaSSAFJKAKkkgJQSQCoJIKUEkEoCSCkBpJIAUkoAqSSAlBJAKgkgpQSQSgJIKQGkkgBSSgCpJICUEkAqCSClBJBKAkgpAaSSAFJKAKkkgJQSQCoJIKUEkEoCSKkHbtyevPySAFJCACklgFQSQEr9ZvMnkj2L92924rLMXFY/L5cWAaTUI5tuS/YtUr+T0zk4RrJ2snxeLi0CyIpy8qzX02MqM2NdXn3TuVML6mdm9RJAVrQT412ZfsvQrV1QPyOrlwCyqswuqJ6DS4MAsqoIIBeSAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0JYAAm0JINCWAAJtCSDQlgACbQkg0Nb/AJRYBp4E6qsBAAAAAElFTkSuQmCC"
+>
new file mode 100644
--- /dev/null
+++ b/dom/media/test/reftest/short.mp4.firstframe.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<script type="text/javascript">
+function doTest() {
+  var video = document.getElementById("v1");
+  video.src = "../short.mp4";
+  video.preload = "metadata";
+  video.addEventListener("loadeddata", function() {
+    document.documentElement.removeAttribute('class');
+  });
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</head>
+<body>
+<video id="v1" style="position:absolute; left:0; top:0"></video>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/dom/media/test/reftest/short.mp4.lastframe-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<img style="position:absolute; left:0; top:0"
+src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAADwCAYAAABxLb1rAAAUZElEQVR4nO3deXSU9b3H8W9C9gQSCCAga0BZtBfc6gK9rXpVtMut7fXaxVO1221Pqz0tVW/r9Vhba7VVq7Va13Lq1bpjwVYRK0tYZAuEfU8IBLKSQPZ13vePyUUHk3kSyMwzye/znPM6UZH5/fI8mfeZzPM8vzHMEBFxkfk9ARERvyiAIuIsBVBEnKUAioizFEARcZYCKCLOUgBFxFkKoIg4SwEUEWcpgCLiLAVQRJylAIqIsxRAEXGWAigizlIARcRZCqCIOEsBFBFnKYAi4iwFUEScpQCKiLMUQBFxlgIoIs5SAEXEWQqgiDhLARQRZymAIuIsBVBEnKUAioizFEARcZYCKCLOUgBFxFkKoIg4SwEUEWcpgCLiLAVQRJylAIqIsxRAEXGWAigizlIARcRZCqCIOEsBFBFnKYAi4iwFUEScpQCKiLMUQBFxlgIoIs5SAEXEWQqgiDhLARQRZymAIuIsBVBEnKUAioizFEARcZYCKCLOUgBFxFkKoIg4SwEUEWcpgCLiLAVQRJylAIqIsxRAEXGWAigizlIARcRZCqCIOEsBFBFnKYAi4iwFUEScpQCKiLMUQBFxlgIoIs5SAEXEWQqgiDhLARQRZymAIuIsBVBEnKUAioizFEARcZYCKCLOUgBFxFkKoHQuLiXIDGwQJRYPyWfSbkat33ProTYz2s1ojoG5SGxRAMVDJlgapZYANo5jZpCSHvyzIX7PrXOtH/tvA8GSfZ+XxB4FUELFxYEZh8wg5wyCWzsfbpVAJYfS0ziYmuLvXD+iwpI5aMZLmQPJnTaZxTffyO67fk517hJa8tZCWWHH/ANAPezdSmDdCsof/gMb59zBps9cw5tjp1CUnELl4Gzfvx+JDgVQQiUkBr+OGQc/+SnUHjkhgCVANQdTU2IqgEcTMuDar8Di9+DgfmhqgLpjdL0Fgl9aAkEFZfDW+/DVr8M550Kc/9+TRJ4CKCdIAxvImpu+BLXFx3PRBrR8tB82BWyyb/OsNKM2KZHnp0+CP94PgWqgKUzwerAFgD+/xsKZs2kwo973YyKRogBKiCozyBwDW1ZCc3lIAFtDAjgNvwPIjOmQvxIqizqq1dA7AQQoqIDNhXDRZ2i3Ab4fF4kMBVBC/PbMSbBmVZgyNAcljARLivr8qiyFKksh/9s3QfH+3gteV9uREsp+/wCtianUWbzvx0d6lwIoHxo+HnKXQFUlABXUd1KEVqCJNovniA9zPGLJ8IM5UHcUqso7mV8vb4010NYA117HAb+Pj/Q6BdBBbSH/nkDAjPeumk3rb+7vfhgGDIpqAPdZHLvNyP/xLXCoKHLB62qrCbDmv+9lsxnFSZm+H0PpHQqggwJmMCB4BjcYwwx44UWoret2D+rtxJBGVlF8Isz6NOzfA421kQtdV1sbsLUQJp7NDr0n2G8ogI5qMYPkLP6UnQXPz+15EKI0z3qL45gZi87/FKza2P351R+Frflwxw/g0gtgWCYkGiSmwugJcP0NcPe9UHcEGo92/KWA9+O+/jKrLjqfY2bUxcBxlFOjADqqzQyyR8P9v4aigp7Frzp6ATxmxlEzePIvUNnZe5KdbEUH4bknWTj7cg4kGyUDgxd3t5jRaAbJGexPzmCbxfPG5bOouvcuqCgk+DLPY6sshUcfosn63i2B8nEKoGNKbABFZsz/12tg4x72rlrcxTO9lRMufAnZgiGJ/IXQHyRmwGeugiqPX3vrj0BrLTz8Bw7MOC/4Crdbv6omUGZG/SWz4J13ob4cAuHeCmgLXh40+7NsiYHjKadGAXRC6vF/PmRxcPHlUFILNQForen6iR4mgNGa+4aMbHj0yfDxA2iro/jZx1k19DRWZA8nGL/uXrYSz84x4zg49SwqX3qW8BdUtwEN8INbKUhK7fXvV6JLAXREkRnlccb2P90H1NIANHb6BG/teJKXd+hkq418ABttAFVmFH3vR1BwuIt5tkCgGCiBp5+gIGfsKZ2YaTRjz5k58OqLHrVth9fe5NCnL/f9uMqpUQBdcdYkeOg+aCoBamgEjnb65G7xDmBJU/BX4AiqM6PcDJ54Dqo7u8OjpUM5bF7IoalnsGHIQLC4k49ggrEsIzkYwf2F4RtYXAq3zvH/uMopUQD7qWJLYocZ/zvzbHj5aYKruPTiFuH5V6YMpGX46dRsWkXYX0l37ab+xpt6bdx9lkBrVg777r4d6iv58BXxiVsDUEWddbb8lvQVCmA/tc8MrroOirZ85J7eblzm0YMANkVw/jWDsuHKz+L5XuTmLSzMmQiW1CvXJR60NDaZ8fy/zYQ9mzvG7yyATUALWMclRdInKYD9REWqUZ5izJ+QStlXL4U9W6G983f5Ot1K2+Gd9ey458Hjy740tbd3/f9bZFdJWTR+PMydG2bC9UAD3DKHgtSOOzMGDOq18dckJ8OttxJcCixMgL98NatS/T/+cnIUwH6iNKnjVd8z98K2jktbWrp/ZwfvrGf5N+/g2SuvDft8P75ZZAO4bPJk2L4jzATqgEqqT59AYVpWL46dRKsZ/zSjfOpUgm8dhNkhc/9IXlai78dfTo4C2E9sPyMHtm3i+Lnd7kQMoLQSVq6B0edywFLJnz4TDnV+eiSaAVz6jZuhNtzyVtWwdXHExq82g9QM2JILgSNdT2PTclZ/8TLfj7+cHAWwn/hnRgoU7OF4/bpxUwO0wO0/5x+jx8PQaWw1i5kAFt51DzS0hJlADfte/H3Exv//s9CFj/0yfAAPbocH7ozqfdHSexTAfqDVjAeThsL24uNd63wLdNzpUAO/voeK6dOOP0abBRdJWH3BOVDR2XV30QxgHFUvvwiBMC9jj5Wy94YvR3zfNt/4dTh8IMyOaKB+3TuUmVETAz8L0jMKYD8xb8oFsPNQZ8n7yNYElUWsuOWbrM/KYH1WxsceJxYC2GwW/FyPcGetSwtZecWsiO/Xims/DwvfCrMjGuHgRjhrSvAT86RPUQD7iecmjIWyzsK1ElgFSx6HR75LuwU/I7erx1l+0SegKtwrnsgGsHpAGo3p2d5X7FQWsuOqmRHfrxsHD4cF73hM5ig7T0slL93/nwPpGQWwn3huwlgoL/n4c7PmHzD/p2y7cjRLZiT1iQByxtnQFOYSHIAtH/DBhWdFfL+uTsuCeX/32BnNHDl7LBsH+f9zID2jAPYTS4YMhcIi2HsQGgKweTM89hhMmAzxyWGj91HLL5oOVcUeT/jIBXB/2iC47Erv8Z9/hhXpkV+YNN+y4dGXvOdz1aVsSE3w/edAekYB7CeOB3DnfhofeZL1My9h7cUXBf88axikD+zW4/gdwIKUDLjpO97j33d3VAK4zgbB/c95z+fLn1cA+yAFsJ+o61BjCdTYyT8R/Q7g1oFpcNfPvcf/6ueoHjs44vt1u2XChV/yns8jv2Ndkv8/B9IzCmA/0V8CmJ+SBA8+4D3+5y/l4JDI34FRaCPhshu85/OXZ1ib6P/PgfSMAigh/A7g+6kGc5/wHn/KWRFfkgszdqcNg89e340APsXKZP+Pn/SMAighFp87Fcr2+xbAD4akwpt/9R5/9LiorMKyL2ME3HyL93xeeJZVKf4fP+kZBVBCLJg8BorCLUIQ2QDmDkuGBS94j5+UEJXbzw4kZcPMq73ns24FqzOSfD9+0jMKoIR4fcJpsHeLbwHcmDMUcr2uuwuO391Le05FYXwWTJ/lPZ9Fb7E2M/IfEiW9SwGUEH4HcMOkYbApt1vjR8MRGwJDpnrPZ/sG1gxJ8/34Sc8ogBLC7wDmTRwKe/NiKoDHbJj3fLasZe3QdN+Pn/SMAighYiKAu9bFTAAbbTDtNtx7Prs2sGpk761ILdGhAEoIBTBUmw2DxBzv+WzIZfWoTN+Pn/SMAighFMATpIyDQWd4z+fluawd/vHlxSS2KYASQgEMVW/ZMO6T3vN55DesztZJkL5GAZQQfgdw/YTsmApgiWXC5Eu857N0IasHp/p+/KRnFEAJ4XcA14zLgp1rYiaApZZF08Bx3vPZsEqXwfRBCqCE8DuAq8dmwr4NMRPARhtKq43wns+2PF0G0wcpgBLC7wCuGJkGu9fHVADbbVS3Apg3XJfB9DUKoITwO4DvDTZY+qb3+CNOi9I+GQZp3bgMZvtqlo/RZTB9jQIoIfwO4LuZBn993Hv8USOjs08Sx0DGJO/5vP0yuaP1CrCvUQAlxBs5I2Df1m4FsCEC4+dlGTz1K+/xx0yMyv7Yb4PgvMu85/PY79g4RGeB+xoFUEL4HcDNQw1+1Y3196IUwF2WDF/7vvd8br+FvMxk34+f9IwCKCH8DmDBYIPbbvIe/9d3MT8KKzBvijsTfvhomIm0Bb/c+A0OJUT+Q5qkdymAEmLexFFQsK1bAYzEkvQFgw3+fab3+A/ey9+j8KlwS20o/PSpMBNpDX657j8oS9V6gH2NAigh/A5gTZLBZed5jz/3z6ybMD7C+yOObZkXw8MLw0ykDqiHGedQl6wA9jUKoITwO4BHBxjkDPEe/9VX2DX9XyK8P+IoHjsbnl4RZiI1QC3kTKQhVXeC9DUKoITwO4DHVQHtYcZf/DbzRkb6c4GTWHjBlXAk0PU8ArXQXkOLJRAYoLPAfY0CKCFiJYAtuTvCB3D1Etacf1Zk90d8Om+ff0X4ANIM+7dRa0ZbnM4C9zUKoISIlQDy5CtwNMz4xVso/eHXwSwinw7XZsYxMxb++DtAPTUEf9n92BZogbcXdPy9k/9AevGHAighYiWAi6//XvgAVhXAo7+AuMgEsMWMWjP2PfFboJ46gqc7Ogtg+VOPd/y9eN+Pn/SMAighYiWAW770BSg/3PX4jU2wYiUVg5LZF4HxSwcY1WkJsPx9oLnreZTWc/Q7P4nKZxRL71MAJUSsBHDBOZ+AbZu6Hr+uHnbtpm3saZSk9v4rr8NxRuvwLKgqBZq6nse2A8yffB6BGDh20nMKoISIlQDuGJQFv/C6J7gFfnY7y3LG9fr4y3LGwf/8jC7PxDR2fH30Fdak5fh+3OTkKIASIlYCuCk1HS6e1fX47fXBr3nr2H7h+b06dsAs+Ji5S7oOYMfW9qnr2JA1xffjJidHAZQQsRLA40r2AQ1hCtRCye8fojJtEIcGnPplKHXpmRxJTOHIHx+A5urw++BYO9WJw6iMi/T1iBIpCqCE6EkAm6Iwn51PPkzYkxANdZC3Hqafx+GEU78V7ZAZnDkNGiuh7Vj4fbClQAHs4xRACTFv4ggo7N6CqM1RmM+yyTNg1wHv+SxawBsXzaDCjOqTGKe14+tr506Fdcu9xzu8nfJvfMH34yWnRgGUEPMmjoCi7r0CbInCfBaMmAB/eMZ7PjXl8PoL1CcYNfE9H6fRDNJTIPddqApz+c3/b2/O5c2cIb4fLzk1CqCEeHf6aCjb7vn8L8sZSH5q5OezOzkT7nmA4KUoYS5HAWhph4WLmH/p5eww41B68JVduGv0DsYZZcnG38+ZCv94wzt8NECgGq67jl1pWvygr1MA5biAGa+OHwjlOz0zUDEpk01pkZ9T4cBhFA8ZCYc3A/XefTpWC4X74dtfId863qeMN7C4Th4/jsDpQ+G2W2HPlu698qOF5rWLqBg9mvy4zh5T+hIFUEK8MjYZduUS7vZ/gBaLzIrQXSmbPRsKC7sRqA9DRd1hjjz2EEu/exOrP/efvD7jEjZeeT3LLrqady+8gr1f+x60lBP2LPOJW14ex66+2vfjJL1DAZQQL49Ogk2LCBD+CrgKM+qiOK/5WVlw223gmeaOrbkS2o9CXRXUV0NlI1Q3Q0Vb0JFWqGghuKR9azfr1wzf+hbvDxvm+3GS3qEASoj3hhuU5tPikYIGM9qjOK/gWdpU+PO9UNWNs9S9vRWVwZw7IX4QTVr1pd9QACXE+yPjYNtij/sfoNoiswpLV4JjxfO3aZnw9N3RSF7H1vGKc86dvDoqBxIH025a+r6/UAAlxM4RibDN4zq4ABSYUenXPOMN/vQSFHe6QFUvba1APSzbCNd8BSwDFL5+RwGUEPlZBsv/5pmHo2ZU+TjPNz7xKVrv/B18sCoC8WsH2mj54D2aZl3DypThHeNqvb/+RgGUEHvGfRL2dKx93NUbge1QkP051tklvs2zxeJptjjaRk6CO++D/G1wqPzU21fdADv2wX/9CMZrkYP+TgGUEHmDp8CSjguhm7s441rfztEzb2RHxhU+zjWNgCVRaMkcsHSWTT8P5twBJQegrbHzeXttR4/R/Mv7eWvW5VTGpVCiV3z9ngIonep6gc84sITj987GlESDjNNh9NnwxZvh1rvhpdfgn0thUz4U7INDB2HvLli8DF6fB798BG74PoyfxrG0odTZyd1LLH2TAig9FNuvimosnRpLp3jAUEoSh5M3ZDgbskewdNQolowcwdunj+SdMaNYOmIUuSNHU5AyjD1J2ZTGpVNkCRSbUR8D34dEhwIoIs5SAEXEWQqgiDhLARQRZymAIuIsBVBEnKUAioizFEARcZYCKCLOUgBFxFkKoIg4SwEUEWcpgCLiLAVQRJylAIqIsxRAEXGWAigizlIARcRZCqCIOEsBFBFnKYAi4iwFUEScpQCKiLMUQBFxlgIoIs5SAEXEWQqgiDhLARQRZymAIuIsBVBEnKUAioizFEARcZYCKCLOUgBFxFkKoIg4SwEUEWcpgCLiLAVQRJylAIqIsxRAEXGWAigizlIARcRZCqCIOEsBFBFnKYAi4iwFUEScpQCKiLMUQBFxlgIoIs5SAEXEWQqgiDhLARQRZymAIuIsBVBEnKUAioizFEARcZYCKCLOUgBFxFkKoIg4SwEUEWcpgCLiLAVQRJylAIqIsxRAEXGWAigizlIARcRZCqCIOEsBFBFnKYAi4iwFUEScpQCKiLMUQBFxlgIoIs5SAEXEWQqgiDhLARQRZymAIuIsBVBEnKUAioizFEARcZYCKCLOUgBFxFkKoIg4SwEUEWf9H9sKKGNDofIcAAAAAElFTkSuQmCC"
+>
new file mode 100644
--- /dev/null
+++ b/dom/media/test/reftest/short.mp4.lastframe.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<script type="text/javascript">
+function doTest() {
+  var video = document.getElementById("v1");
+  video.src = "../short.mp4";
+  video.preload = "metadata";
+  video.seenEnded = false;
+  // Seek to the end
+  video.addEventListener("loadeddata", function() {
+    video.currentTime = video.duration;
+    video.onseeked = () => {
+      video.onseeked = null;
+      callSeekToNextFrame();
+    };
+  });
+
+  function callSeekToNextFrame() {
+    video.seekToNextFrame().then(
+      () => {
+        if (!video.seenEnded)
+          callSeekToNextFrame();
+      },
+      () => {
+        // Reach the end, do nothing.
+      }
+    );
+  }
+
+  video.addEventListener("ended", function() {
+    video.seenEnded = true;
+    document.documentElement.removeAttribute('class');
+  });
+}
+window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</head>
+<body>
+<video id="v1" style="position:absolute; left:0; top:0"></video>
+</body>
+</html>
--- a/dom/tests/reftest/xml-stylesheet/reftest.list
+++ b/dom/tests/reftest/xml-stylesheet/reftest.list
@@ -1,12 +1,12 @@
 == css_relative_href.xml pass.svg
 HTTP == css_relative_href_also_external.xml pass.svg
 HTTP == css_relative_href_also_external_override.xml pass.svg
 == embedded_dtd_id.svg pass.svg
 != error_no_href.svg fail.svg
-fails-if(!stylo) == lreas_selflink_dtd_id.svg pass.svg
+fails-if(!styloVsGecko) == lreas_selflink_dtd_id.svg pass.svg
 == lreas_selflink_empty_href.svg pass.svg
 == lreas_selflink_relative_href.svg pass.svg
 == xslt_relative_href.svg pass.svg
 == xslt_selflink_dtd_id.xml pass.svg
 == xslt_selflink_empty_href.xml pass.svg
 == xslt_selflink_relative_href.xml pass.svg
--- a/dom/webidl/HTMLButtonElement.webidl
+++ b/dom/webidl/HTMLButtonElement.webidl
@@ -30,18 +30,16 @@ interface HTMLButtonElement : HTMLElemen
   [SetterThrows, Pure]
            attribute DOMString formTarget;
   [SetterThrows, Pure]
            attribute DOMString name;
   [SetterThrows, Pure]
            attribute DOMString type;
   [SetterThrows, Pure]
            attribute DOMString value;
-// Not yet implemented:
-//           attribute HTMLMenuElement? menu;
 
   readonly attribute boolean willValidate;
   readonly attribute ValidityState validity;
   readonly attribute DOMString validationMessage;
   boolean checkValidity();
   boolean reportValidity();
   void setCustomValidity(DOMString error);
 
--- a/editor/libeditor/CSSEditUtils.cpp
+++ b/editor/libeditor/CSSEditUtils.cpp
@@ -544,25 +544,23 @@ CSSEditUtils::GetCSSInlinePropertyBase(n
     return NS_OK;
   }
 
   MOZ_ASSERT(aStyleType == eSpecified);
   RefPtr<DeclarationBlock> decl = element->GetInlineStyleDeclaration();
   if (!decl) {
     return NS_OK;
   }
-  if (decl->IsServo()) {
-    MOZ_CRASH("stylo: not implemented");
-    return NS_ERROR_NOT_IMPLEMENTED;
-  }
+
   nsCSSPropertyID prop =
     nsCSSProps::LookupProperty(nsDependentAtomString(aProperty),
                                CSSEnabledState::eForAllContent);
   MOZ_ASSERT(prop != eCSSProperty_UNKNOWN);
-  decl->AsGecko()->GetPropertyValueByID(prop, aValue);
+
+  decl->GetPropertyValueByID(prop, aValue);
 
   return NS_OK;
 }
 
 already_AddRefed<nsComputedDOMStyle>
 CSSEditUtils::GetComputedStyle(Element* aElement)
 {
   MOZ_ASSERT(aElement);
--- a/editor/reftests/reftest.list
+++ b/editor/reftests/reftest.list
@@ -35,90 +35,90 @@ fails-if(Android) needs-focus != spellch
 == spellcheck-input-attr-dynamic-override.html spellcheck-input-nofocus-ref.html
 fails-if(Android) needs-focus != spellcheck-input-attr-dynamic-override.html spellcheck-input-ref.html
 == spellcheck-input-attr-dynamic-override-inherit.html spellcheck-input-nofocus-ref.html
 fails-if(Android) needs-focus != spellcheck-input-attr-dynamic-override-inherit.html spellcheck-input-ref.html
 == spellcheck-input-property-dynamic-override.html spellcheck-input-nofocus-ref.html
 fails-if(Android) needs-focus != spellcheck-input-property-dynamic-override.html spellcheck-input-ref.html
 == spellcheck-input-property-dynamic-override-inherit.html spellcheck-input-nofocus-ref.html
 fails-if(Android) needs-focus != spellcheck-input-property-dynamic-override-inherit.html spellcheck-input-ref.html
-fails-if(stylo) == spellcheck-textarea-attr.html spellcheck-textarea-nofocus-ref.html
+fails-if(styloVsGecko) == spellcheck-textarea-attr.html spellcheck-textarea-nofocus-ref.html
 #the random-if(Android) tests pass on android native, but fail on android-xul, see bug 728942
-random-if(Android) needs-focus fails-if(stylo) != spellcheck-textarea-attr.html spellcheck-textarea-ref.html
-needs-focus fails-if(stylo) == spellcheck-textarea-focused.html spellcheck-textarea-ref.html
-needs-focus fails-if(stylo) == spellcheck-textarea-focused-reframe.html spellcheck-textarea-ref.html
-needs-focus fails-if(stylo) == spellcheck-textarea-focused-notreadonly.html spellcheck-textarea-ref2.html
-random-if(Android) needs-focus fails-if(stylo) != spellcheck-textarea-nofocus.html spellcheck-textarea-ref.html
-random-if(Android) needs-focus fails-if(stylo) != spellcheck-textarea-disabled.html spellcheck-textarea-ref.html
-random-if(Android) needs-focus fails-if(stylo) != spellcheck-textarea-attr-inherit.html spellcheck-textarea-ref.html
-random-if(Android) needs-focus fails-if(stylo) != spellcheck-textarea-attr-dynamic.html spellcheck-textarea-ref.html
-random-if(Android) needs-focus fails-if(stylo) != spellcheck-textarea-attr-dynamic-inherit.html spellcheck-textarea-ref.html
-random-if(Android) needs-focus fails-if(stylo) != spellcheck-textarea-property-dynamic.html spellcheck-textarea-ref.html
-random-if(Android) needs-focus fails-if(stylo) != spellcheck-textarea-property-dynamic-inherit.html spellcheck-textarea-ref.html
-random-if(Android) needs-focus fails-if(stylo) != spellcheck-textarea-attr-dynamic-override.html spellcheck-textarea-ref.html
-random-if(Android) needs-focus fails-if(stylo) != spellcheck-textarea-attr-dynamic-override-inherit.html spellcheck-textarea-ref.html
-random-if(Android) needs-focus fails-if(stylo) != spellcheck-textarea-property-dynamic-override.html spellcheck-textarea-ref.html
-random-if(Android) needs-focus fails-if(stylo) != spellcheck-textarea-property-dynamic-override-inherit.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-attr.html spellcheck-textarea-ref.html
+needs-focus fails-if(styloVsGecko) == spellcheck-textarea-focused.html spellcheck-textarea-ref.html
+needs-focus fails-if(styloVsGecko) == spellcheck-textarea-focused-reframe.html spellcheck-textarea-ref.html
+needs-focus fails-if(styloVsGecko) == spellcheck-textarea-focused-notreadonly.html spellcheck-textarea-ref2.html
+random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-nofocus.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-disabled.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-attr-inherit.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-attr-dynamic.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-attr-dynamic-inherit.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-property-dynamic.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-property-dynamic-inherit.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-attr-dynamic-override.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-attr-dynamic-override-inherit.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-property-dynamic-override.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-textarea-property-dynamic-override-inherit.html spellcheck-textarea-ref.html
 needs-focus == caret_on_focus.html caret_on_focus-ref.html
-needs-focus fails-if(stylo) != caret_on_textarea_lastline.html caret_on_textarea_lastline-ref.html
+needs-focus fails-if(styloVsGecko) != caret_on_textarea_lastline.html caret_on_textarea_lastline-ref.html
 needs-focus == input-text-onfocus-reframe.html input-text-onfocus-reframe-ref.html
 fuzzy-if(skiaContent,3,1) needs-focus == input-text-notheme-onfocus-reframe.html input-text-notheme-onfocus-reframe-ref.html
 needs-focus == caret_after_reframe.html caret_after_reframe-ref.html
 == nobogusnode-1.html nobogusnode-ref.html
 == nobogusnode-2.html nobogusnode-ref.html
-fails-if(stylo) == spellcheck-hyphen-valid.html spellcheck-hyphen-valid-ref.html
-fails-if(Android) needs-focus fails-if(stylo) != spellcheck-hyphen-invalid.html spellcheck-hyphen-invalid-ref.html
-fails-if(stylo) == spellcheck-slash-valid.html spellcheck-slash-valid-ref.html
-fails-if(stylo) == spellcheck-period-valid.html spellcheck-period-valid-ref.html
-fails-if(stylo) == spellcheck-space-valid.html spellcheck-space-valid-ref.html
-fails-if(stylo) == spellcheck-comma-valid.html spellcheck-comma-valid-ref.html
-fails-if(stylo) == spellcheck-hyphen-multiple-valid.html spellcheck-hyphen-multiple-valid-ref.html
-fails-if(Android) needs-focus fails-if(stylo) != spellcheck-hyphen-multiple-invalid.html spellcheck-hyphen-multiple-invalid-ref.html
-fails-if(stylo) == spellcheck-dotafterquote-valid.html spellcheck-dotafterquote-valid-ref.html
-fails-if(stylo) == spellcheck-url-valid.html spellcheck-url-valid-ref.html
-needs-focus fails-if(stylo) == spellcheck-non-latin-arabic.html spellcheck-non-latin-arabic-ref.html
-needs-focus fails-if(stylo) == spellcheck-non-latin-chinese-simplified.html spellcheck-non-latin-chinese-simplified-ref.html
-needs-focus fails-if(stylo) == spellcheck-non-latin-chinese-traditional.html spellcheck-non-latin-chinese-traditional-ref.html
-needs-focus fails-if(stylo) == spellcheck-non-latin-hebrew.html spellcheck-non-latin-hebrew-ref.html
-needs-focus fails-if(stylo) == spellcheck-non-latin-japanese.html spellcheck-non-latin-japanese-ref.html
-needs-focus fails-if(stylo) == spellcheck-non-latin-korean.html spellcheck-non-latin-korean-ref.html
-fails-if(stylo) == unneeded_scroll.html unneeded_scroll-ref.html
+fails-if(styloVsGecko) == spellcheck-hyphen-valid.html spellcheck-hyphen-valid-ref.html
+fails-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-hyphen-invalid.html spellcheck-hyphen-invalid-ref.html
+fails-if(styloVsGecko) == spellcheck-slash-valid.html spellcheck-slash-valid-ref.html
+fails-if(styloVsGecko) == spellcheck-period-valid.html spellcheck-period-valid-ref.html
+fails-if(styloVsGecko) == spellcheck-space-valid.html spellcheck-space-valid-ref.html
+fails-if(styloVsGecko) == spellcheck-comma-valid.html spellcheck-comma-valid-ref.html
+fails-if(styloVsGecko) == spellcheck-hyphen-multiple-valid.html spellcheck-hyphen-multiple-valid-ref.html
+fails-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-hyphen-multiple-invalid.html spellcheck-hyphen-multiple-invalid-ref.html
+fails-if(styloVsGecko) == spellcheck-dotafterquote-valid.html spellcheck-dotafterquote-valid-ref.html
+fails-if(styloVsGecko) == spellcheck-url-valid.html spellcheck-url-valid-ref.html
+needs-focus fails-if(styloVsGecko) == spellcheck-non-latin-arabic.html spellcheck-non-latin-arabic-ref.html
+needs-focus fails-if(styloVsGecko) == spellcheck-non-latin-chinese-simplified.html spellcheck-non-latin-chinese-simplified-ref.html
+needs-focus fails-if(styloVsGecko) == spellcheck-non-latin-chinese-traditional.html spellcheck-non-latin-chinese-traditional-ref.html
+needs-focus fails-if(styloVsGecko) == spellcheck-non-latin-hebrew.html spellcheck-non-latin-hebrew-ref.html
+needs-focus fails-if(styloVsGecko) == spellcheck-non-latin-japanese.html spellcheck-non-latin-japanese-ref.html
+needs-focus fails-if(styloVsGecko) == spellcheck-non-latin-korean.html spellcheck-non-latin-korean-ref.html
+fails-if(styloVsGecko) == unneeded_scroll.html unneeded_scroll-ref.html
 == caret_on_presshell_reinit.html caret_on_presshell_reinit-ref.html
 fuzzy-if(browserIsRemote,255,3) asserts-if(browserIsRemote,0-2) asserts-if(webrender&&!browserIsRemote,0-1) == caret_on_presshell_reinit-2.html caret_on_presshell_reinit-ref.html
-fuzzy-if(asyncPan&&!layersGPUAccelerated,102,2824) fails-if(stylo) == 642800.html 642800-ref.html
+fuzzy-if(asyncPan&&!layersGPUAccelerated,102,2824) fails-if(styloVsGecko) == 642800.html 642800-ref.html
 == selection_visibility_after_reframe.html selection_visibility_after_reframe-ref.html
 != selection_visibility_after_reframe-2.html selection_visibility_after_reframe-ref.html
 != selection_visibility_after_reframe-3.html selection_visibility_after_reframe-ref.html
 == 672709.html 672709-ref.html
-fails-if(stylo) == 338427-1.html 338427-1-ref.html
+fails-if(styloVsGecko) == 338427-1.html 338427-1-ref.html
 skip-if(Android) needs-focus == 674212-spellcheck.html 674212-spellcheck-ref.html
 skip-if(Android) needs-focus == 338427-2.html 338427-2-ref.html
-skip-if(Android) needs-focus fails-if(stylo) == 338427-3.html 338427-3-ref.html
+skip-if(Android) needs-focus fails-if(styloVsGecko) == 338427-3.html 338427-3-ref.html
 skip-if(Android) needs-focus == 462758-grabbers-resizers.html 462758-grabbers-resizers-ref.html
-fails-if(stylo) == readwrite-non-editable.html readwrite-non-editable-ref.html
-fails-if(stylo) == readwrite-editable.html readwrite-editable-ref.html
-fails-if(stylo) == readonly-non-editable.html readonly-non-editable-ref.html
-fails-if(stylo) == readonly-editable.html readonly-editable-ref.html
-fails-if(stylo) == dynamic-overflow-change.html dynamic-overflow-change-ref.html
+fails-if(styloVsGecko) == readwrite-non-editable.html readwrite-non-editable-ref.html
+fails-if(styloVsGecko) == readwrite-editable.html readwrite-editable-ref.html
+fails-if(styloVsGecko) == readonly-non-editable.html readonly-non-editable-ref.html
+fails-if(styloVsGecko) == readonly-editable.html readonly-editable-ref.html
+fails-if(styloVsGecko) == dynamic-overflow-change.html dynamic-overflow-change-ref.html
 == 694880-1.html 694880-ref.html
 == 694880-2.html 694880-ref.html
 == 694880-3.html 694880-ref.html
 == 388980-1.html 388980-1-ref.html
-needs-focus fails-if(stylo) == spellcheck-superscript-1.html spellcheck-superscript-1-ref.html
-fails-if(Android) needs-focus fails-if(stylo) != spellcheck-superscript-2.html spellcheck-superscript-2-ref.html # bug 783658
+needs-focus fails-if(styloVsGecko) == spellcheck-superscript-1.html spellcheck-superscript-1-ref.html
+fails-if(Android) needs-focus fails-if(styloVsGecko) != spellcheck-superscript-2.html spellcheck-superscript-2-ref.html # bug 783658
 fuzzy-if(skiaContent,1,3400) needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-1.html 824080-1-ref.html
 fuzzy-if(OSX,1,1) needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-2.html 824080-2-ref.html #Bug 1313253
 fuzzy-if(OSX,1,1) needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-3.html 824080-3-ref.html #Bug 1312951
 needs-focus != 824080-2.html 824080-3.html
 fuzzy-if(skiaContent,1,3200) needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-4.html 824080-4-ref.html
 fuzzy-if(skiaContent,2,1800) needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-5.html 824080-5-ref.html
 needs-focus != 824080-4.html 824080-5.html
-needs-focus fails-if(stylo) == 824080-6.html 824080-6-ref.html
-needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) fails-if(stylo) == 824080-7.html 824080-7-ref.html
-needs-focus fails-if(stylo) != 824080-6.html 824080-7.html
+needs-focus fails-if(styloVsGecko) == 824080-6.html 824080-6-ref.html
+needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) fails-if(styloVsGecko) == 824080-7.html 824080-7-ref.html
+needs-focus fails-if(styloVsGecko) != 824080-6.html 824080-7.html
 # Bug 674927: copy spellcheck-textarea tests to contenteditable
 == spellcheck-contenteditable-attr.html spellcheck-contenteditable-nofocus-ref.html
 fails-if(Android) needs-focus != spellcheck-contenteditable-attr.html spellcheck-contenteditable-ref.html
 needs-focus == spellcheck-contenteditable-focused.html spellcheck-contenteditable-ref.html
 needs-focus == spellcheck-contenteditable-focused-reframe.html spellcheck-contenteditable-ref.html
 == spellcheck-contenteditable-nofocus.html spellcheck-contenteditable-disabled-ref.html
 == spellcheck-contenteditable-disabled.html spellcheck-contenteditable-disabled-ref.html
 == spellcheck-contenteditable-disabled-partial.html spellcheck-contenteditable-disabled-partial-ref.html
@@ -128,10 +128,10 @@ needs-focus == spellcheck-contenteditabl
 == spellcheck-contenteditable-property-dynamic.html spellcheck-contenteditable-disabled-ref.html
 == spellcheck-contenteditable-property-dynamic-inherit.html spellcheck-contenteditable-disabled-ref.html
 == spellcheck-contenteditable-attr-dynamic-override.html spellcheck-contenteditable-disabled-ref.html
 == spellcheck-contenteditable-attr-dynamic-override-inherit.html spellcheck-contenteditable-disabled-ref.html
 == spellcheck-contenteditable-property-dynamic-override.html spellcheck-contenteditable-disabled-ref.html
 == spellcheck-contenteditable-property-dynamic-override-inherit.html spellcheck-contenteditable-disabled-ref.html
 == 911201.html 911201-ref.html
 needs-focus == 969773.html 969773-ref.html
-fuzzy-if(skiaContent,1,220) fails-if(stylo) == 997805.html 997805-ref.html
-fuzzy-if(skiaContent,1,220) fails-if(stylo) == 1088158.html 1088158-ref.html
+fuzzy-if(skiaContent,1,220) fails-if(styloVsGecko) == 997805.html 997805-ref.html
+fuzzy-if(skiaContent,1,220) fails-if(styloVsGecko) == 1088158.html 1088158-ref.html
--- a/gfx/2d/DrawTargetSkia.cpp
+++ b/gfx/2d/DrawTargetSkia.cpp
@@ -799,36 +799,36 @@ DrawTargetSkia::Stroke(const Path *aPath
 
   if (!skiaPath->GetPath().isFinite()) {
     return;
   }
 
   mCanvas->drawPath(skiaPath->GetPath(), paint.mPaint);
 }
 
-static Float
+static Double
 DashPeriodLength(const StrokeOptions& aStrokeOptions)
 {
-  Float length = 0;
+  Double length = 0;
   for (size_t i = 0; i < aStrokeOptions.mDashLength; i++) {
     length += aStrokeOptions.mDashPattern[i];
   }
   if (aStrokeOptions.mDashLength & 1) {
     // "If an odd number of values is provided, then the list of values is
     // repeated to yield an even number of values."
     // Double the length.
     length += length;
   }
   return length;
 }
 
-static inline Float
-RoundDownToMultiple(Float aValue, Float aFactor)
+static inline Double
+RoundDownToMultiple(Double aValue, Double aFactor)
 {
-  return floorf(aValue / aFactor) * aFactor;
+  return floor(aValue / aFactor) * aFactor;
 }
 
 static Rect
 UserSpaceStrokeClip(const IntRect &aDeviceClip,
                     const Matrix &aTransform,
                     const StrokeOptions &aStrokeOptions)
 {
   Matrix inverse = aTransform;
@@ -842,34 +842,42 @@ UserSpaceStrokeClip(const IntRect &aDevi
 
 static Rect
 ShrinkClippedStrokedRect(const Rect &aStrokedRect, const IntRect &aDeviceClip,
                          const Matrix &aTransform,
                          const StrokeOptions &aStrokeOptions)
 {
   Rect userSpaceStrokeClip =
     UserSpaceStrokeClip(aDeviceClip, aTransform, aStrokeOptions);
-
-  Rect intersection = aStrokedRect.Intersect(userSpaceStrokeClip);
-  Float dashPeriodLength = DashPeriodLength(aStrokeOptions);
+  RectDouble strokedRectDouble(
+    aStrokedRect.x, aStrokedRect.y, aStrokedRect.width, aStrokedRect.height);
+  RectDouble intersection =
+    strokedRectDouble.Intersect(RectDouble(userSpaceStrokeClip.x,
+                                           userSpaceStrokeClip.y,
+                                           userSpaceStrokeClip.width,
+                                           userSpaceStrokeClip.height));
+  Double dashPeriodLength = DashPeriodLength(aStrokeOptions);
   if (intersection.IsEmpty() || dashPeriodLength == 0.0f) {
-    return intersection;
+    return Rect(
+      intersection.x, intersection.y, intersection.width, intersection.height);
   }
 
   // Reduce the rectangle side lengths in multiples of the dash period length
   // so that the visible dashes stay in the same place.
-  Margin insetBy = aStrokedRect - intersection;
+  MarginDouble insetBy = strokedRectDouble - intersection;
   insetBy.top = RoundDownToMultiple(insetBy.top, dashPeriodLength);
   insetBy.right = RoundDownToMultiple(insetBy.right, dashPeriodLength);
   insetBy.bottom = RoundDownToMultiple(insetBy.bottom, dashPeriodLength);
   insetBy.left = RoundDownToMultiple(insetBy.left, dashPeriodLength);
 
-  Rect shrunkRect = aStrokedRect;
-  shrunkRect.Deflate(insetBy);
-  return shrunkRect;
+  strokedRectDouble.Deflate(insetBy);
+  return Rect(strokedRectDouble.x,
+              strokedRectDouble.y,
+              strokedRectDouble.width,
+              strokedRectDouble.height);
 }
 
 void
 DrawTargetSkia::StrokeRect(const Rect &aRect,
                            const Pattern &aPattern,
                            const StrokeOptions &aStrokeOptions,
                            const DrawOptions &aOptions)
 {
--- a/gfx/2d/Rect.h
+++ b/gfx/2d/Rect.h
@@ -48,17 +48,17 @@ struct IntMarginTyped:
         return IntMarginTyped<UnknownUnits>(this->top, this->right,
                                             this->bottom, this->left);
     }
 };
 typedef IntMarginTyped<UnknownUnits> IntMargin;
 
 template<class units, class F = Float>
 struct MarginTyped:
-    public BaseMargin<F, MarginTyped<units> >,
+    public BaseMargin<F, MarginTyped<units, F> >,
     public units {
     static_assert(IsPixel<units>::value,
                   "'units' must be a coordinate system tag");
 
     typedef BaseMargin<F, MarginTyped<units, F> > Super;
 
     MarginTyped() : Super() {}
     MarginTyped(F aTop, F aRight, F aBottom, F aLeft) :
--- a/gfx/2d/Types.h
+++ b/gfx/2d/Types.h
@@ -11,16 +11,17 @@
 
 #include <stddef.h>
 #include <stdint.h>
 
 namespace mozilla {
 namespace gfx {
 
 typedef float Float;
+typedef double Double;
 
 enum class SurfaceType : int8_t {
   DATA, /* Data surface - bitmap in memory */
   D2D1_BITMAP, /* Surface wrapping a ID2D1Bitmap */
   D2D1_DRAWTARGET, /* Surface made from a D2D draw target */
   CAIRO, /* Surface wrapping a cairo surface */
   CAIRO_IMAGE, /* Data surface wrapping a cairo image surface */
   COREGRAPHICS_IMAGE, /* Surface wrapping a CoreGraphics Image */
--- a/gfx/layers/AnimationHelper.cpp
+++ b/gfx/layers/AnimationHelper.cpp
@@ -92,17 +92,17 @@ void
 CompositorAnimationStorage::SetAnimations(uint64_t aId, const AnimationArray& aValue)
 {
   MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
   AnimationArray* value = new AnimationArray(aValue);
   mAnimations.Put(aId, value);
 }
 
 static StyleAnimationValue
-SampleValue(float aPortion, const layers::Animation& aAnimation,
+SampleValue(double aPortion, const layers::Animation& aAnimation,
             const StyleAnimationValueCompositePair& aStart,
             const StyleAnimationValueCompositePair& aEnd,
             const StyleAnimationValue& aLastValue,
             uint64_t aCurrentIteration,
             const StyleAnimationValue& aUnderlyingValue)
 {
   NS_ASSERTION(aStart.mValue.IsNull() || aEnd.mValue.IsNull() ||
                aStart.mValue.GetUnit() == aEnd.mValue.GetUnit(),
--- a/gfx/layers/apz/test/reftest/reftest.list
+++ b/gfx/layers/apz/test/reftest/reftest.list
@@ -1,16 +1,16 @@
 # The following tests test the async positioning of the scrollbars.
 # Basic root-frame scrollbar with async scrolling
 fuzzy-if(Android,1,2) skip-if(!Android) pref(apz.allow_zooming,true) == async-scrollbar-1-v.html async-scrollbar-1-v-ref.html
 fuzzy-if(Android,4,5) skip-if(!Android) pref(apz.allow_zooming,true) == async-scrollbar-1-h.html async-scrollbar-1-h-ref.html
 fuzzy-if(Android,3,5) skip-if(!Android) pref(apz.allow_zooming,true) == async-scrollbar-1-vh.html async-scrollbar-1-vh-ref.html
-fuzzy-if(Android,1,2) skip-if(!Android) pref(apz.allow_zooming,true) fails-if(stylo) == async-scrollbar-1-v-rtl.html async-scrollbar-1-v-rtl-ref.html
+fuzzy-if(Android,1,2) skip-if(!Android) pref(apz.allow_zooming,true) fails-if(styloVsGecko) == async-scrollbar-1-v-rtl.html async-scrollbar-1-v-rtl-ref.html
 fuzzy-if(Android,4,5) skip-if(!Android) pref(apz.allow_zooming,true) == async-scrollbar-1-h-rtl.html async-scrollbar-1-h-rtl-ref.html
-fuzzy-if(Android,3,7) skip-if(!Android) pref(apz.allow_zooming,true) fails-if(stylo) == async-scrollbar-1-vh-rtl.html async-scrollbar-1-vh-rtl-ref.html
+fuzzy-if(Android,3,7) skip-if(!Android) pref(apz.allow_zooming,true) fails-if(styloVsGecko) == async-scrollbar-1-vh-rtl.html async-scrollbar-1-vh-rtl-ref.html
 
 # Different async zoom levels. Since the scrollthumb gets async-scaled in the
 # compositor, the border-radius ends of the scrollthumb are going to be a little
 # off, hence the fuzzy-if clauses.
 fuzzy-if(Android,54,18) skip-if(!Android) pref(apz.allow_zooming,true) == async-scrollbar-zoom-1.html async-scrollbar-zoom-1-ref.html
 fuzzy-if(Android,45,22) skip-if(!Android) pref(apz.allow_zooming,true) == async-scrollbar-zoom-2.html async-scrollbar-zoom-2-ref.html
 
 # Meta-viewport tag support
--- a/gfx/tests/reftest/reftest.list
+++ b/gfx/tests/reftest/reftest.list
@@ -1,9 +1,9 @@
 # 468496-1 will also detect bugs in video drivers.
 == 468496-1.html 468496-1-ref.html
-fuzzy(175,443) skip-if(stylo) == 611498-1.html 611498-ref.html
+fuzzy(175,443) skip-if(styloVsGecko) == 611498-1.html 611498-ref.html
 fuzzy-if(Android,8,1000) == 709477-1.html 709477-1-ref.html
 skip-if(!asyncPan) == 1086723.html 1086723-ref.html
 == 853889-1.html 853889-1-ref.html
 skip-if(Android) fuzzy-if(skiaContent,1,587) == 1143303-1.svg pass.svg
 fuzzy(100,30) == 1149923.html 1149923-ref.html # use fuzzy due to few distorted pixels caused by border-radius
 == 1131264-1.svg pass.svg
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -47,17 +47,16 @@
 
 #include "gfxPrefs.h"
 #include "gfxUserFontSet.h"
 #include "nsPresContext.h"
 #include "nsIContent.h"
 #include "nsIContentIterator.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/Event.h" // for Event::GetEventPopupControlState()
-#include "mozilla/dom/ShadowRoot.h"
 #include "mozilla/dom/PointerEvent.h"
 #include "nsIDocument.h"
 #include "nsAnimationManager.h"
 #include "nsNameSpaceManager.h"  // for Pref-related rule management (bugs 22963,20760,31816)
 #include "nsFrame.h"
 #include "FrameLayerBuilder.h"
 #include "nsViewManager.h"
 #include "nsView.h"
@@ -779,17 +778,16 @@ nsIPresShell::nsIPresShell()
 #ifdef DEBUG
     , mDrawEventTargetFrame(nullptr)
 #endif
     , mPaintCount(0)
     , mAutoWeakFrames(nullptr)
     , mCanvasBackgroundColor(NS_RGBA(0,0,0,0))
     , mSelectionFlags(0)
     , mRenderFlags(0)
-    , mStylesHaveChanged(false)
     , mDidInitialize(false)
     , mIsDestroying(false)
     , mIsReflowing(false)
     , mPaintingSuppressed(false)
     , mIsThemeSupportDisabled(false)
     , mIsActive(false)
     , mFrozen(false)
     , mIsFirstPaint(false)
@@ -1539,17 +1537,16 @@ PresShell::AddUserSheet(StyleSheet* aShe
 
   // Now iterate backwards, so that the order of userSheets will be the same as
   // the order of sheets from it in the style set.
   for (StyleSheet* sheet : Reversed(userSheets)) {
     mStyleSet->PrependStyleSheet(SheetType::User, sheet);
   }
 
   mStyleSet->EndUpdate();
-
   RestyleForCSSRuleChanges();
 }
 
 void
 PresShell::AddAgentSheet(StyleSheet* aSheet)
 {
   // Make sure this does what nsDocumentViewer::CreateStyleSet does
   // wrt ordering.
@@ -2530,18 +2527,19 @@ PresShell::EndUpdate(nsIDocument *aDocum
 {
 #ifdef DEBUG
   NS_PRECONDITION(0 != mUpdateCount, "too many EndUpdate's");
   --mUpdateCount;
 #endif
 
   if (aUpdateType & UPDATE_STYLE) {
     mStyleSet->EndUpdate();
-    if (mStylesHaveChanged || !mChangedScopeStyleRoots.IsEmpty())
+    if (mStyleSet->StyleSheetsHaveChanged()) {
       RestyleForCSSRuleChanges();
+    }
   }
 
   mFrameConstructor->EndUpdate();
 }
 
 void
 PresShell::RestoreRootScrollPosition()
 {
@@ -4541,143 +4539,95 @@ PresShell::ReconstructFrames()
   mFrameConstructor->ReconstructDocElementHierarchy();
   VERIFY_STYLE_TREE;
   mFrameConstructor->EndUpdate();
 }
 
 void
 nsIPresShell::RestyleForCSSRuleChanges()
 {
-  AutoTArray<RefPtr<mozilla::dom::Element>,1> scopeRoots;
-  mChangedScopeStyleRoots.SwapElements(scopeRoots);
-
-  if (mStylesHaveChanged) {
-    // If we need to restyle everything, no need to restyle individual
-    // scoped style roots.
-    scopeRoots.Clear();
-  }
-
-  mStylesHaveChanged = false;
-
   if (mIsDestroying) {
     // We don't want to mess with restyles at this point
     return;
   }
 
   mDocument->RebuildUserFontSet();
 
   if (mPresContext) {
     mPresContext->RebuildCounterStyles();
   }
 
-  Element* root = mDocument->GetRootElement();
   if (!mDidInitialize) {
     // Nothing to do here, since we have no frames yet
     return;
   }
 
-  if (!root) {
-    // No content to restyle
-    return;
-  }
-
-  RestyleManager* restyleManager = mPresContext->RestyleManager();
-
-  if (scopeRoots.IsEmpty()) {
-    // If scopeRoots is empty, we know that mStylesHaveChanged was true at
-    // the beginning of this function, and that we need to restyle the whole
-    // document.
-    restyleManager->PostRestyleEventForCSSRuleChanges(root,
-                                                      eRestyle_Subtree,
-                                                      nsChangeHint(0));
-  } else {
-    for (Element* scopeRoot : scopeRoots) {
-      restyleManager->PostRestyleEventForCSSRuleChanges(scopeRoot,
-                                                        eRestyle_Subtree,
-                                                        nsChangeHint(0));
-    }
-  }
-}
-
-void
-PresShell::RecordStyleSheetChange(StyleSheet* aStyleSheet)
+  mStyleSet->InvalidateStyleForCSSRuleChanges();
+}
+
+void
+PresShell::RecordStyleSheetChange(StyleSheet* aStyleSheet,
+                                  StyleSheet::ChangeType aChangeType)
 {
   // too bad we can't check that the update is UPDATE_STYLE
   NS_ASSERTION(mUpdateCount != 0, "must be in an update");
-
-  if (mStylesHaveChanged)
-    return;
-
-  // Tell Servo that the contents of style sheets have changed.
-  if (ServoStyleSet* set = mStyleSet->GetAsServo()) {
-    set->NoteStyleSheetsChanged();
-  }
-
-  if (aStyleSheet->IsGecko()) {
-    // XXXheycam ServoStyleSheets don't support <style scoped> yet.
-    Element* scopeElement = aStyleSheet->AsGecko()->GetScopeElement();
-    if (scopeElement) {
-      mChangedScopeStyleRoots.AppendElement(scopeElement);
-      return;
-    }
-  } else {
-    NS_WARNING("stylo: ServoStyleSheets don't support <style scoped>");
-  }
-
-  mStylesHaveChanged = true;
+  MOZ_ASSERT(aStyleSheet->IsServo() == mStyleSet->IsServo());
+
+  mStyleSet->RecordStyleSheetChange(aStyleSheet, aChangeType);
 }
 
 void
 PresShell::StyleSheetAdded(StyleSheet* aStyleSheet,
                            bool aDocumentSheet)
 {
   // We only care when enabled sheets are added
   NS_PRECONDITION(aStyleSheet, "Must have a style sheet!");
 
   if (aStyleSheet->IsApplicable() && aStyleSheet->HasRules()) {
-    RecordStyleSheetChange(aStyleSheet);
+    RecordStyleSheetChange(aStyleSheet, StyleSheet::ChangeType::Added);
   }
 }
 
 void
 PresShell::StyleSheetRemoved(StyleSheet* aStyleSheet,
                              bool aDocumentSheet)
 {
   // We only care when enabled sheets are removed
   NS_PRECONDITION(aStyleSheet, "Must have a style sheet!");
 
   if (aStyleSheet->IsApplicable() && aStyleSheet->HasRules()) {
-    RecordStyleSheetChange(aStyleSheet);
+    RecordStyleSheetChange(aStyleSheet, StyleSheet::ChangeType::Removed);
   }
 }
 
 void
 PresShell::StyleSheetApplicableStateChanged(StyleSheet* aStyleSheet)
 {
   if (aStyleSheet->HasRules()) {
-    RecordStyleSheetChange(aStyleSheet);
+    RecordStyleSheetChange(
+        aStyleSheet, StyleSheet::ChangeType::ApplicableStateChanged);
   }
 }
 
 void
 PresShell::StyleRuleChanged(StyleSheet* aStyleSheet)
 {
-  RecordStyleSheetChange(aStyleSheet);
+  RecordStyleSheetChange(aStyleSheet, StyleSheet::ChangeType::RuleChanged);
 }
 
 void
 PresShell::StyleRuleAdded(StyleSheet* aStyleSheet)
 {
-  RecordStyleSheetChange(aStyleSheet);
+  RecordStyleSheetChange(aStyleSheet, StyleSheet::ChangeType::RuleAdded);
 }
 
 void
 PresShell::StyleRuleRemoved(StyleSheet* aStyleSheet)
 {
-  RecordStyleSheetChange(aStyleSheet);
+  RecordStyleSheetChange(aStyleSheet, StyleSheet::ChangeType::RuleRemoved);
 }
 
 nsPlaceholderFrame*
 PresShell::GetPlaceholderFrameFor(nsIFrame* aFrame) const
 {
   return mFrameConstructor->GetPlaceholderFrameFor(aFrame);
 }
 
@@ -6347,17 +6297,17 @@ public:
 private:
   PresShell* mShell;
   uint32_t mFlags;
 };
 
 void
 PresShell::RecordShadowStyleChange(ShadowRoot* aShadowRoot)
 {
-  mChangedScopeStyleRoots.AppendElement(aShadowRoot->GetHost()->AsElement());
+  mStyleSet->RecordShadowStyleChange(aShadowRoot);
 }
 
 void
 PresShell::Paint(nsView*         aViewToPaint,
                  const nsRegion& aDirtyRegion,
                  uint32_t        aFlags)
 {
 #ifdef MOZ_GECKO_PROFILER
@@ -7473,17 +7423,22 @@ PresShell::HandleEvent(nsIFrame* aFrame,
     // capturing and retargeting the event because the captured frame will
     // be used instead below. Also keep using the root frame if we're dealing
     // with a window-level mouse exit event since we want to start sending
     // mouse out events at the root EventStateManager.
     if (!captureRetarget && !isWindowLevelMouseExit) {
       nsPoint eventPoint;
       uint32_t flags = 0;
       if (aEvent->mMessage == eTouchStart) {
-        flags |= INPUT_IGNORE_ROOT_SCROLL_FRAME;
+        if (gfxPrefs::APZAllowZooming()) {
+          // Setting this flag will skip the scrollbars on the root frame from
+          // participating in hit-testing, and we only want that to happen on
+          // zoomable platforms (for now).
+          flags |= INPUT_IGNORE_ROOT_SCROLL_FRAME;
+        }
         WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
         // if this is a continuing session, ensure that all these events are
         // in the same document by taking the target of the events already in
         // the capture list
         nsCOMPtr<nsIContent> anyTarget;
         if (touchEvent->mTouches.Length() > 1) {
           anyTarget = TouchManager::GetAnyCapturedTouchTarget();
         }
--- a/layout/base/PresShell.h
+++ b/layout/base/PresShell.h
@@ -518,17 +518,18 @@ protected:
 
 #ifdef DEBUG
   nsStyleSet* CloneStyleSet(nsStyleSet* aSet);
   bool VerifyIncrementalReflow();
   bool mInVerifyReflow;
   void ShowEventTargetDebug();
 #endif
 
-  void RecordStyleSheetChange(mozilla::StyleSheet* aStyleSheet);
+  void RecordStyleSheetChange(mozilla::StyleSheet* aStyleSheet,
+                              StyleSheet::ChangeType);
 
   void RemovePreferenceStyles();
 
   // methods for painting a range to an offscreen buffer
 
   // given a display list, clip the items within the list to
   // the range
   nsRect ClipListToRange(nsDisplayListBuilder *aBuilder,
--- a/layout/base/nsIPresShell.h
+++ b/layout/base/nsIPresShell.h
@@ -1857,21 +1857,16 @@ protected:
   int16_t                   mSelectionFlags;
 
   // Flags controlling how our document is rendered.  These persist
   // between paints and so are tied with retained layer pixels.
   // PresShell flushes retained layers when the rendering state
   // changes in a way that prevents us from being able to (usefully)
   // re-use old pixels.
   RenderFlags               mRenderFlags;
-
-  // Indicates that the whole document must be restyled.  Changes to scoped
-  // style sheets are recorded in mChangedScopeStyleRoots rather than here
-  // in mStylesHaveChanged.
-  bool                      mStylesHaveChanged : 1;
   bool                      mDidInitialize : 1;
   bool                      mIsDestroying : 1;
   bool                      mIsReflowing : 1;
 
   // For all documents we initially lock down painting.
   bool                      mPaintingSuppressed : 1;
 
   // Whether or not form controls should use nsITheme in this shell.
@@ -1901,25 +1896,16 @@ protected:
   bool mObservingLayoutFlushes: 1;
 
   // True if there are throttled animations that would be processed when
   // performing a flush with mFlushAnimations == true.
   bool mNeedThrottledAnimationFlush : 1;
 
   uint32_t                  mPresShellId;
 
-  // List of subtrees rooted at style scope roots that need to be restyled.
-  // When a change to a scoped style sheet is made, we add the style scope
-  // root to this array rather than setting mStylesHaveChanged = true, since
-  // we know we don't need to restyle the whole document.  However, if in the
-  // same update block we have already had other changes that require
-  // the whole document to be restyled (i.e., mStylesHaveChanged is already
-  // true), then we don't bother adding the scope root here.
-  AutoTArray<RefPtr<mozilla::dom::Element>,1> mChangedScopeStyleRoots;
-
   static nsIContent*        gKeyDownTarget;
 
   // Cached font inflation values. This is done to prevent changing of font
   // inflation until a page is reloaded.
   uint32_t mFontSizeInflationEmPerLine;
   uint32_t mFontSizeInflationMinTwips;
   uint32_t mFontSizeInflationLineThreshold;
   bool mFontSizeInflationForceEnabled;
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -2376,24 +2376,17 @@ nsPresContext::NotifyMissingFonts()
   if (mMissingFonts) {
     mMissingFonts->Flush();
   }
 }
 
 void
 nsPresContext::EnsureSafeToHandOutCSSRules()
 {
-  nsStyleSet* styleSet = mShell->StyleSet()->GetAsGecko();
-  if (!styleSet) {
-    // ServoStyleSets do not need to handle copy-on-write style sheet
-    // innards like with CSSStyleSheets.
-    return;
-  }
-
-  if (!styleSet->EnsureUniqueInnerOnCSSSheets()) {
+  if (!mShell->StyleSet()->EnsureUniqueInnerOnCSSSheets()) {
     // Nothing to do.
     return;
   }
 
   RebuildAllStyleData(nsChangeHint(0), eRestyle_Subtree);
 }
 
 void
--- a/layout/reftests/backgrounds/reftest.list
+++ b/layout/reftests/backgrounds/reftest.list
@@ -121,17 +121,17 @@ random-if(OSX==1010) == background-size-
 random-if(OSX==1010) == background-size-monster-px.html background-size-monster-ref.html # bug 1129300
 random-if(OSX==1010) == background-size-monster-rem.html background-size-monster-ref.html # bug 1129300
 
 # There seems to be a pixel-snapping problem here, where the repeated background
 # image isn't being snapped at its boundaries.  Note that the boundaries within
 # the image aren't the issue, because they're being obscured to avoid sampling
 # algorithm dependencies (at least assuming the sampling algorithm in use
 # doesn't sample too far astray from the boundaries).
-fails-if(!stylo) == background-size-zoom-repeat.html background-size-zoom-repeat-ref.html
+fails-if(!styloVsGecko) == background-size-zoom-repeat.html background-size-zoom-repeat-ref.html
 
 # -moz-default-background-color and -moz-default-color (bug 591341)
 == background-moz-default-background-color.html background-moz-default-background-color-ref.html
 
 == fixed-bg-with-transform-outside-viewport-1.html fixed-bg-with-transform-outside-viewport-ref.html
 fuzzy(2,83) == fixed-bg-border-radius.html fixed-bg-border-radius-ref.html
 
 HTTP == root-background-1.html root-background-ref.html
@@ -176,12 +176,12 @@ fuzzy-if(skiaContent,1,8) == background-
 
 fuzzy(30,474) fuzzy-if(skiaContent,31,474) == background-tiling-zoom-1.html background-tiling-zoom-1-ref.html
 
 skip-if(!cocoaWidget) == background-repeat-resampling.html background-repeat-resampling-ref.html
 
 fuzzy-if(winWidget,102,2032) fuzzy-if(skiaContent,102,2811) == background-clip-text-1a.html background-clip-text-1-ref.html
 fuzzy-if(winWidget,102,2032) fuzzy-if(skiaContent,102,2811) == background-clip-text-1b.html background-clip-text-1-ref.html
 fuzzy-if(winWidget,102,2032) fuzzy-if(skiaContent,102,2811) == background-clip-text-1c.html background-clip-text-1-ref.html
-fuzzy-if(winWidget,102,2032) fuzzy-if(skiaContent,102,2811) fails-if(stylo) == background-clip-text-1d.html background-clip-text-1-ref.html
+fuzzy-if(winWidget,102,2032) fuzzy-if(skiaContent,102,2811) == background-clip-text-1d.html background-clip-text-1-ref.html
 fuzzy-if(winWidget,102,2032) fuzzy-if(skiaContent,102,2811) == background-clip-text-1e.html background-clip-text-1-ref.html
 
 == background-clip-text-2.html background-clip-text-2-ref.html
--- a/layout/reftests/backgrounds/vector/empty/reftest.list
+++ b/layout/reftests/backgrounds/vector/empty/reftest.list
@@ -1,18 +1,18 @@
 == tall--contain--height.html ref-tall-empty.html
 == tall--contain--width.html ref-tall-empty.html
 == wide--contain--height.html ref-wide-empty.html
 == wide--contain--width.html ref-wide-empty.html
 
 # These tests fail because of integer overflow; see bug 894555.
-fails-if(!stylo) == tall--cover--height.html ref-tall-lime.html
-fails-if(!stylo) == tall--cover--width.html ref-tall-lime.html
-fails-if(!stylo) == wide--cover--height.html ref-wide-lime.html
-fails-if(!stylo) == wide--cover--width.html ref-wide-lime.html
+fails-if(!styloVsGecko) == tall--cover--height.html ref-tall-lime.html
+fails-if(!styloVsGecko) == tall--cover--width.html ref-tall-lime.html
+fails-if(!styloVsGecko) == wide--cover--height.html ref-wide-lime.html
+fails-if(!styloVsGecko) == wide--cover--width.html ref-wide-lime.html
 
 == zero-height-ratio-contain.html ref-tall-empty.html
 == zero-height-ratio-cover.html ref-tall-empty.html
 == zero-height-ratio-auto-auto.html ref-tall-empty.html
 == zero-height-ratio-auto-5px.html ref-tall-empty.html
 == zero-height-ratio-5px-auto.html ref-tall-empty.html
 == zero-width-ratio-contain.html ref-tall-empty.html
 == zero-width-ratio-cover.html ref-tall-empty.html
--- a/layout/reftests/bidi/reftest.list
+++ b/layout/reftests/bidi/reftest.list
@@ -71,17 +71,17 @@ fuzzy-if(/^Windows\x20NT\x206\.1/.test(h
 == 258928-1.html 258928-1-ref.html
 == 263359-1.html 263359-1-ref.html
 == 263359-1a.html 263359-1-ref.html
 != 263359-1b.html 263359-1-ref.html
 == 263359-2.html 263359-2-ref.html
 == 263359-3.html 263359-3-ref.html
 == 263359-4.html 263359-4-ref.html
 random-if(winWidget) fuzzy-if(skiaContent,1,1700) == 267459-1.html 267459-1-ref.html # depends on windows version, see bug 590101
-fuzzy-if(skiaContent,1,1100) fails-if(stylo) == 267459-2.html 267459-2-ref.html
+fuzzy-if(skiaContent,1,1100) fails-if(styloVsGecko) == 267459-2.html 267459-2-ref.html
 == 299065-1.html 299065-1-ref.html
 random-if(winWidget) == 305643-1.html 305643-1-ref.html # depends on windows version, see bug 590101
 == 332655-1.html 332655-1-ref.html
 == 332655-2.html 332655-2-ref.html
 == 381279-1.html 381279-1-ref.html
 == 386339.html 386339-ref.html
 == 409375.html 409375-ref.html
 == 413542-1.html 413542-1-ref.html
@@ -111,19 +111,19 @@ fails-if(webrender) == 413928-1.html 413
 == 612843-1.html 612843-1-ref.html
 == 613149-1a.html 613149-1-ref.html
 == 613149-1b.html 613149-1-ref.html
 fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,36,2) == 613149-2a.html 613149-2-ref.html
 fuzzy-if(Android,24,1) fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,36,2) == 613149-2b.html 613149-2-ref.html
 == 613157-1.html 613157-1-ref.html
 fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,255,6) == 613157-2.html 613157-2-ref.html
 == 662288-1.html 662288-1-ref.html
-fails-if(stylo) == 670226-1.html 670226-1-ref.html
+fails-if(styloVsGecko) == 670226-1.html 670226-1-ref.html
 == 676245-1.html 676245-1-ref.html
-fuzzy-if(skiaContent,1,3) fails-if(stylo) == 698291-1.html 698291-1-ref.html
+fuzzy-if(skiaContent,1,3) fails-if(styloVsGecko) == 698291-1.html 698291-1-ref.html
 == 698706-1.html 698706-1-ref.html
 == 704837-1.html 704837-1-ref.html
 == 712600-1.html 712600-1-ref.html
 == 712600-2.html 712600-2-ref.html
 == 712600-2-dyn.html 712600-2-ref.html
 == 712600-3.html 712600-3-ref.html
 == 718236-1.html 718236-1-ref.html
 == 718236-2.html 718236-2-ref.html
@@ -164,12 +164,12 @@ fuzzy-if(Android,254,557) == brackets-2a
 == brackets-2b-ltr.html brackets-2b-ltr-ref.html
 == brackets-2b-rtl.html brackets-2b-rtl-ref.html
 == brackets-2c-ltr.html brackets-2c-ltr-ref.html
 fuzzy-if(Android,254,231) == brackets-2c-rtl.html brackets-2c-rtl-ref.html
 == brackets-3a-ltr.html brackets-3a-ltr-ref.html
 == brackets-3a-rtl.html brackets-3a-rtl-ref.html
 == brackets-3b-ltr.html brackets-3b-ltr-ref.html
 == brackets-3b-rtl.html brackets-3b-rtl-ref.html
-fails-if(stylo) == 1217833-1.html 1217833-1-ref.html
-fails-if(stylo) == 1217833-2.html 1217833-2-ref.html
+fails-if(styloVsGecko) == 1217833-1.html 1217833-1-ref.html
+fails-if(styloVsGecko) == 1217833-2.html 1217833-2-ref.html
 == 1231175-1.html 1231175-1-ref.html
 == 1366623-1.html 1366623-1-ref.html
--- a/layout/reftests/border-dotted/reftest.list
+++ b/layout/reftests/border-dotted/reftest.list
@@ -4,10 +4,10 @@
 # so difference less than 80 is ignorable.
 fuzzy(80,1500) == border-dotted-interaction.html masked.html
 fuzzy(80,1500) == border-dotted-no-radius.html masked.html
 fuzzy(80,1500) == border-dotted-radius.html masked.html
 fuzzy(80,1500) == border-dashed-no-radius.html masked.html
 fuzzy(80,1500) == border-dashed-radius.html masked.html
 fuzzy(80,1500) == border-mixed.html masked.html
 fuzzy(80,1500) == border-dashed-non-integer.html masked.html
-fuzzy(80,1500) fails-if(stylo) == border-dashed-radius-zoom.html masked-zoom.html
+fuzzy(80,1500) fails-if(styloVsGecko) == border-dashed-radius-zoom.html masked-zoom.html
 fuzzy(80,1500) == border-dotted-radius-zero.html masked-small.html
--- a/layout/reftests/border-image/reftest.list
+++ b/layout/reftests/border-image/reftest.list
@@ -25,17 +25,17 @@ fails-if(Android) fails-if(usesRepeatRes
 == center-scaling-4l.html center-scaling-4l-ref.html
 == center-scaling-4tb.html center-scaling-4tb-ref.html
 == center-scaling-4lr.html center-scaling-4lr-ref.html
 == side-scaling-1h.html side-scaling-1h-ref.html
 == side-scaling-1v.html side-scaling-1v-ref.html
 == border-image-width-1a.html border-image-width-1-ref.html
 == border-image-width-1b.html border-image-width-1-ref.html
 == border-image-width-1c.html border-image-width-1-ref.html
-skip-if(stylo) == border-image-width-large.html border-image-width-large-ref.html
+skip-if(styloVsGecko) == border-image-width-large.html border-image-width-large-ref.html
 == border-image-outset-1a.html border-image-outset-1-ref.html
 == border-image-outset-1b.html border-image-outset-1-ref.html
 == border-image-outset-1c.html border-image-outset-1-ref.html
 == border-image-nofill-1.html border-image-nofill-1-ref.html
 == border-image-outset-resize-1.html border-image-outset-resize-1-ref.html
 fuzzy-if(asyncPan&&!layersGPUAccelerated,140,514) == border-image-outset-move-1.html border-image-outset-move-1-ref.html
 == border-image-style-none.html border-image-style-none-ref.html
 == border-image-style-none-length.html border-image-style-none-length-ref.html
--- a/layout/reftests/border-radius/reftest.list
+++ b/layout/reftests/border-radius/reftest.list
@@ -32,17 +32,17 @@ fuzzy-if(gtkWidget,23,5) fuzzy-if(winWid
 fuzzy-if(gtkWidget,3,10) fuzzy-if(winWidget&&!d2d,3,10) fuzzy-if(d2d,15,32) fuzzy-if(Android,3,15) fuzzy-if(skiaContent,18,90) == corner-3.html corner-3-ref.svg
 fuzzy-if(skiaContent,12,83) == corner-4.html corner-4-ref.svg
 
 # Test that radii too long are reduced
 == border-reduce-height.html border-reduce-height-ref.html
 skip-if(!webrender) pref(layers.advanced.border-layers,1) == border-reduce-height.html border-reduce-height-ref.html
 
 # Tests for border clipping
-fails-if(!stylo) == clipping-1.html clipping-1-ref.html # background color should completely fill box; bug 466572
+fails-if(!styloVsGecko) == clipping-1.html clipping-1-ref.html # background color should completely fill box; bug 466572
 != clipping-2.html about:blank # background color clipped to inner/outer border, can't get
 # great tests for this due to antialiasing problems described in bug 466572
 fuzzy-if(skiaContent,17,62) == clipping-3.html clipping-3-ref.xhtml # edge of border-radius clips an underlying object's background
 
 # Tests for clipping the contents of replaced elements and overflow!=visible
 != clipping-4-ref.html clipping-4-notref.html
 fuzzy-if(true,1,20) fuzzy-if(d2d,64,196) fuzzy-if(cocoaWidget,1,180) fuzzy-if(Android,140,237) == clipping-4-canvas.html clipping-4-ref.html # bug 732535
 fuzzy-if(Android,5,54) fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),1,10) fuzzy-if(skiaContent,1,172) == clipping-4-image.html clipping-4-ref.html
--- a/layout/reftests/box-ordinal/reftest.list
+++ b/layout/reftests/box-ordinal/reftest.list
@@ -1,7 +1,7 @@
 == box-ordinal-with-out-of-flow-1.html box-ordinal-with-out-of-flow-1-ref.html
 == dynamic-1-remove-to-none-grouped.xul dynamic-1-ref.xul
 == dynamic-1-add-to-one-grouped.xul dynamic-1-ref.xul
 == dynamic-1-remove-to-one-grouped-1.xul dynamic-1-ref.xul
-fails-if(!stylo) == dynamic-1-remove-to-one-grouped-2.xul dynamic-1-ref.xul # bug 575500
+fails-if(!styloVsGecko) == dynamic-1-remove-to-one-grouped-2.xul dynamic-1-ref.xul # bug 575500
 == dynamic-1-add-to-two-grouped-1.xul dynamic-1-ref.xul
 == dynamic-1-add-to-two-grouped-2.xul dynamic-1-ref.xul
--- a/layout/reftests/box-shadow/reftest.list
+++ b/layout/reftests/box-shadow/reftest.list
@@ -38,10 +38,10 @@ fuzzy(13,9445) fuzzy-if(d2d,13,10926) fu
 == overflow-not-scrollable-1.html overflow-not-scrollable-1-ref2.html
 == overflow-not-scrollable-2.html overflow-not-scrollable-2-ref.html
 fuzzy-if(webrender,1,655) == 611574-1.html 611574-1-ref.html
 fuzzy-if(webrender,4,144) == 611574-2.html 611574-2-ref.html
 fuzzy-if(winWidget,5,30) fuzzy-if(skiaContent,16,10) == fieldset.html fieldset-ref.html # minor anti-aliasing problem on Windows
 fuzzy-if(winWidget,5,30) fuzzy-if(skiaContent,16,10) == fieldset-inset.html fieldset-inset-ref.html # minor anti-aliasing problem on Windows
 == 1178575.html 1178575-ref.html
 == 1178575-2.html 1178575-2-ref.html
-fuzzy(159,2) fails-if(!dwrite&&!stylo) == 1212823-1.html 1212823-1-ref.html
+fuzzy(159,2) fails-if(!dwrite&&!styloVsGecko) == 1212823-1.html 1212823-1-ref.html
 == boxshadow-large-offset.html boxshadow-large-offset-ref.html
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -12,17 +12,17 @@
 == 9458-width-2a.html 9458-width-2-ref.html
 == 9458-width-2b.html 9458-width-2-ref.html
 == 9458-zorder-1.html 9458-zorder-ref.html
 == 9458-zorder-2.html 9458-zorder-ref.html
 == 9458-zorder-3.html 9458-zorder-ref-inline.html
 == 9458-zorder-4.html 9458-zorder-ref-inline-block.html
 == 9458-zorder-5.html 9458-zorder-ref-inline-block.html
 == 10036-1.html 10036-1-ref.html
-skip-if(!cocoaWidget) fails-if(stylo) HTTP(..) == 10209-1.html 10209-ref.html # Bug 667079
+skip-if(!cocoaWidget) fails-if(styloVsGecko) HTTP(..) == 10209-1.html 10209-ref.html # Bug 667079
 HTTP(..) == 10209-2.html 10209-ref.html
 asserts(2) skip-if(!cocoaWidget) HTTP(..) == 10209-3.html 10209-3-ref.html # Assertions: bug 666606, skip because of bug 667079
 == 18217-basic-1.html 18217-basic-1-ref.html
 == 18217-basic-2a.html 18217-basic-2-ref.html
 == 18217-basic-2b.html 18217-basic-2-ref.html
 == 18217-valign-1.html 18217-valign-1-ref.html
 == 18217-height-1.html 18217-height-1-ref.html
 == 18217-height-2.html 18217-height-2-ref.html
@@ -30,18 +30,18 @@ asserts(2) skip-if(!cocoaWidget) HTTP(..
 == 18217-width-1b.html 18217-width-1-ref.html
 == 18217-width-2a.html 18217-width-2-ref.html
 == 18217-width-2b.html 18217-width-2-ref.html
 == 18217-zorder-1.html 18217-zorder-ref.html
 == 18217-zorder-2.html 18217-zorder-ref.html
 == 18217-zorder-3.html 18217-zorder-ref-inline.html
 == 18217-zorder-4.html 18217-zorder-ref-inline-table.html
 == 18217-zorder-5.html 18217-zorder-ref-inline-table.html
-fails-if(stylo) == 23604-1.html 23604-1-ref.html
-fails-if(stylo) == 23604-2.html 23604-2-ref.html
+fails-if(styloVsGecko) == 23604-1.html 23604-1-ref.html
+fails-if(styloVsGecko) == 23604-2.html 23604-2-ref.html
 != 24998-1.html 24998-1-ref.html
 == 25888-1l.html 25888-1l-ref.html
 != 25888-1l.html 25888-1l-notref.html
 == 25888-1r.html 25888-1r-ref.html
 != 25888-1r.html 25888-1r-notref.html
 == 25888-2l.html 25888-2l-ref.html
 == 25888-2r.html 25888-2r-ref.html
 == 25888-3l.html 25888-3l-ref.html
@@ -77,32 +77,32 @@ fuzzy-if(gtkWidget,6,26200) == 28811-2b.
 == 50630-4.html 50630-4-ref2.html
 == 50630-5.html 50630-5-ref.html
 == 67752-1.html 67752-1-ref.html
 == 67752-2.html 67752-2-ref.html
 == 68061-1.xml 68061-1-ref.xml
 == 68061-2.xml 68061-2-ref.xml
 == 76331-1.html 76331-1-ref.html
 == 81947-1.html 81947-ref.html
-fails-if(stylo) == 82711-1.html 82711-1-ref.html
-fails-if(stylo) == 82711-2.html 82711-2-ref.html
-fails-if(stylo) == 82711-3.html 82711-3-ref.html
-fails-if(stylo) != 82711-1-ref.html 82711-2-ref.html
-fails-if(stylo) != 82711-1-ref.html 82711-3-ref.html
-fails-if(stylo) != 82711-2-ref.html 82711-3-ref.html
+fails-if(styloVsGecko) == 82711-1.html 82711-1-ref.html
+fails-if(styloVsGecko) == 82711-2.html 82711-2-ref.html
+fails-if(styloVsGecko) == 82711-3.html 82711-3-ref.html
+fails-if(styloVsGecko) != 82711-1-ref.html 82711-2-ref.html
+fails-if(styloVsGecko) != 82711-1-ref.html 82711-3-ref.html
+fails-if(styloVsGecko) != 82711-2-ref.html 82711-3-ref.html
 fuzzy-if(Android,4,1) == 84400-1.html 84400-1-ref.html
 fuzzy-if(skiaContent,2,13) == 84400-2.html 84400-2-ref.html
 == 97777-1.html 97777-1-ref.html
 == 97777-2.html 97777-2-ref.html
 == 98223-1.html 98223-1-ref.html
 == 98223-2.html 98223-2-ref.html
-fails-if(stylo) == 99850-1a.html 99850-1-ref.html
+fails-if(styloVsGecko) == 99850-1a.html 99850-1-ref.html
 random == 99850-1b.html 99850-1-ref.html # bug 471629
-fails-if(stylo) == 99850-1c.html 99850-1-ref.html
-fails-if(stylo) == 99850-1d.html 99850-1-ref.html
+fails-if(styloVsGecko) == 99850-1c.html 99850-1-ref.html
+fails-if(styloVsGecko) == 99850-1d.html 99850-1-ref.html
 == 105030-1.html 105030-1-ref.html
 == 109735-1.html 109735-1-ref.html
 == 116882-1.html 116882-1-ref.html
 == 120834-1a.html 120834-1-ref.html
 == 120834-2a.html 120834-2-ref.html
 == 120834-2b.html 120834-2-ref.html
 == 120834-2c.html 120834-2-ref.html
 == 120834-2d.html 120834-2-ref.html
@@ -232,24 +232,24 @@ fuzzy-if(skiaContent,1,4) == 220165-1.sv
 == 234686-12.html 234686-ref.html
 == 234686-13.html 234686-ref.html
 == 234686-14.html 234686-ref.html
 == 234686-15.html 234686-ref.html
 == 234686-16.html 234686-ref.html
 == 234686-17.html 234686-ref.html
 == 234686-18.html 234686-ref.html
 == 234686-19.html 234686-ref.html
-fails-if(stylo) == 234964-1.html 234964-1-ref.html
+fails-if(styloVsGecko) == 234964-1.html 234964-1-ref.html
 == 234964-2.html 234964-2-ref.html
 == 235593-1.html 235593-1-ref.html
 fuzzy-if(skiaContent,4,2) == 236539-1.html 236539-1-ref.html
 == 240029-1.html 240029-1-ref.html
 == 240470-1.html 240470-1-ref.html
-fails-if(stylo) == 240933-1.html 240933-1-ref.html
-skip-if(Android) fails-if(stylo) == 240933-2.html 240933-2-ref.html
+fails-if(styloVsGecko) == 240933-1.html 240933-1-ref.html
+skip-if(Android) fails-if(styloVsGecko) == 240933-2.html 240933-2-ref.html
 == 243266-1.html 243266-1-ref.html
 == 243302-1.html 243302-1-ref.html
 skip-if(Android&&asyncPan) == 243519-1.html 243519-1-ref.html
 == 243519-2.html 243519-2-ref.html
 == 243519-3.html 243519-3-ref.html
 == 243519-4a.html 243519-4-ref.html
 == 243519-4b.html 243519-4-ref.html
 == 243519-4c.html 243519-4-ref.html
@@ -299,36 +299,36 @@ fuzzy-if(Android,3,50) fuzzy-if(skiaCont
 == 278266-1b.html 278266-1-ref.html
 == 280708-1a.html 280708-1-ref.html
 == 280708-1b.html 280708-1-ref.html
 == 281241-1.html 281241-1-ref.html
 == 281241-2.xhtml 281241-1-ref.html
 == 283686-1.html about:blank
 == 283686-2.html 283686-2-ref.html
 == 283686-3.html about:blank
-fails-if(stylo) == 289384-1.xhtml 289384-ref.xhtml
-random-if(d2d) fuzzy-if(Android,8,1439) skip-if(stylo) HTTP == 289480.html#top 289480-ref.html # basically-verbatim acid2 test, HTTP for a 404 page -- bug 578114 for the d2d failures, bug 1354406
+fails-if(styloVsGecko) == 289384-1.xhtml 289384-ref.xhtml
+random-if(d2d) fuzzy-if(Android,8,1439) skip-if(styloVsGecko) HTTP == 289480.html#top 289480-ref.html # basically-verbatim acid2 test, HTTP for a 404 page -- bug 578114 for the d2d failures, bug 1354406
 == 290129-1.html 290129-1-ref.html
-fails-if(stylo) == 291078-1.html 291078-1-ref.html
+fails-if(styloVsGecko) == 291078-1.html 291078-1-ref.html
 == 291078-2.html 291078-2-ref.html
 == 291262-1.html 291262-1-ref.html
 == 294306-1.html 294306-1a-ref.html
 != 294306-1.html 294306-1b-ref.html
 == 296361-1.html 296361-ref.html
 == 296904-1.html 296904-1-ref.html
 == 299136-1.html 299136-1-ref.html
 == 299837-1.html 299837-1-ref.html
 == 299837-2.xul 299837-2-ref.xul
 random-if(d2d) == 299837-3.xul 299837-3-ref.xul # bug 587631
-fails-if(stylo) == 300691-1a.html 300691-1-ref.html
-fails-if(stylo) == 300691-1b.html 300691-1-ref.html
-fails-if(stylo) == 300691-1c.html 300691-1-ref.html
-fails-if(stylo) == 300691-1d.html 300691-1-ref.html
-fails-if(stylo) == 300691-1e.html 300691-1-ref.html
-fails-if(stylo) == 300691-1f.html 300691-1-ref.html
+fails-if(styloVsGecko) == 300691-1a.html 300691-1-ref.html
+fails-if(styloVsGecko) == 300691-1b.html 300691-1-ref.html
+fails-if(styloVsGecko) == 300691-1c.html 300691-1-ref.html
+fails-if(styloVsGecko) == 300691-1d.html 300691-1-ref.html
+fails-if(styloVsGecko) == 300691-1e.html 300691-1-ref.html
+fails-if(styloVsGecko) == 300691-1f.html 300691-1-ref.html
 == 301726-1.html 301726-1-ref.html
 fails-if(Android) != 301726-2.html 301726-2-ref.html
 == 302379.html 302379-ref.html
 == 306630-1.html 306630-1-ref.html
 == 306660-1.html 306660-1-ref.html
 == 306660-2.html 306660-2-ref.html
 == 306660-3.html 306660-3-ref.html
 == 307076-1.html 307076-1-ref.html
@@ -461,17 +461,17 @@ fuzzy-if(skiaContent,2,3) == 339289-1.ht
 == 345267-1d.html 345267-1-ref.html
 != 345563-sub.xhtml 345563-sup.xhtml
 fuzzy-if(skiaContent,4,2) == 346774-1a.html 346774-1-ref.html
 fuzzy-if(skiaContent,4,2) == 346774-1b.html 346774-1-ref.html
 fuzzy-if(skiaContent,4,2) == 346774-1c.html 346774-1-ref.html
 == 347348-1.xhtml 347348-1-ref.xhtml
 == 347496-1.xhtml 347496-1-ref.xhtml
 == 347912-1.html 347912-1-ref.html
-fails-if(stylo) == 348049-1.xhtml 348049-1-ref.xhtml
+fails-if(styloVsGecko) == 348049-1.xhtml 348049-1-ref.xhtml
 == 348516-1.html 348516-1-ref.html
 == 348516-2.html 348516-2-ref.html
 != 348516-2.html 348516-2-notref.html
 != 348516-3.html 348516-3-notref.html
 == 348597-1.html 348597-ref.html
 == 348809-1a.html 348809-1-ref.html
 == 348809-1b.html 348809-1-ref.html
 == 348809-1c.html 348809-1-ref.html
@@ -545,17 +545,17 @@ fuzzy-if(skiaContent,2,4) == 362594-2c.h
 == 363247-1.html 363247-1-ref.html
 == 363329-1.html 363329-1-ref.html
 == 363329-2.html 363329-2-ref.html
 == 363370-1.html 363370-1-ref.html
 == 363402-1.html 363402-1-ref.html
 == 363637-1.html 363637-1-ref.html
 skip-if(Android) == 363706-1.html 363706-1-ref.html
 != 363706-1.html about:blank
-fails-if(stylo) == 363728-1.html 363728-1-ref.html
+fails-if(styloVsGecko) == 363728-1.html 363728-1-ref.html
 == 363728-2.html 363728-2-ref.html
 fuzzy-if(skiaContent||Android,4,11) == 363858-1.html 363858-1-ref.html
 == 363858-2.html 363858-2-ref.html
 == 363858-3.html 363858-3-ref.html
 == 363858-4.html 363858-4-ref.html
 fuzzy-if(OSX,45,2) fuzzy-if(winWidget,114,1) == 363858-5a.html 363858-5-ref.html
 == 363858-5b.html 363858-5-ref.html
 fuzzy-if(OSX,45,2) fuzzy-if(winWidget,114,1) == 363858-6a.html 363858-6-ref.html
@@ -598,17 +598,17 @@ fails-if(Android&&!asyncPan) != 367247-l
 == 367612-1e.html 367612-1-ref.html
 == 367612-1f.html 367612-1-ref.html
 != 367612-1g.html 367612-1-ref.html
 fuzzy-if(winWidget||gtkWidget,32,34) fuzzy-if(skiaContent,1,28) == 368020-1.html 368020-1-ref.html
 == 368020-2.html 368020-2-ref.html
 == 368020-3.html 368020-3-ref.html
 pref(layout.css.box-decoration-break.enabled,true) == 368020-5.html 368020-5-ref.html
 == 368155-1.xhtml 368155-1-ref.xhtml
-asserts(4) asserts-if(stylo,8) == 368155-negative-margins-1.html 368155-negative-margins-1-ref.html # bug 387205 / bug 457397
+asserts(4) asserts-if(styloVsGecko,8) == 368155-negative-margins-1.html 368155-negative-margins-1-ref.html # bug 387205 / bug 457397
 # we can't test this because there's antialiasing involved, and our comparison
 # is too exact
 # == 368247-1.html 368247-1-ref.html
 == 368247-2.html 368247-2-ref.html
 == 368504-1.html 368504-1-ref.html
 == 368504-2.html 368504-2-ref.html
 == 368504-3a.html 368504-3-ref.html
 == 368504-3b.html 368504-3-ref.html
@@ -656,24 +656,24 @@ fails-if(Android&&!asyncPan) == 371561-1
 == 372768-1.html 372768-1-ref.html
 == 373295-1.html 373295-1-ref.html
 == 373298-1.html 373298-1-ref.html
 fails-if(Android) == 373381-1.html 373381-1-ref.html
 fails-if(Android) fuzzy-if(skiaContent&&!Android,2,40) == 373381-2.html 373381-2-ref.html
 fails-if(Android) random-if(d2d) == 373381-3.html 373381-3-ref.html
 fails-if(Android) == 373381-4.html 373381-4-ref.html
 == 373383-1.html 373383-1-ref.html
-fails-if(stylo) == 373433-1.html 373433-1-ref.html
+fails-if(styloVsGecko) == 373433-1.html 373433-1-ref.html
 == 373533-1.xhtml about:blank
 == 373533-2.xhtml about:blank
 == 373533-3.xhtml about:blank
 == 374038-1.xul 374038-1-ref.xul
 == 374038-2.xul 374038-2-ref.xul
 random-if(d2d) == 374719-1.xul 374719-1-ref.xul
-fails-if(!stylo) == 374927-1.html 374927-1-ref.html # Was broken by patch for bug 368600; fails until bug 400776 is fixed
+fails-if(!styloVsGecko) == 374927-1.html 374927-1-ref.html # Was broken by patch for bug 368600; fails until bug 400776 is fixed
 == 375508-1.html 375508-1-ref.html
 == 375716-1.html 375716-1-ref.html
 == 375827-1.html 375827-1-ref.html
 == 376375-1.html 376375-1-ref.html
 == 376484-1.html 376484-1-ref.html
 == 376532-1.html 376532-1-ref.html
 fails-if(Android) != 376532-2.html 376532-2-ref.html
 fails-if(Android) != 376532-3.html 376532-3-ref.html
@@ -728,26 +728,26 @@ fuzzy-if(skiaContent,2,5) == 381507-1.ht
 == 384762-1.html about:blank
 == 384876-1.html 384876-1-ref.html
 == 385533-1.html about:blank # assertion test
 HTTP(..) == 385569-1a.html 385569-1-ref.html
 HTTP(..) == 385569-1b.html 385569-1-ref.html
 == 385607-1.html 385607-1-ref.html
 == 385823-1.html 385823-1-ref.html
 == 385823-2a.html 385823-2-ref.html
-fails-if(!stylo) == 385823-2b.html 385823-2-ref.html
+fails-if(!styloVsGecko) == 385823-2b.html 385823-2-ref.html
 == 385823-2c.html 385823-2-ref.html
-fuzzy-if(skiaContent,2,11) fails-if(stylo) == 385870-1.html 385870-1-ref.html
+fuzzy-if(skiaContent,2,11) fails-if(styloVsGecko) == 385870-1.html 385870-1-ref.html
 fuzzy-if(skiaContent,2,3) == 385870-2.html 385870-2-ref.html
 == 386014-1a.html 386014-1-ref.html
 == 386014-1b.html 386014-1-ref.html
 == 386014-1c.html 386014-1-ref.html
 == 386065-1.html 386065-1-ref.html
 == 386065-2.html about:blank
-test-pref(layout.float-fragments-inside-column.enabled,false) fails-if(!stylo) == 386147-1.html 386147-1-ref.html
+test-pref(layout.float-fragments-inside-column.enabled,false) fails-if(!styloVsGecko) == 386147-1.html 386147-1-ref.html
 test-pref(layout.float-fragments-inside-column.enabled,true) == 386147-1.html 386147-1-ref.html
 == 386310-1a.html 386310-1-ref.html
 == 386310-1b.html 386310-1-ref.html
 == 386310-1c.html 386310-1-ref.html
 == 386310-1d.html 386310-1-ref.html
 == 386401-1.html 386401-1-ref.html
 == 386401-2.html 386401-2-ref.html
 == 386401-3.html 386401-3-ref.html
@@ -755,17 +755,17 @@ test-pref(layout.float-fragments-inside-
 == 386470-1b.html 386470-1-ref.html
 == 386470-1c.html 386470-1-ref.html
 == 386920-1.html 386920-1-ref.html
 == 387201-1.html 387201-1-ref.html
 == 387201-2.html about:blank  # Really an assertion test rather than a rendering test
 == 387201-3.html about:blank  # Really an assertion test rather than a rendering test
 == 387227-1.html 387227-1-ref.html
 == 387227-2.html 387227-2-ref.html
-fails-if(!stylo) == 387344-1.html 387344-1-ref.html # scrolling rowgroups were removed in bug 28800
+fails-if(!styloVsGecko) == 387344-1.html 387344-1-ref.html # scrolling rowgroups were removed in bug 28800
 == 387876-1.html 387876-1-ref.html
 == 387876-2.html 387876-2-ref.html
 == 387876-3a.html 387876-3-ref.html
 == 387876-3b.html 387876-3-ref.html
 == 388026-1.html 388026-1-ref.html
 == 389074-1.html 389074-1-ref.html
 == 389224-1.html 389224-1-ref.html
 == 389224-2.html about:blank
@@ -784,17 +784,17 @@ fails-if(!stylo) == 387344-1.html 387344
 skip-if(!winWidget) == 391045.html 391045-ref.html # windows-specific Uniscribe bug, trailing period is matched against different fonts on Mac/Linux (see 396137)
 == 391140-1.html 391140-1-ref.html
 == 391412-1a.html 391412-1-ref.html
 == 391412-1b.html 391412-1-ref.html
 == 391909-1.html 391909-1-ref.html
 skip-if(Android) == 391979.html 391979-ref.html
 == 391994-1.html 391994-1-ref.html
 == 392047.html 392047-ref.html
-fails-if(stylo) == 392435-1.html 392435-1-ref.html
+fails-if(styloVsGecko) == 392435-1.html 392435-1-ref.html
 == 393330-1.html 393330-1-ref.html
 == 393490-1.html 393490-1-ref.html
 == 393517-1.xhtml about:blank  # crash test
 fuzzy-if(skiaContent,1,600) == 393649-1.html 393649-1-ref.html
 == 393655-1.html 393655-1-ref.html
 == 393655-2.html 393655-2-ref.html
 == 393655-3.html 393655-3-ref.html
 == 393655-4.html 393655-4-ref.html
@@ -841,17 +841,17 @@ fails-if(winWidget) fails-if(cocoaWidget
 == 400171-1a.html 400171-1-ref.html
 == 400171-1b.html 400171-1-ref.html
 == 400171-1c.html 400171-1-ref.html
 == 400171-2a.html 400171-2-ref.html
 == 400171-2b.html 400171-2-ref.html
 == 400171-2c.html 400171-2-ref.html
 == 400421-1.html 400421-1-ref.html
 == 400813-1.html 400813-1-ref.html
-fails-if(stylo) == 400826-1.html 400826-1-ref.html
+fails-if(styloVsGecko) == 400826-1.html 400826-1-ref.html
 == 401946-1.xul about:blank
 == 402338-1.html 402338-1-ref.html
 == 402567-1.html 402567-1-ref.html
 == 402567-2.html 402567-2-ref.html
 == 402567-3.html 402567-3-ref.html
 fuzzy-if(gtkWidget,2,40) == 402567-4.html 402567-4-ref.html
 fuzzy-if(skiaContent,2,5) == 402629-1.html 402629-1-ref.html
 fuzzy-if(skiaContent,2,5) == 402629-2.html 402629-2-ref.html
@@ -942,28 +942,28 @@ fuzzy-if(winWidget,123,1900) == 409659-1
 == 410621-1.html 410621-1-ref.html
 == 411059-1.html 411059-1-ref.html
 == 411334-1.xml 411334-1-ref.xml
 == 411367-1.html 411367-1-ref.html
 == 411367-2.html 411367-2-ref.html
 == 411367-3.html 411367-3-ref.html
 == 411585-1.html 411585-1-ref.html
 == 411585-2.html 411585-2-ref.html
-fails-if(!stylo) == 411585-3.html 411585-3-ref.html # bug 426909
+fails-if(!styloVsGecko) == 411585-3.html 411585-3-ref.html # bug 426909
 == 411792-1.html 411792-1-ref.html
 == 412093-1.html 412093-1-ref.html
 == 412352-1.html 412352-1-ref.html
 == 412352-2.html 412352-2-ref.html
 == 412607-1a.html 412607-1-ref.html
 == 412607-1b.html 412607-1-ref.html
 random-if(Android) == 412679-1.html 412679-1-ref.html
 fuzzy-if(skiaContent,1,17) == 412679-2.html 412679-2-ref.html
 == 413027-1.html 413027-1-ref.html
-fails-if(!stylo) == 413027-2.html 413027-2-ref.html
-fails-if(!stylo) == 413027-3.html 413027-3-ref.html
+fails-if(!styloVsGecko) == 413027-2.html 413027-2-ref.html
+fails-if(!styloVsGecko) == 413027-3.html 413027-3-ref.html
 == 413286-1a.html 413286-1-ref.html
 == 413286-1b.html 413286-1-ref.html
 == 413286-1c.html 413286-1-ref.html
 == 413286-2a.html 413286-2-ref.html
 == 413286-2b.html 413286-2-ref.html
 == 413286-2c.html 413286-2-ref.html
 == 413286-3.html 413286-3-ref.html
 == 413286-4a.html 413286-4-ref.html
@@ -976,23 +976,23 @@ fuzzy-if(Android,11,17) == 413361-1.html
 == 413840-ltr-offsets.html 413840-ltr-offsets-ref.html
 == 413840-rtl-offsets.html 413840-rtl-offsets-ref.html
 == 413840-pushed-line-bullet.html 413840-pushed-line-bullet-ref.html
 == 413840-bullet-first-line.html 413840-bullet-first-line-ref.html
 == 413982.html 413982-ref.html
 == 414123.xhtml 414123-ref.xhtml
 == 414638.html 414638-ref.html
 == 414851-1.html 414851-1-ref.html
-fails-if(stylo) == 416106-1.xhtml 416106-1-ref.xhtml
+fails-if(styloVsGecko) == 416106-1.xhtml 416106-1-ref.xhtml
 == 416752-1.html 416752-1-ref.html
 == 417178-1.html 417178-1-ref.html
 == 417246-1.html 417246-1-ref.html
 == 417676.html 417676-ref.html
-asserts(1) asserts-if(stylo,2) == 418574-1.html 418574-1-ref.html # bug 478135
-asserts(1) asserts-if(stylo,2) == 418574-2.html 418574-2-ref.html # bug 478135
+asserts(1) asserts-if(styloVsGecko,2) == 418574-1.html 418574-1-ref.html # bug 478135
+asserts(1) asserts-if(styloVsGecko,2) == 418574-2.html 418574-2-ref.html # bug 478135
 == 418766-1a.html 418766-1-ref.html
 == 418766-1b.html 418766-1-ref.html
 == 419060.html 419060-ref.html
 == 419285-1.html 419285-1-ref.html
 == 419531-1.html 419531-1-ref.html
 == 420069-1.html 420069-1-ref.html
 == 420069-2.html 420069-2-ref.html
 == 420351-1.html 420351-1-ref.html
@@ -1018,17 +1018,17 @@ fails-if(Android) fails-if(usesRepeatRes
 == 421955-1.html 421955-1-ref.html
 == 422249-1.html 422249-1-ref.html
 == 422394-1.html 422394-1-ref.html
 == 422678-1.html 422678-1-ref.html
 == 423130-1.html 423130-1-ref.html
 == 423385-1.html 423385-1-ref.html
 random-if(gtkWidget) == 423599-1.html 423599-1-ref.html # bug 1309095
 == 423676-1.html 423676-1-ref.html
-fails-if(!stylo) == 423823-1.html 423823-1-ref.html # scrolling rowgroups were removed in bug 28800
+fails-if(!styloVsGecko) == 423823-1.html 423823-1-ref.html # scrolling rowgroups were removed in bug 28800
 == 424074-1.xul 424074-1-ref.xul
 fails-if(Android) != 424074-1.xul 424074-1-ref2.xul
 random-if(gtkWidget) == 424074-1-ref2.xul 424074-1-ref3.xul
 == 424236-1.html 424236-1-ref.html
 == 424236-2.html 424236-2-ref.html
 == 424236-3.html 424236-3-ref.html
 == 424236-4.html 424236-4-ref.html
 == 424236-5.html 424236-5-ref.html
@@ -1042,92 +1042,92 @@ random-if(gtkWidget) == 424074-1-ref2.xu
 == 424465-1.html 424465-1-ref.html
 == 424631-1.html 424631-1-ref.html
 == 424710-1.html 424710-1-ref.html
 fuzzy-if(skiaContent,1,160000) == 424766-1.html 424766-1-ref.html
 == 425972-1.html 425972-1-ref.html
 == 425972-2.html 425972-2-ref.html
 != 425972-1.html 425972-2.html
 == 426629-1.html 426629-1-ref.html
-asserts(3) asserts-if(stylo,6) != 427017-1.xhtml about:blank # crash test (needs reftest-print). existing assertions are bug 457400.
+asserts(3) asserts-if(styloVsGecko,6) != 427017-1.xhtml about:blank # crash test (needs reftest-print). existing assertions are bug 457400.
 == 427129-scrollframe.html 427129-ref.html
 == 427129-table.html 427129-ref.html
 == 427129-image.html 427129-ref.html
 == 427129-table-caption.html 427129-table-caption-ref.html
 fuzzy-if(skiaContent,1,60) == 427370-1.html 427370-1-ref.html
 == 427730-1.html 427730-1-ref.html
 == 428278.html 428278-ref.html
 == 428423-1a.html 428423-1-ref.html
 == 428423-1b.html 428423-1-ref.html
 == 428521-1a.html 428521-1-ref.html
 == 428521-1b.html 428521-1-ref.html
 == 428521-1c.html 428521-1-ref.html
 == 428810-1a-ltr.html 428810-1-ltr-ref.html
 == 428810-1b-ltr.html 428810-1-ltr-ref.html
 == 428810-1c-ltr.html 428810-empty-ltr-ref.html
-fails-if(!stylo) == 428810-1d-ltr.html 428810-empty-ltr-ref.html # bug 179596
+fails-if(!styloVsGecko) == 428810-1d-ltr.html 428810-empty-ltr-ref.html # bug 179596
 != 428810-1-ltr-ref.html about:blank
 == 428810-2a-ltr.html 428810-2-ltr-ref.html
 == 428810-2b-ltr.html 428810-2-ltr-ref.html
-fails-if(!stylo) == 428810-2e-ltr.html 428810-empty-ltr-ref.html # bug 179596
+fails-if(!styloVsGecko) == 428810-2e-ltr.html 428810-empty-ltr-ref.html # bug 179596
 == 428810-2f-ltr.html 428810-empty-ltr-ref.html
 != 428810-2-ltr-ref.html about:blank
 == 428810-3a-ltr.html 428810-3-ltr-ref.html
 == 428810-3b-ltr.html 428810-3-ltr-ref.html
-fails-if(!stylo) == 428810-3e-ltr.html 428810-empty-ltr-ref.html # bug 179596
+fails-if(!styloVsGecko) == 428810-3e-ltr.html 428810-empty-ltr-ref.html # bug 179596
 == 428810-3f-ltr.html 428810-empty-ltr-ref.html
 != 428810-3-ltr-ref.html about:blank
 == 428810-1a-rtl.html 428810-1-rtl-ref.html
 == 428810-1b-rtl.html 428810-1-rtl-ref.html
 == 428810-1c-rtl.html 428810-empty-rtl-ref.html
-fails-if(!stylo) == 428810-1d-rtl.html 428810-empty-rtl-ref.html # bug 179596
+fails-if(!styloVsGecko) == 428810-1d-rtl.html 428810-empty-rtl-ref.html # bug 179596
 != 428810-1-rtl-ref.html about:blank
 != 428810-1-rtl-ref.html 428810-1-ltr-ref.html
 == 428810-2a-rtl.html 428810-2-rtl-ref.html
 == 428810-2b-rtl.html 428810-2-rtl-ref.html
-fails-if(!stylo) == 428810-2e-rtl.html 428810-empty-rtl-ref.html # bug 179596
+fails-if(!styloVsGecko) == 428810-2e-rtl.html 428810-empty-rtl-ref.html # bug 179596
 == 428810-2f-rtl.html 428810-empty-rtl-ref.html
 != 428810-2-rtl-ref.html about:blank
 != 428810-2-rtl-ref.html 428810-2-ltr-ref.html
 == 428810-3a-rtl.html 428810-3-rtl-ref.html
 == 428810-3b-rtl.html 428810-3-rtl-ref.html
-fails-if(!stylo) == 428810-3e-rtl.html 428810-empty-rtl-ref.html # bug 179596
+fails-if(!styloVsGecko) == 428810-3e-rtl.html 428810-empty-rtl-ref.html # bug 179596
 == 428810-3f-rtl.html 428810-empty-rtl-ref.html
 != 428810-3-rtl-ref.html about:blank
 != 428810-3-rtl-ref.html 428810-3-ltr-ref.html
 == 428810-1a-ltr-insets.html 428810-1-ltr-insets-ref.html
 == 428810-1b-ltr-insets.html 428810-1-ltr-insets-ref.html
 == 428810-1c-ltr-insets.html 428810-empty-ltr-insets-ref.html
-fails-if(!stylo) == 428810-1d-ltr-insets.html 428810-empty-ltr-insets-ref.html # bug 179596
+fails-if(!styloVsGecko) == 428810-1d-ltr-insets.html 428810-empty-ltr-insets-ref.html # bug 179596
 != 428810-1-ltr-insets-ref.html about:blank
 == 428810-2a-ltr-insets.html 428810-2-ltr-insets-ref.html
 == 428810-2b-ltr-insets.html 428810-2-ltr-insets-ref.html
-fails-if(!stylo) == 428810-2e-ltr-insets.html 428810-empty-ltr-insets-ref.html # bug 179596
+fails-if(!styloVsGecko) == 428810-2e-ltr-insets.html 428810-empty-ltr-insets-ref.html # bug 179596
 == 428810-2f-ltr-insets.html 428810-empty-ltr-insets-ref.html
 != 428810-2-ltr-insets-ref.html about:blank
 == 428810-3a-ltr-insets.html 428810-3-ltr-insets-ref.html
 == 428810-3b-ltr-insets.html 428810-3-ltr-insets-ref.html
-fails-if(!stylo) == 428810-3e-ltr-insets.html 428810-empty-ltr-insets-ref.html # bug 179596
+fails-if(!styloVsGecko) == 428810-3e-ltr-insets.html 428810-empty-ltr-insets-ref.html # bug 179596
 == 428810-3f-ltr-insets.html 428810-empty-ltr-insets-ref.html
 != 428810-3-ltr-insets-ref.html about:blank
 == 428810-1a-rtl-insets.html 428810-1-rtl-insets-ref.html
 == 428810-1b-rtl-insets.html 428810-1-rtl-insets-ref.html
 == 428810-1c-rtl-insets.html 428810-empty-rtl-insets-ref.html
-fails-if(!stylo) == 428810-1d-rtl-insets.html 428810-empty-rtl-insets-ref.html # bug 179596
+fails-if(!styloVsGecko) == 428810-1d-rtl-insets.html 428810-empty-rtl-insets-ref.html # bug 179596
 != 428810-1-rtl-insets-ref.html about:blank
 != 428810-1-rtl-insets-ref.html 428810-1-ltr-insets-ref.html
 == 428810-2a-rtl-insets.html 428810-2-rtl-insets-ref.html
 == 428810-2b-rtl-insets.html 428810-2-rtl-insets-ref.html
-fails-if(!stylo) == 428810-2e-rtl-insets.html 428810-empty-rtl-insets-ref.html # bug 179596
+fails-if(!styloVsGecko) == 428810-2e-rtl-insets.html 428810-empty-rtl-insets-ref.html # bug 179596
 == 428810-2f-rtl-insets.html 428810-empty-rtl-insets-ref.html
 != 428810-2-rtl-insets-ref.html about:blank
 != 428810-2-rtl-insets-ref.html 428810-2-ltr-insets-ref.html
 == 428810-3a-rtl-insets.html 428810-3-rtl-insets-ref.html
 == 428810-3b-rtl-insets.html 428810-3-rtl-insets-ref.html
-fails-if(!stylo) == 428810-3e-rtl-insets.html 428810-empty-rtl-insets-ref.html # bug 179596
+fails-if(!styloVsGecko) == 428810-3e-rtl-insets.html 428810-empty-rtl-insets-ref.html # bug 179596
 == 428810-3f-rtl-insets.html 428810-empty-rtl-insets-ref.html
 != 428810-3-rtl-insets-ref.html about:blank
 != 428810-3-rtl-insets-ref.html 428810-3-ltr-insets-ref.html
 == 430412-1.html 430412-1-ref.html
 == 430813-1.html 430813-1-ref.html
 == 430813-2.html 430813-2-ref.html
 == 430813-3.html 430813-3-ref.html
 == 431341-1.html 431341-1-ref.html
@@ -1146,17 +1146,17 @@ fuzzy-if(skiaContent,1,3280) == 438987-2
 fuzzy-if(skiaContent,1,3280) == 438987-2c.html 438987-2-ref.html
 != about:blank 438987-2-ref.html # check that backgrounds work at all
 == 439004-1.html 439004-1-ref.html
 == 439639-1.html 439639-1-ref.html
 == 439910.html 439910-ref.html
 fuzzy-if(skiaContent,1,1) == 440112.html 440112-ref.html
 == 440149-1.html 440149-1-ref.html
 == 441259-1.html 441259-1-ref.html
-fails-if(!stylo) == 441259-2.html 441259-2-ref.html # bug 441400
+fails-if(!styloVsGecko) == 441259-2.html 441259-2-ref.html # bug 441400
 fuzzy-if(skiaContent,1,3) == 442542-1.html 442542-1-ref.html
 == 444015-1.html 444015-1-ref.html
 == 444375-1.html 444375-1-ref.html
 == 444928-1.html 444928-1-ref.html
 == 444928-2.html 444928-2-ref.html
 != 444928-3.html 444928-3-notref.html
 random == 445004-1.html 445004-1-ref.html # bug 472268
 == 445142-1a.html 445142-1-ref.html
@@ -1169,21 +1169,21 @@ fails-if(Android) fails-if(usesRepeatRes
 fails-if(Android) fails-if(usesRepeatResampling) == 446100-1c.html about:blank
 fails-if(usesRepeatResampling) == 446100-1d.html about:blank
 fails-if(usesRepeatResampling) == 446100-1e.html about:blank
 == 446100-1f.html about:blank
 fails-if(usesRepeatResampling) fails-if(Android) == 446100-1g.html about:blank
 == 446100-1h.html about:blank
 == 447749-1.html 447749-1-ref.html
 fuzzy(127,2) == 448193.html 448193-ref.html
-fails-if(stylo) != 449149-1a.html about:blank
-fails-if(stylo) != 449149-1b.html about:blank
+fails-if(styloVsGecko) != 449149-1a.html about:blank
+fails-if(styloVsGecko) != 449149-1b.html about:blank
 # Retry the above with XBL scopes
-test-pref(dom.use_xbl_scopes_for_remote_xul,true) fails-if(stylo) != 449149-1a.html about:blank
-test-pref(dom.use_xbl_scopes_for_remote_xul,true) fails-if(stylo) != 449149-1b.html about:blank
+test-pref(dom.use_xbl_scopes_for_remote_xul,true) fails-if(styloVsGecko) != 449149-1a.html about:blank
+test-pref(dom.use_xbl_scopes_for_remote_xul,true) fails-if(styloVsGecko) != 449149-1b.html about:blank
 == 449149-2.html 449149-2-ref.html
 == 449171-1.html 449171-ref.html
 == 449362-1.html 449362-1-ref.html
 == 449519-1.html 449519-1-ref.html
 == 450670-1.html 450670-1-ref.html
 == 451168-1.html 451168-1-ref.html
 == 451876-1.html 451876-1-ref.html
 == 451876-2.html 451876-2-ref.html
@@ -1240,22 +1240,22 @@ fuzzy-if(skiaContent,1,12000) == 461512-
 == 466258-1.html 466258-1-ref.html
 == 466395-1.html 466395-1-ref.html
 == 466395-2.html 466395-2-ref.html
 == 467084-1.html 467084-1-ref.html
 == 467084-2.html 467084-2-ref.html
 == 467444-1.html 467444-1-ref.html
 == 467460-1.html 467460-1-ref.html
 == 468473-1.xul 468473-1-ref.xul
-fails-if(stylo) == 468546-1.xhtml 468546-1-ref.xhtml
+fails-if(styloVsGecko) == 468546-1.xhtml 468546-1-ref.xhtml
 == 471356-1.html 471356-1-ref.html
 == 471594-1.xhtml 471594-1-ref.html
 fuzzy(255,15) == 472020-1a.xul 472020-1-ref.xul
-fails-if(!stylo) == 472020-1b.xul 472020-1-ref.xul
-fails-if(!stylo) == 472020-2.xul 472020-2-ref.xul
+fails-if(!styloVsGecko) == 472020-1b.xul 472020-1-ref.xul
+fails-if(!styloVsGecko) == 472020-2.xul 472020-2-ref.xul
 == 472500-1.xul 472500-1-ref.xul
 == 472769-1a.html 472769-1-ref.html
 == 472769-1b.html 472769-1-ref.html
 == 472769-2.html 472769-2-ref.html
 == 472769-3.html 472769-3-ref.html
 == 473847-1.xul 473847-1-ref.xul
 fuzzy-if(skiaContent,1,16) == 474336-1.xul 474336-1-ref.xul
 == 474417-1.html 474417-1-ref.html
@@ -1314,20 +1314,20 @@ random-if(d2d) == 478377-1.xul 478377-1-
 == 480880-2c.html about:blank
 fails-if(Android) == 481024-1a.html 481024-1-ref.html
 fails-if(Android) == 481024-1b.html 481024-1-ref.html
 fails-if(Android) == 481024-1c.html 481024-1-ref.html
 == 481024-1d.html 481024-1-ref.html
 == 481024-1e.html 481024-1-ref.html
 != 481948-1.html 481948-1-ref.html
 != 481948-2.html 481948-2-ref.html
-fails-if(Android) random-if(winWidget) fails-if(gtkWidget&&!stylo) == 481948-3.html 481948-3-ref.html # questionable test, see bug 488364
+fails-if(Android) random-if(winWidget) fails-if(gtkWidget&&!styloVsGecko) == 481948-3.html 481948-3-ref.html # questionable test, see bug 488364
 == 482398-1.html 482398-1-ref.html
-random-if(d2d) fails-if(stylo) == 482592-1a.xhtml 482592-1-ref.html # bug 586771
-random-if(d2d) fails-if(stylo) == 482592-1b.xhtml 482592-1-ref.html # bug 586771
+random-if(d2d) fails-if(styloVsGecko) == 482592-1a.xhtml 482592-1-ref.html # bug 586771
+random-if(d2d) fails-if(styloVsGecko) == 482592-1b.xhtml 482592-1-ref.html # bug 586771
 random-if(winWidget) fuzzy-if(skiaContent,1,5) == 482659-1a.html 482659-1-ref.html
 fuzzy-if(skiaContent,1,5) == 482659-1b.html 482659-1-ref.html
 fuzzy-if(skiaContent,1,5) == 482659-1c.html 482659-1-ref.html
 fuzzy-if(skiaContent,1,5) == 482659-1d.html 482659-1-ref.html
 == 483565.xul 483565-ref.xul
 == 484256-1.html 484256-1-ref.html
 == 484256-2.html 484256-1-ref.html
 == 485012-1.html 485012-1-ref.html
@@ -1359,18 +1359,18 @@ pref(browser.display.focus_ring_width,1)
 pref(browser.display.focus_ring_width,1) == 491180-2.html 491180-2-ref.html
 == 491323-1.xul 491323-1-ref.xul
 == 492239-1.xul 492239-1-ref.xul
 == 492661-1.html 492661-1-ref.html
 == 493968-1.html 493968-1-ref.html
 == 494667-1.html 494667-1-ref.html
 == 494667-2.html 494667-2-ref.html
 == 495274-1.html 495274-1-ref.html
-fails-if(stylo) == 495354-1a.xhtml 495354-1-ref.xhtml
-fails-if(stylo) == 495354-1b.xhtml 495354-1-ref.xhtml
+fails-if(styloVsGecko) == 495354-1a.xhtml 495354-1-ref.xhtml
+fails-if(styloVsGecko) == 495354-1b.xhtml 495354-1-ref.xhtml
 == 495385-1a.html 495385-1-ref.html
 == 495385-1b.html 495385-1-ref.html
 == 495385-1c.html 495385-1-ref.html
 == 495385-1d.html 495385-1-ref.html
 == 495385-1e.html 495385-1-ref.html
 == 495385-1f.html 495385-1-ref.html
 == 495385-2a.html 495385-2-ref.html
 == 495385-2b.html 495385-2-ref.html
@@ -1378,34 +1378,34 @@ fails-if(stylo) == 495354-1b.xhtml 49535
 == 495385-2d.html 495385-2-ref.html
 == 495385-2e.html 495385-2-ref.html
 pref(dom.use_xbl_scopes_for_remote_xul,true) == 495385-2f.xhtml 495385-2-ref.html
 == 495385-2g.html 495385-2-ref.html
 == 495385-2h.html 495385-2-ref.html
 == 495385-2i.html 495385-2-ref.html
 == 495385-3.html 495385-3-ref.html
 == 495385-4.html 495385-4-ref.html
-fails-if(stylo) == 495385-5.html 495385-5-ref.html
-fails-if(stylo) == 496032-1.html 496032-1-ref.html
+fails-if(styloVsGecko) == 495385-5.html 495385-5-ref.html
+fails-if(styloVsGecko) == 496032-1.html 496032-1-ref.html
 == 496840-1.html 496840-1-ref.html
 fuzzy-if(skiaContent,1,17000) == 498228-1.xul 498228-1-ref.xul
 == 501037.html 501037-ref.html
 == 501257-1a.html 501257-1-ref.html
 == 501257-1b.html 501257-1-ref.html
 == 501257-1.xhtml 501257-1-ref.xhtml
 == 501627-1.html 501627-1-ref.html
 == 502288-1.html 502288-1-ref.html
 fuzzy-if(gtkWidget,1,2) == 502447-1.html 502447-1-ref.html #Bug 1315834
 == 502795-1.html 502795-1-ref.html
 == 502942-1.html 502942-1-ref.html
 == 503364-1a.html 503364-1-ref.html
 == 503364-1b.html 503364-1-ref.html
 # Reftest for bug 503531 marked as failing; should be re-enabled when
 # bug 607548 gets resolved.
-needs-focus fails-if(!stylo) == 503531-1.html 503531-1-ref.html
+needs-focus fails-if(!styloVsGecko) == 503531-1.html 503531-1-ref.html
 == 504032-1.html 504032-1-ref.html
 == 505743-1.html about:blank
 fuzzy-if(Android,5,2800) == 506481-1.html 506481-1-ref.html
 == 507187-1.html 507187-1-ref.html
 == 507487-1.html 507487-1-ref.html
 == 507487-2.xhtml 507487-2-ref.xhtml
 == 507762-1.html 507762-1-ref.html
 == 507762-2.html 507762-2-ref.html
@@ -1468,17 +1468,17 @@ random == 536061.html 536061-ref.html # 
 == 538909-1.html 538909-1-ref.html
 == 538935-1.html 538935-1-ref.html
 == 539226-1.html about:blank
 == 539323-1.html 539323-1-ref.html
 == 539323-2.html 539323-2-ref.html
 == 539323-3.html 539323-3-ref.html
 == 539880-1.html 539880-1-ref.html
 == 539880-1-dynamic.html 539880-1-ref.html
-fuzzy-if(Android,12,1000) skip-if(stylo) == 539949-1.html#test2 539949-1-ref.html#test2 # bug 1354406
+fuzzy-if(Android,12,1000) skip-if(styloVsGecko) == 539949-1.html#test2 539949-1-ref.html#test2 # bug 1354406
 == 541382-1.html 541382-1-ref.html
 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)||!haveTestPlugin) HTTP == 541406-1.html 541406-1-ref.html
 needs-focus != 542116-1.html 542116-1-ref.html
 needs-focus != 542116-2.html 542116-2-ref.html
 needs-focus != 542116-3.html 542116-3-ref.html
 == 542317-1.html 542317-1-ref.html
 == 542620-1.html 542620-1-ref.html
 == 545049-1.html 545049-1-ref.html
@@ -1496,18 +1496,18 @@ fuzzy-if(Android,12,300) == 551463-1.htm
 # the test is not currently relevant under harfbuzz shaping.
 # Keeping it here for the record, and because we may evolve HB's dotted-circle
 # behavior further in the future, which could make this become relevant again.
 # Marked "random" rather than "fails" because it may (spuriously) appear to pass
 # on Android devices that completely lack any Sinhala font support.
 random != 553571-1.html 553571-1-notref.html # expect dotted circle in test, not in ref: "fails" under harfbuzz, which doesn't consider the sequence invalid
 fuzzy-if(!contentSameGfxBackendAsCanvas,128,91) random-if(d2d) skip-if(azureSkiaGL) fuzzy-if(skiaContent,32,150) == 555388-1.html 555388-1-ref.html
 == 556661-1.html 556661-1-ref.html
-fuzzy-if(skiaContent,4,5) fails-if(stylo) == 557087-1.html 557087-ref.html
-fails-if(Android) fuzzy-if(skiaContent&&!Android,2,5) fails-if(stylo) == 557087-2.html 557087-ref.html
+fuzzy-if(skiaContent,4,5) fails-if(styloVsGecko) == 557087-1.html 557087-ref.html
+fails-if(Android) fuzzy-if(skiaContent&&!Android,2,5) fails-if(styloVsGecko) == 557087-2.html 557087-ref.html
 == 557736-1.html 557736-1-ref.html
 != 558011-1.xul 558011-1-ref.xul
 == 559284-1.html 559284-1-ref.html
 fails-if(Android) == 560455-1.xul 560455-1-ref.xul
 fuzzy-if(skiaContent,2,5) == 561981-1.html 561981-1-ref.html
 == 561981-2.html 561981-2-ref.html
 fuzzy-if(skiaContent,1,5) == 561981-3.html 561981-3-ref.html
 == 561981-4.html 561981-4-ref.html
@@ -1550,17 +1550,17 @@ needs-focus == 568441.html 568441-ref.ht
 == 569006-1.html 569006-1-ref.html
 == 571281-1a.html 571281-1-ref.html
 == 571281-1b.html 571281-1-ref.html
 == 571281-1c.html 571281-1-ref.html
 == 571347-1a.html 571347-1-ref.html
 == 571347-1b.html 571347-1-ref.html
 == 571347-2a.html 571347-2-ref.html
 == 571347-2b.html 571347-2-ref.html
-fails-if(stylo) == 571347-2c.html 571347-2-ref.html
+fails-if(styloVsGecko) == 571347-2c.html 571347-2-ref.html
 == 571347-2d.html 571347-2-ref.html
 == 571347-3.html 571347-3-ref.html
 == 572598-1.html 572598-ref.html
 == 574898-1.html 574898-ref.html
 # 574907 is a windows-only issue, result on other platforms depends on details of font support
 random-if(!winWidget) random-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)) == 574907-1.html 574907-1-ref.html # Bug 1258240
 random-if(!winWidget) random-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)) == 574907-2.html 574907-2-ref.html # Bug 1258240
 # 574907-3 only worked under directwrite, and even there it now depends on the rendering mode; marking as random for now
@@ -1575,42 +1575,42 @@ fails-if(Android) random-if(layersGPUAcc
 skip-if(Android) == 580160-1.html 580160-1-ref.html # bug 920927 for Android; issues without the test-plugin
 fuzzy-if(asyncPan&&!layersGPUAccelerated,255,141) HTTP(..) == 580863-1.html 580863-1-ref.html
 fails-if(Android) random-if(layersGPUAccelerated) fuzzy-if(skiaContent,1,6436) == 581317-1.html 581317-1-ref.html
 == 581579-1.html 581579-1-ref.html
 == 582037-1a.html 582037-1-ref.html
 == 582037-1b.html 582037-1-ref.html
 fuzzy-if(Android,3,256) == 582037-2a.html 582037-2-ref.html
 fuzzy-if(Android,3,256) == 582037-2b.html 582037-2-ref.html
-asserts(1-2) asserts-if(stylo,4) == 582146-1.html about:blank
+asserts(1-2) asserts-if(styloVsGecko,4) == 582146-1.html about:blank
 == 582476-1.svg 582476-1-ref.svg
 == 584400-dash-length.svg 584400-dash-length-ref.svg
 == 584699-1.html 584699-1-ref.html
 fuzzy-if(Android,2,48) == 585598-2.xhtml 585598-2-ref.xhtml
 == 586400-1.html 586400-1-ref.html
 fuzzy-if(d2d,52,1051) == 586683-1.html 586683-1-ref.html
-fails-if(stylo) == 589615-1a.xhtml 589615-1-ref.html
-fails-if(stylo) == 589615-1b.html 589615-1-ref.html
+fails-if(styloVsGecko) == 589615-1a.xhtml 589615-1-ref.html
+fails-if(styloVsGecko) == 589615-1b.html 589615-1-ref.html
 == 589672-1.html 589672-1-ref.html
 != 589682-1.html 589682-1-notref.html
 pref(dom.meta-viewport.enabled,true) skip-if(Android) == 593243-1.html 593243-1-ref.html # bug 593168
 pref(dom.meta-viewport.enabled,true) skip-if(Android) == 593243-2.html 593243-2-ref.html # bug 593168
 == 593544-1.html 593544-1-ref.html
 random-if(Android) == 594333-1.html 594333-1-ref.html
 == 594624-1.html 594624-1-ref.html
 == 594737-1.html 594737-1-ref.html
 fuzzy-if(skiaContent,1,80) == 597721-1.html 597721-1-ref.html
-random-if(winWidget) fuzzy-if(Android,38,539) fuzzy-if(skiaContent,1,480) needs-focus skip-if(stylo) == 598726-1.html 598726-1-ref.html # Fails on Windows, bug 782196
+random-if(winWidget) fuzzy-if(Android,38,539) fuzzy-if(skiaContent,1,480) needs-focus skip-if(styloVsGecko) == 598726-1.html 598726-1-ref.html # Fails on Windows, bug 782196
 == 599113-1.html 599113-1-ref.html
 fails-if(!haveTestPlugin) HTTP == 599476.html 599476-ref.html
 == 599882-1a.html 599882-1-ref.html
 == 599882-1b.html 599882-1-ref.html
 == 599882-2.html 599882-2-ref.html
 == 600045-1.html 600045-1-ref.html
-fails-if(stylo) == 600803-1.html 600803-1-ref.html
+fails-if(styloVsGecko) == 600803-1.html 600803-1-ref.html
 == 600974-1.html 600974-1-ref.html
 == 600974-2.html 600974-1-ref.html
 == 600974-3.html 600974-1-ref.html
 == 602200-1.html 602200-1-ref.html
 == 602200-2.html 602200-2-ref.html
 fuzzy-if(Android,8,20) == 602200-3.html 602200-3-ref.html
 == 602200-4.html 602200-4-ref.html
 == 603423-1.html 603423-1-ref.html
@@ -1644,17 +1644,17 @@ skip-if(Android) == 621253-1-internalFil
 HTTP(..) == 621253-2-externalFilter.html 621253-2-ref.html
 == 621253-2-internalFilter.html 621253-2-ref.html
 random-if(winWidget) == 621918-1.svg 621918-1-ref.svg # 1-pixel diacritic positioning discrepancy in rotated text (may depend on platform fonts)
 random-if(winWidget) HTTP(..) == 621918-2.svg 621918-2-ref.svg # same 1px issue as above, and HTTP(..) for filters.svg, used to mask antialiasing issues where glyphs touch
 fuzzy-if(d2d,5,1) == 622585-1.html 622585-1-ref.html # bug 789402
 fuzzy-if(Android,8,300) fuzzy-if(skiaContent,1,40000) == 625409-1.html 625409-1-ref.html
 == 627393-1.html about:blank
 fuzzy-if(skiaContent,1,500) == 630835-1.html about:blank
-fails-if(stylo) == 631352-1.html 631352-1-ref.html
+fails-if(styloVsGecko) == 631352-1.html 631352-1-ref.html
 skip-if(!haveTestPlugin) fails-if(Android) fuzzy-if(winWidget&&!layersGPUAccelerated,102,535) fuzzy-if(skiaContent&&!Android,102,11000) HTTP == 632423-1.html 632423-1-ref.html
 skip-if(Android) random-if(winWidget||OSX==1010) == 632781-verybig.html 632781-ref.html
 == 632781-normalsize.html 632781-ref.html
 fuzzy-if(d2d&&/^Windows\x20NT\x206\.2/.test(http.oscpu),1,559) fuzzy-if(!isDebugBuild&&gtkWidget&&/^Linux\x20i686/.test(http.oscpu),102,140) == 633344-1.html 633344-1-ref.html # bug 1103623, Linux32 from GCC update
 fuzzy-if(skiaContent,1,500) == 634232-1.html 634232-1-ref.html
 fuzzy-if(skiaContent,3,120000) == 635302-1.html 635302-1-ref.html
 fuzzy(1,68) fuzzy-if(gtkWidget,1,70) fails-if(Android) fuzzy-if(skiaContent&&!Android,1,300) == 635373-1.html 635373-1-ref.html
 random-if(d2d) fails-if(Android) fuzzy-if(winWidget&&!d2d,20,118) fuzzy-if(skiaContent&&!Android,2,550) == 635373-2.html 635373-2-ref.html
@@ -1662,17 +1662,17 @@ random-if(d2d) fails-if(Android) fuzzy-i
 HTTP(..) == 635639-1.html 635639-1-ref.html
 HTTP(..) == 635639-2.html 635639-2-ref.html
 random == 637597-1.html 637597-1-ref.html # bug 637597 was never really fixed!
 fuzzy-if(Android,8,500) == 637852-1.html 637852-1-ref.html
 fuzzy-if(Android,8,500) fuzzy-if(skiaContent,2,1) == 637852-2.html 637852-2-ref.html
 fuzzy-if(Android,8,500) == 637852-3.html 637852-3-ref.html
 == 641770-1.html 641770-1-ref.html
 == 641856-1.html 641856-1-ref.html
-fails-if(stylo) == 645491-1.html 645491-1-ref.html
+fails-if(styloVsGecko) == 645491-1.html 645491-1-ref.html
 == 645647-1.html 645647-1-ref.html
 == 645647-2.html 645647-2-ref.html
 == 645768-1.html 645768-1-ref.html
 fails-if(layersGPUAccelerated&&cocoaWidget) fuzzy-if(!layersGPUAccelerated,41,260) fuzzy-if(skiaContent,57,11000) == 650228-1.html 650228-1-ref.html # Quartz alpha blending doesn't match GL alpha blending
 needs-focus == 652301-1a.html 652301-1-ref.html
 needs-focus == 652301-1b.html 652301-1-ref.html
 fuzzy-if(skiaContent,2,5) == 652775-1.html 652775-1-ref.html
 HTTP == 652991-1a.html 652991-1-ref.html
@@ -1690,63 +1690,63 @@ fuzzy-if(skiaContent,1,4500) == 654950-1
 fuzzy-if(skiaContent,1,3500) == 660682-1.html 660682-1-ref.html
 fuzzy-if(d2d,1,256) skip-if(Android) fuzzy-if(skiaContent,1,68000) == 664127-1.xul 664127-1-ref.xul # Android: Intermittent failures - bug 1019131
 == 665597-1.html 665597-1-ref.html
 == 665597-2.html 665597-2-ref.html
 == 668319-1.xul about:blank
 != 669015-1.xul 669015-1-notref.xul
 skip-if(azureSkiaGL) == 670442-1.html 670442-1-ref.html
 == 670467-1.html 670467-1-ref.html
-fails-if(stylo) == 670467-2.html 670467-2-ref.html
+fails-if(styloVsGecko) == 670467-2.html 670467-2-ref.html
 == 690164-1.html 690164-1-ref.html
 == 690643-1.html 690643-1-ref.html
 != 691087-1.html 691087-1-ref.html
 == 691571-1.html 691571-1-ref.html
 fuzzy-if(skiaContent,1,200) == 696307-1.html 696307-1-ref.html
 fuzzy-if(skiaContent,1,550) == 696739-1.html 696739-1-ref.html
-needs-focus fails-if(stylo) == 703186-1.html 703186-1-ref.html
+needs-focus fails-if(styloVsGecko) == 703186-1.html 703186-1-ref.html
 needs-focus == 703186-2.html 703186-2-ref.html
-needs-focus fails-if(stylo) != 703186-1.html 703186-2.html
+needs-focus fails-if(styloVsGecko) != 703186-1.html 703186-2.html
 == 711359-1.html 711359-1-ref.html
 == 712849-1.html 712849-1-ref.html
 == 713856-static.html  713856-ref.html
 == 713856-dynamic.html 713856-ref.html
 == 714519-1-as.html 714519-1-ref.html
 == 714519-1-q.html 714519-1-ref.html
 == 714519-2-as.html 714519-2-ref.html
 == 714519-2-q.html 714519-2-ref.html
 fuzzy-if(true,1,21) fuzzy-if(d2d,68,173) fuzzy-if(cocoaWidget,1,170) == 718521.html 718521-ref.html # bug 773482
 == 720987.html 720987-ref.html
 == 722888-1.html 722888-1-ref.html
 fuzzy(2,40000) == 722923-1.html 722923-1-ref.html
 == 723484-1.html 723484-1-ref.html
 random-if(Android) == 728983-1.html 728983-1-ref.html
 == 729143-1.html 729143-1-ref.html
-fails-if(stylo) == 731521-1.html 731521-1-ref.html
-needs-focus fails-if(stylo) == 731726-1.html 731726-1-ref.html
-fails-if(stylo) == 735481-1.html 735481-1-ref.html
+fails-if(styloVsGecko) == 731521-1.html 731521-1-ref.html
+needs-focus fails-if(styloVsGecko) == 731726-1.html 731726-1-ref.html
+fails-if(styloVsGecko) == 735481-1.html 735481-1-ref.html
 fuzzy-if(cocoaWidget,1,300000) fuzzy-if(skiaContent,2,300000) == 745934-1.html 745934-1-ref.html
 == 748692-1a.html 748692-1-ref.html
 == 748692-1b.html 748692-1-ref.html
 == 748803-1.html 748803-1-ref.html
 == 750551-1.html 750551-1-ref.html
-fuzzy-if(skiaContent,1,1) fails-if(stylo) == 751012-1a.html 751012-1-ref.html
-fuzzy-if(skiaContent,1,1) fails-if(stylo) == 751012-1b.html 751012-1-ref.html
+fuzzy-if(skiaContent,1,1) fails-if(styloVsGecko) == 751012-1a.html 751012-1-ref.html
+fuzzy-if(skiaContent,1,1) fails-if(styloVsGecko) == 751012-1b.html 751012-1-ref.html
 random-if(Android) == 753329-1.html about:blank
 == 758561-1.html 758561-1-ref.html
 fuzzy-if(true,1,90) fuzzy-if(skiaContent,1,320) == 759036-1.html 759036-1-ref.html
 fuzzy-if(true,17,5886) fuzzy-if(skiaContent,9,5894) == 759036-2.html 759036-2-ref.html
-fails-if(stylo) == 776265-1a.html 776265-1-ref.html
-fails-if(stylo) == 776265-1b.html 776265-1-ref.html
-fails-if(stylo) == 776265-1c.html 776265-1-ref.html
-fails-if(stylo) == 776265-1d.html 776265-1-ref.html
-fails-if(stylo) == 776265-2a.html 776265-2-ref.html
-fails-if(stylo) == 776265-2b.html 776265-2-ref.html
-fails-if(stylo) == 776265-2c.html 776265-2-ref.html
-fails-if(stylo) == 776265-2d.html 776265-2-ref.html
+fails-if(styloVsGecko) == 776265-1a.html 776265-1-ref.html
+fails-if(styloVsGecko) == 776265-1b.html 776265-1-ref.html
+fails-if(styloVsGecko) == 776265-1c.html 776265-1-ref.html
+fails-if(styloVsGecko) == 776265-1d.html 776265-1-ref.html
+fails-if(styloVsGecko) == 776265-2a.html 776265-2-ref.html
+fails-if(styloVsGecko) == 776265-2b.html 776265-2-ref.html
+fails-if(styloVsGecko) == 776265-2c.html 776265-2-ref.html
+fails-if(styloVsGecko) == 776265-2d.html 776265-2-ref.html
 == 776443-1.html 776443-1-ref.html
 == 776443-2.html 776443-2-ref.html
 == 786254-1.html 786254-1-ref.html
 == 787947-1.html 787947-1-ref.html
 == 796847-1.svg 796847-1-ref.svg
 fuzzy(40,875) fuzzy-if(skiaContent,1,2500) == 797797-1.html 797797-1-ref.html # 'opacity:N' and rgba(,,,N) text don't match precisely
 fuzzy(40,850) fuzzy-if(skiaContent,2,2310) == 797797-2.html 797797-2-ref.html # 'opacity:N' and rgba(,,,N) text don't match precisely
 == 801994-1.html 801994-1-ref.html
@@ -1774,55 +1774,55 @@ fuzzy-if(OSX,1,364) fuzzy-if(skiaContent
 == 848421-1.html 848421-1-ref.html
 == 849407-1.html 849407-1-ref.html
 == 849996-1.html 849996-1-ref.html
 == 858803-1.html 858803-1-ref.html
 == 860242-1.html 860242-1-ref.html
 != 860370.html 860370-notref.html
 == 871338-1.html 871338-1-ref.html
 == 875060-1.html 875060-1-ref.html
-fails-if(stylo) == 883987-1a.html 883987-1-ref.html
-fails-if(stylo) == 883987-1b.html 883987-1-ref.html
-fails-if(stylo) == 883987-1c.html 883987-1-ref.html
-fails-if(stylo) == 883987-1d.html 883987-1-ref.html
-fails-if(stylo) == 883987-1e.html 883987-1-ref.html
+fails-if(styloVsGecko) == 883987-1a.html 883987-1-ref.html
+fails-if(styloVsGecko) == 883987-1b.html 883987-1-ref.html
+fails-if(styloVsGecko) == 883987-1c.html 883987-1-ref.html
+fails-if(styloVsGecko) == 883987-1d.html 883987-1-ref.html
+fails-if(styloVsGecko) == 883987-1e.html 883987-1-ref.html
 == 883987-1f.html 883987-1-ref.html
 == 890495-1.html 890495-1-ref.html
 == 894931-1.html 894931-1-ref.html
 == 897491-1.html 897491-1-ref.html
 == 897491-2.html 897491-2-ref.html
 fuzzy(2,10000) fuzzy-if(Android,5,10000) == 902330-1.html 902330-1-ref.html
 fuzzy-if(Android,8,400) fails-if(webrender) == 906199-1.html 906199-1-ref.html
 == 921716-1.html 921716-1-ref.html
 == 926155-1.html 926155-1-ref.html
 fuzzy-if(cocoaWidget,1,40) == 928607-1.html 928607-1-ref.html
 fuzzy-if(skiaContent,1,3) == 931464-1.html 931464-1-ref.html
 == 931853.html 931853-ref.html
 == 931853-quirks.html 931853-quirks-ref.html
 == 933264-1.html 933264-1-ref.html
 == 936670-1.svg 936670-1-ref.svg
 == 941940-1.html 941940-1-ref.html
-fails-if(!stylo) == 942017.html 942017-ref.html # bug 942017
+fails-if(!styloVsGecko) == 942017.html 942017-ref.html # bug 942017
 fuzzy-if(Android,1,1) fuzzy-if(skiaContent,1,160000) fails-if(webrender) == 942672-1.html 942672-1-ref.html
 == 953334-win32-clipping.html 953334-win32-clipping-ref.html
 fuzzy-if(skiaContent,1,5) == 956513-1.svg 956513-1-ref.svg
 == 944291-1.html 944291-1-ref.html
 == 950436-1.html 950436-1-ref.html
 == 957770-1.svg 957770-1-ref.svg
 == 960277-1.html 960277-1-ref.html
 fuzzy-if(skiaContent,1,80) == 961887-1.html 961887-1-ref.html
 == 961887-2.html 961887-2-ref.html
 == 961887-3.html 961887-3-ref.html
-pref(layout.css.overflow-clip-box.enabled,true) fuzzy(50,145) fuzzy-if(asyncPan&&!layersGPUAccelerated,102,3712) fails-if(stylo) == 966992-1.html 966992-1-ref.html
+pref(layout.css.overflow-clip-box.enabled,true) fuzzy(50,145) fuzzy-if(asyncPan&&!layersGPUAccelerated,102,3712) fails-if(styloVsGecko) == 966992-1.html 966992-1-ref.html
 skip-if(Android) == 966510-1.html 966510-1-ref.html # scrollable elements other than the root probably won't work well on android until bug 776030 is fixed
 skip-if(Android) == 966510-2.html 966510-2-ref.html # same as above
 fuzzy-if(skiaContent,1,123) == 978911-1.svg 978911-1-ref.svg
 == 983084-1.html 983084-1-ref.html
-skip-if(stylo) == 983084-2.html 983084-2-ref.html
-skip-if(stylo) == 983084-3.html 983084-1-ref.html
+skip-if(styloVsGecko) == 983084-2.html 983084-2-ref.html
+skip-if(styloVsGecko) == 983084-3.html 983084-1-ref.html
 == 983691-1.html 983691-ref.html
 HTTP(..) == 983985-1.html 983985-1-ref.html
 HTTP(..) == 983985-2.html 983985-2-ref.html
 == 985303-1a.html 985303-1-ref.html
 == 985303-1b.html 985303-1-ref.html
 == 987680-1.html 987680-1-ref.html
 # Fuzzy on WR due to alpha blending
 fuzzy-if(d2d,1,601) fuzzy-if(webrender,1,1473) == 991046-1.html 991046-1-ref.html
@@ -1834,17 +1834,17 @@ pref(layout.css.overflow-clip-box.enable
 == 1013054-1.html 1013054-1-ref.html
 == 1018522-1.html 1018522-1-ref.html
 == 1021564-1.html 1021564-ref.html
 == 1021564-2.html 1021564-ref.html
 == 1021564-3.html 1021564-ref.html
 == 1021564-4.html 1021564-ref.html
 pref(browser.display.use_document_fonts,0) == 1022481-1.html 1022481-1-ref.html
 fuzzy-if(d2d,1,125200) fuzzy-if(skiaContent,1,126000) == 1022612-1.html 1022612-1-ref.html
-random-if(stylo) == 1024473-1.html 1024473-1-ref.html
+random-if(styloVsGecko) == 1024473-1.html 1024473-1-ref.html
 fuzzy-if(skiaContent,1,24000) == 1025914-1.html 1025914-1-ref.html
 == 1042104-1.html 1042104-1-ref.html
 == 1043537-1.html 1043537-1-ref.html
 == 1044198-1.html 1044198-1-ref.html
 == 1049499-1.html 1049499-1-ref.html
 == 1050493-1.html 1050493-1-ref.html
 == 1050788-1.html about:blank
 == 1053035-1-flex.html 1053035-1-ref.html
@@ -1860,17 +1860,17 @@ test-pref(dom.webcomponents.enabled,true
 == 1069716-1.html 1069716-1-ref.html
 fails-if(webrender) == 1078262-1.html about:blank
 test-pref(layout.testing.overlay-scrollbars.always-visible,false) == 1081072-1.html 1081072-1-ref.html
 == 1081185-1.html 1081185-1-ref.html
 == 1097437-1.html 1097437-1-ref.html
 == 1103258-1.html 1103258-1-ref.html # assertion crash test with layers culling test
 == 1105137-1.html 1105137-1-ref.html
 fuzzy-if(d2d,36,304) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)&&d2d,127,701) HTTP(..) == 1116480-1-fakeitalic-overflow.html 1116480-1-fakeitalic-overflow-ref.html
-skip-if(stylo) == 1111753-1.html about:blank
+skip-if(styloVsGecko) == 1111753-1.html about:blank
 == 1114526-1.html 1114526-1-ref.html
 fuzzy-if(skiaContent,1,800000) == 1119117-1a.html 1119117-1-ref.html
 fuzzy-if(skiaContent,1,800000) == 1119117-1b.html 1119117-1-ref.html
 == 1120431-1.html 1120431-1-ref.html
 == 1120431-2.html 1120431-2-ref.html
 == 1121748-1.html 1121748-1-ref.html
 == 1121748-2.html 1121748-2-ref.html
 == 1127107-1a-nowrap.html 1127107-1-ref.html
@@ -1908,70 +1908,70 @@ skip-if(!Android) == 1133905-4-vh.html 1
 skip-if(!Android) fails-if(Android) == 1133905-5-vh.html 1133905-ref-vh.html
 skip-if(!Android) fails-if(Android) == 1133905-6-vh.html 1133905-ref-vh.html
 skip-if(!Android) == 1133905-1-rtl.html 1133905-ref-rtl.html
 skip-if(!Android) == 1133905-2-rtl.html 1133905-ref-rtl.html
 skip-if(!Android) == 1133905-3-rtl.html 1133905-ref-rtl.html
 skip-if(!Android) == 1133905-4-rtl.html 1133905-ref-rtl.html
 skip-if(!Android) == 1133905-5-rtl.html 1133905-ref-rtl.html
 skip-if(!Android) == 1133905-6-rtl.html 1133905-ref-rtl.html
-skip-if(!Android) fails-if(Android) fails-if(stylo) == 1133905-1-v-rtl.html 1133905-ref-v-rtl.html
-skip-if(!Android) fails-if(Android) fails-if(stylo) == 1133905-2-v-rtl.html 1133905-ref-v-rtl.html
-skip-if(!Android) fails-if(Android) fails-if(stylo) == 1133905-3-v-rtl.html 1133905-ref-v-rtl.html
-skip-if(!Android) fails-if(stylo) == 1133905-4-v-rtl.html 1133905-ref-v-rtl.html
-skip-if(!Android) fails-if(Android) fails-if(stylo) == 1133905-5-v-rtl.html 1133905-ref-v-rtl.html
-skip-if(!Android) fails-if(Android) fails-if(stylo) == 1133905-6-v-rtl.html 1133905-ref-v-rtl.html
+skip-if(!Android) fails-if(Android) fails-if(styloVsGecko) == 1133905-1-v-rtl.html 1133905-ref-v-rtl.html
+skip-if(!Android) fails-if(Android) fails-if(styloVsGecko) == 1133905-2-v-rtl.html 1133905-ref-v-rtl.html
+skip-if(!Android) fails-if(Android) fails-if(styloVsGecko) == 1133905-3-v-rtl.html 1133905-ref-v-rtl.html
+skip-if(!Android) fails-if(styloVsGecko) == 1133905-4-v-rtl.html 1133905-ref-v-rtl.html
+skip-if(!Android) fails-if(Android) fails-if(styloVsGecko) == 1133905-5-v-rtl.html 1133905-ref-v-rtl.html
+skip-if(!Android) fails-if(Android) fails-if(styloVsGecko) == 1133905-6-v-rtl.html 1133905-ref-v-rtl.html
 skip-if(!Android) == 1133905-1-h-rtl.html 1133905-ref-h-rtl.html
 skip-if(!Android) == 1133905-2-h-rtl.html 1133905-ref-h-rtl.html
 skip-if(!Android) == 1133905-3-h-rtl.html 1133905-ref-h-rtl.html
 skip-if(!Android) == 1133905-4-h-rtl.html 1133905-ref-h-rtl.html
 skip-if(!Android) == 1133905-5-h-rtl.html 1133905-ref-h-rtl.html
 skip-if(!Android) == 1133905-6-h-rtl.html 1133905-ref-h-rtl.html
-skip-if(!Android) fails-if(Android) fails-if(stylo) == 1133905-1-vh-rtl.html 1133905-ref-vh-rtl.html
-skip-if(!Android) fails-if(Android) fails-if(stylo) == 1133905-2-vh-rtl.html 1133905-ref-vh-rtl.html
-skip-if(!Android) fails-if(Android) fails-if(stylo) == 1133905-3-vh-rtl.html 1133905-ref-vh-rtl.html
-skip-if(!Android) fails-if(stylo) == 1133905-4-vh-rtl.html 1133905-ref-vh-rtl.html
-skip-if(!Android) fails-if(Android) fails-if(stylo) == 1133905-5-vh-rtl.html 1133905-ref-vh-rtl.html
-skip-if(!Android) fails-if(Android) fails-if(stylo) == 1133905-6-vh-rtl.html 1133905-ref-vh-rtl.html
+skip-if(!Android) fails-if(Android) fails-if(styloVsGecko) == 1133905-1-vh-rtl.html 1133905-ref-vh-rtl.html
+skip-if(!Android) fails-if(Android) fails-if(styloVsGecko) == 1133905-2-vh-rtl.html 1133905-ref-vh-rtl.html
+skip-if(!Android) fails-if(Android) fails-if(styloVsGecko) == 1133905-3-vh-rtl.html 1133905-ref-vh-rtl.html
+skip-if(!Android) fails-if(styloVsGecko) == 1133905-4-vh-rtl.html 1133905-ref-vh-rtl.html
+skip-if(!Android) fails-if(Android) fails-if(styloVsGecko) == 1133905-5-vh-rtl.html 1133905-ref-vh-rtl.html
+skip-if(!Android) fails-if(Android) fails-if(styloVsGecko) == 1133905-6-vh-rtl.html 1133905-ref-vh-rtl.html
 == 1150021-1.xul 1150021-1-ref.xul
 == 1151145-1.html 1151145-1-ref.html
 == 1151306-1.html 1151306-1-ref.html
 == 1153845-1.html 1153845-1-ref.html
 == 1155828-1.html 1155828-1-ref.html
 fuzzy-if(skiaContent,7,84) == 1156129-1.html 1156129-1-ref.html
 pref(dom.use_xbl_scopes_for_remote_xul,true) HTTP(..) == 1157127-1.html 1157127-1-ref.html
 fuzzy-if(Android,6,6) == 1169331-1.html 1169331-1-ref.html
-fuzzy(1,74) fails-if(gtkWidget&&!stylo) == 1174332-1.html 1174332-1-ref.html # bug 1312658
+fuzzy(1,74) fails-if(gtkWidget&&!styloVsGecko) == 1174332-1.html 1174332-1-ref.html # bug 1312658
 == 1179078-1.html 1179078-1-ref.html
 == 1179288-1.html 1179288-1-ref.html
 == 1190635-1.html 1190635-1-ref.html
 == 1202512-1.html 1202512-1-ref.html
 fuzzy-if(skiaContent,1,1) == 1202512-2.html 1202512-2-ref.html
 != 1207326-1.html about:blank
 == 1209603-1.html 1209603-1-ref.html
 == 1209994-1.html 1209994-1-ref.html
 == 1209994-2.html 1209994-2-ref.html
 == 1209994-3.html 1209994-3-ref.html
 == 1209994-4.html 1209994-4-ref.html
 == 1222226-1.html 1222226-1-ref.html
-pref(layout.css.overflow-clip-box.enabled,true) fails-if(stylo) == 1226278.html 1226278-ref.html
+pref(layout.css.overflow-clip-box.enabled,true) fails-if(styloVsGecko) == 1226278.html 1226278-ref.html
 == 1230466.html about:blank
 random-if(gtkWidget) != 1238243-1.html 1238243-1-notref.html # may fail on Linux, depending on Korean fonts available
 == 1238243-2.html 1238243-2-ref.html
 fuzzy(100,2000) == 1239564.html 1239564-ref.html
 == 1242172-1.html 1242172-1-ref.html
 == 1242172-2.html 1242172-2-ref.html
 == 1242781.html 1242781-ref.html
 == 1263845.html 1263845-ref.html
 == 1260543-1.html 1260543-1-ref.html
 == 1271714-1.html 1271714-1-ref.html
 == 1272997-1.html 1272997-1-ref.html
 random-if(!winWidget) == 1273154-1.html 1273154-1-ref.html # depends on Windows font
 random-if(!winWidget) == 1273154-2.html 1273154-2-ref.html # depends on Windows font
-fails-if(stylo) == 1274368-1.html 1274368-1-ref.html
+fails-if(styloVsGecko) == 1274368-1.html 1274368-1-ref.html
 != 1276161-1a.html 1276161-1-notref.html
 != 1276161-1b.html 1276161-1-notref.html
 != 1276161-1a.html 1276161-1b.html
 == 1275411-1.html 1275411-1-ref.html
 == 1288255.html 1288255-ref.html
 fuzzy(8,1900) == 1291528.html 1291528-ref.html
 # Buttons in 2 pages have different position and the rendering result can be
 # different, but they should use the same button style and the background color
@@ -1985,21 +1985,20 @@ fuzzy(2,20000) == 1315113-2.html 1315113
 == 1315632-1.html 1315632-1-ref.html
 fuzzy(2,40000) == 1316719-1a.html 1316719-1-ref.html
 fuzzy(2,40000) == 1316719-1b.html 1316719-1-ref.html
 fuzzy(2,40000) == 1316719-1c.html 1316719-1-ref.html
 pref(layers.advanced.background-color,1) skip-if(!webrender) fuzzy-if(webrender,27,700) == 1316719-1a.html 1316719-1-ref.html
 pref(layers.advanced.background-color,1) skip-if(!webrender) fuzzy-if(webrender,27,700) == 1316719-1b.html 1316719-1-ref.html
 pref(layers.advanced.background-color,1) skip-if(!webrender) fuzzy-if(webrender,27,700) == 1316719-1c.html 1316719-1-ref.html
 skip-if(Android) != 1318769-1.html 1318769-1-ref.html
-fails-if(stylo) == 1322512-1.html 1322512-1-ref.html
+fails-if(styloVsGecko) == 1322512-1.html 1322512-1-ref.html
 == 1330051.svg 1330051-ref.svg
 == 1348481-1.html 1348481-ref.html
 == 1348481-2.html 1348481-ref.html
-fails-if(stylo) == 1348481-3.html 1348481-ref.html
 == 1352464-1.html 1352464-1-ref.html
 == 1358375-1.html 1358375-ref.html
 == 1358375-2.html 1358375-ref.html
 == 1358375-3.html 1358375-ref.html
 == 1364280-1.html 1364280-1-ref.html
 == 1364280-2a.html 1364280-2-ref.html
 == 1364280-2b.html 1364280-2-ref.html
 == 1364280-2c.html 1364280-2-ref.html
--- a/layout/reftests/canvas/reftest.list
+++ b/layout/reftests/canvas/reftest.list
@@ -58,20 +58,20 @@ random-if(!d2d) != text-subpixel-1.html 
 ## Currently fails most places due to partial backout of bug 808288, see bug 837461.
 ## (Marking "random" rather than "fails" because it would pass for people
 ## if they have an Emoji font installed when running the tests.)
 random != text-emoji.html text-emoji-notref.html
 
 # azure quartz uses CGDrawLinearGradient instead of DrawShading
 # so we have less control over degenerate behaviour as tested by this
 # test
-fails-if((azureSkia&&!azureSkiaGL&&!stylo)||(azureSkiaGL&&Android)) == linear-gradient-1a.html linear-gradient-1-ref.html
+fails-if((azureSkia&&!azureSkiaGL&&!styloVsGecko)||(azureSkiaGL&&Android)) == linear-gradient-1a.html linear-gradient-1-ref.html
 
 # this passes with cairo on 10.7 and 10.8 but not with azure for reasons unknown
-fails-if((azureSkia&&!azureSkiaGL&&!stylo)||(azureSkiaGL&&Android)) == linear-gradient-1b.html linear-gradient-1-ref.html
+fails-if((azureSkia&&!azureSkiaGL&&!styloVsGecko)||(azureSkiaGL&&Android)) == linear-gradient-1b.html linear-gradient-1-ref.html
 
 == zero-dimensions.html zero-dimensions-ref.html
 
 != evenodd-fill-1.html nonzero-fill-1.html
 == evenodd-fill-1.html evenodd-fill-ref.html
 
 == dash-sanity.html data:text/html,<body>Pass
 fuzzy-if(azureSkia||skiaContent,9,470) random-if(Android) == dash-1.html dash-1-ref.svg  # Bug 668412 (really is android-specific, not IPC-specific)
--- a/layout/reftests/counter-style/reftest.list
+++ b/layout/reftests/counter-style/reftest.list
@@ -26,10 +26,10 @@ fails-if(webrender) == descriptor-range-
 fails-if(webrender) == descriptor-pad-invalid.html      descriptor-pad-invalid-ref.html
 fails-if(webrender) == descriptor-fallback.html         descriptor-fallback-ref.html
 fails-if(webrender) == descriptor-symbols-invalid.html  descriptor-symbols-invalid-ref.html
 == name-case-sensitivity.html       name-case-sensitivity-ref.html
 fails-if(webrender) == dependent-builtin.html           dependent-builtin-ref.html
 == redefine-builtin.html            redefine-builtin-ref.html
 == redefine-attr-mapping.html       redefine-attr-mapping-ref.html
 == disclosure-styles.html           disclosure-styles-ref.html
-fails-if(stylo) == symbols-function.html            symbols-function-ref.html
+fails-if(styloVsGecko) == symbols-function.html            symbols-function-ref.html
 == symbols-function-invalid.html    symbols-function-invalid-ref.html
--- a/layout/reftests/css-animations/reftest.list
+++ b/layout/reftests/css-animations/reftest.list
@@ -1,12 +1,12 @@
 == screen-animations.html screen-animations-ref.html
 != screen-animations.html screen-animations-notref.html
-fails-if(!stylo) == print-no-animations.html print-no-animations-ref.html # reftest harness doesn't actually make pres context non-dynamic for reftest-print tests
-fails-if(!stylo) != print-no-animations.html print-no-animations-notref.html # reftest harness doesn't actually make pres context non-dynamic for reftest-print tests
+fails-if(!styloVsGecko) == print-no-animations.html print-no-animations-ref.html # reftest harness doesn't actually make pres context non-dynamic for reftest-print tests
+fails-if(!styloVsGecko) != print-no-animations.html print-no-animations-notref.html # reftest harness doesn't actually make pres context non-dynamic for reftest-print tests
 == animate-opacity.html animate-opacity-ref.html
 == animate-preserves3d.html animate-preserves3d-ref.html
 == in-visibility-hidden-animation.html in-visibility-hidden-animation-ref.html
 == in-visibility-hidden-animation-pseudo-element.html in-visibility-hidden-animation-pseudo-element-ref.html
 == partially-out-of-view-animation.html partially-out-of-view-animation-ref.html
 == animate-display-table-opacity.html animate-display-table-opacity-ref.html
 # We need to run 100% opacity test case when OMTA is disabled to check that the animation creates a stacking context even if the animation is not running on the compositor
 test-pref(layers.offmainthreadcomposition.async-animations,false) == stacking-context-opacity-1-animation.html stacking-context-animation-ref.html
--- a/layout/reftests/css-charset/reftest.list
+++ b/layout/reftests/css-charset/reftest.list
@@ -1,10 +1,10 @@
 == test-attribute.html pass.html
 == test-charset-quotes.html pass.html
 == test-charset-leading-space.html pass.html
 == test-charset-trailing-space.html pass.html
 == test-charset-utf-16-le-no-bom.html pass.html
-fails-if(!stylo) == test-charset-utf-16-le-bom.html pass.html
+fails-if(!styloVsGecko) == test-charset-utf-16-le-bom.html pass.html
 == test-charset-utf-16-bom-le.html pass.html
 == test-charset-utf-16-be-no-bom.html pass.html
-fails-if(!stylo) == test-charset-utf-16-be-bom.html pass.html
+fails-if(!styloVsGecko) == test-charset-utf-16-be-bom.html pass.html
 == test-charset-utf-16-bom-be.html pass.html
--- a/layout/reftests/css-disabled/textarea/reftest.list
+++ b/layout/reftests/css-disabled/textarea/reftest.list
@@ -1,9 +1,9 @@
-fuzzy-if(skiaContent,1,10) fails-if(stylo) == textarea-fieldset-1.html textarea-fieldset-ref.html
-fails-if(stylo) == textarea-fieldset-2.html textarea-fieldset-ref.html
-fails-if(stylo) == textarea-fieldset-3.html textarea-fieldset-ref.html
-fails-if(stylo) == textarea-fieldset-4.html textarea-fieldset-ref.html
-fuzzy-if(skiaContent,1,5) fails-if(stylo) == textarea-fieldset-legend-1.html textarea-fieldset-legend-ref-1.html
-fuzzy-if(skiaContent,1,5) fails-if(stylo) == textarea-fieldset-legend-2.html textarea-fieldset-legend-ref-2.html
-fuzzy-if(skiaContent,1,5) fails-if(stylo) == textarea-fieldset-legend-3.html textarea-fieldset-legend-ref-3.html
-fuzzy-if(skiaContent,1,5) fails-if(stylo) == textarea-fieldset-legend-4.html textarea-fieldset-legend-ref-4.html
-fuzzy-if(skiaContent,1,5) fails-if(stylo) == textarea-fieldset-legend-5.html textarea-fieldset-legend-ref-5.html
+fuzzy-if(skiaContent,1,10) fails-if(styloVsGecko) == textarea-fieldset-1.html textarea-fieldset-ref.html
+fails-if(styloVsGecko) == textarea-fieldset-2.html textarea-fieldset-ref.html
+fails-if(styloVsGecko) == textarea-fieldset-3.html textarea-fieldset-ref.html
+fails-if(styloVsGecko) == textarea-fieldset-4.html textarea-fieldset-ref.html
+fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-1.html textarea-fieldset-legend-ref-1.html
+fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-2.html textarea-fieldset-legend-ref-2.html
+fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-3.html textarea-fieldset-legend-ref-3.html
+fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-4.html textarea-fieldset-legend-ref-4.html
+fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-5.html textarea-fieldset-legend-ref-5.html
--- a/layout/reftests/css-display/reftest.list
+++ b/layout/reftests/css-display/reftest.list
@@ -1,32 +1,32 @@
 # Tests for CSS Display spec features.
 # http://dev.w3.org/csswg/css-display
 
 fuzzy-if(Android,8,604) == display-contents-acid.html display-contents-acid-ref.html
 fuzzy-if(Android,8,604) == display-contents-acid-dyn-1.html display-contents-acid-ref.html
 fuzzy-if(Android,8,604) == display-contents-acid-dyn-2.html display-contents-acid-ref.html
 fuzzy-if(Android,8,604) == display-contents-acid-dyn-3.html display-contents-acid-ref.html
-skip-if(stylo) == display-contents-generated-content.html display-contents-generated-content-ref.html
-skip-if(stylo) == display-contents-generated-content-2.html display-contents-generated-content-ref.html
-fails-if(stylo) == display-contents-style-inheritance-1.html display-contents-style-inheritance-1-ref.html
-fails-if(stylo) == display-contents-style-inheritance-1-stylechange.html display-contents-style-inheritance-1-ref.html
-fuzzy-if(winWidget,12,100) skip-if(stylo) == display-contents-style-inheritance-1-dom-mutations.html display-contents-style-inheritance-1-ref.html
+skip-if(styloVsGecko) == display-contents-generated-content.html display-contents-generated-content-ref.html
+skip-if(styloVsGecko) == display-contents-generated-content-2.html display-contents-generated-content-ref.html
+fails-if(styloVsGecko) == display-contents-style-inheritance-1.html display-contents-style-inheritance-1-ref.html
+fails-if(styloVsGecko) == display-contents-style-inheritance-1-stylechange.html display-contents-style-inheritance-1-ref.html
+fuzzy-if(winWidget,12,100) skip-if(styloVsGecko) == display-contents-style-inheritance-1-dom-mutations.html display-contents-style-inheritance-1-ref.html
 == display-contents-tables.xhtml display-contents-tables-ref.xhtml
 == display-contents-tables-2.xhtml display-contents-tables-ref.xhtml
 == display-contents-tables-3.xhtml display-contents-tables-3-ref.xhtml
 == display-contents-visibility-hidden.html display-contents-visibility-hidden-ref.html
 == display-contents-visibility-hidden-2.html display-contents-visibility-hidden-ref.html
 == display-contents-495385-2d.html display-contents-495385-2d-ref.html
 fuzzy-if(Android,7,3935) == display-contents-xbl.xhtml display-contents-xbl-ref.html
-fuzzy-if(Android,7,1186) pref(dom.webcomponents.enabled,true) skip-if(stylo) == display-contents-shadow-dom-1.html display-contents-shadow-dom-1-ref.html
+fuzzy-if(Android,7,1186) pref(dom.webcomponents.enabled,true) skip-if(styloVsGecko) == display-contents-shadow-dom-1.html display-contents-shadow-dom-1-ref.html
 == display-contents-xbl-2.xul display-contents-xbl-2-ref.xul
-asserts(1) asserts-if(stylo,2) == display-contents-xbl-3.xul display-contents-xbl-3-ref.xul # bug 1089223
+asserts(1) asserts-if(styloVsGecko,2) == display-contents-xbl-3.xul display-contents-xbl-3-ref.xul # bug 1089223
 skip == display-contents-xbl-4.xul display-contents-xbl-4-ref.xul # fails (not just asserts) due to bug 1089223
 asserts(0-1) fuzzy-if(Android,8,3216) == display-contents-fieldset.html display-contents-fieldset-ref.html # bug 1089223
-asserts(1) asserts-if(stylo,2) == display-contents-xbl-5.xul display-contents-xbl-3-ref.xul # bug 1089223
+asserts(1) asserts-if(styloVsGecko,2) == display-contents-xbl-5.xul display-contents-xbl-3-ref.xul # bug 1089223
 == display-contents-list-item-child.html display-contents-list-item-child-ref.html
 == display-contents-dyn-insert-text.html display-contents-dyn-insert-text-ref.html
 == display-contents-writing-mode-1.html display-contents-writing-mode-1-ref.html
 == display-contents-writing-mode-2.html display-contents-writing-mode-2-ref.html
 needs-focus == display-contents-state-change.html display-contents-state-change-ref.html
 pref(layout.css.display-flow-root.enabled,true) == display-flow-root-001.html display-flow-root-001-ref.html
-pref(layout.css.display-flow-root.enabled,false) fails-if(stylo) == display-flow-root-001.html display-flow-root-disabled-001-ref.html
+pref(layout.css.display-flow-root.enabled,false) fails-if(styloVsGecko) == display-flow-root-001.html display-flow-root-disabled-001-ref.html
--- a/layout/reftests/css-enabled/textarea/reftest.list
+++ b/layout/reftests/css-enabled/textarea/reftest.list
@@ -1,9 +1,9 @@
-fuzzy-if(skiaContent,1,5) fails-if(stylo) == textarea-fieldset-1.html textarea-fieldset-ref.html
-fuzzy-if(skiaContent,1,5) fails-if(stylo) == textarea-fieldset-2.html textarea-fieldset-ref.html
-fails-if(stylo) == textarea-fieldset-3.html textarea-fieldset-ref.html
-fails-if(stylo) == textarea-fieldset-4.html textarea-fieldset-ref.html
-fuzzy-if(skiaContent,1,5) fails-if(stylo) == textarea-fieldset-legend-1.html textarea-fieldset-legend-ref-1.html
-fuzzy-if(skiaContent,1,5) fails-if(stylo) == textarea-fieldset-legend-2.html textarea-fieldset-legend-ref-2.html
-fuzzy-if(skiaContent,1,5) fails-if(stylo) == textarea-fieldset-legend-3.html textarea-fieldset-legend-ref-3.html
-fuzzy-if(skiaContent,1,5) fails-if(stylo) == textarea-fieldset-legend-4.html textarea-fieldset-legend-ref-4.html
-fuzzy-if(skiaContent,1,10) fails-if(stylo) == textarea-fieldset-legend-5.html textarea-fieldset-legend-ref-5.html
+fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-1.html textarea-fieldset-ref.html
+fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-2.html textarea-fieldset-ref.html
+fails-if(styloVsGecko) == textarea-fieldset-3.html textarea-fieldset-ref.html
+fails-if(styloVsGecko) == textarea-fieldset-4.html textarea-fieldset-ref.html
+fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-1.html textarea-fieldset-legend-ref-1.html
+fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-2.html textarea-fieldset-legend-ref-2.html
+fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-3.html textarea-fieldset-legend-ref-3.html
+fuzzy-if(skiaContent,1,5) fails-if(styloVsGecko) == textarea-fieldset-legend-4.html textarea-fieldset-legend-ref-4.html
+fuzzy-if(skiaContent,1,10) fails-if(styloVsGecko) == textarea-fieldset-legend-5.html textarea-fieldset-legend-ref-5.html
--- a/layout/reftests/css-grid/reftest.list
+++ b/layout/reftests/css-grid/reftest.list
@@ -1,12 +1,12 @@
 default-preferences pref(layout.css.grid.enabled,true)
 
-fails-if(!stylo) == grid-whitespace-handling-1a.xhtml grid-whitespace-handling-1-ref.xhtml
-fails-if(!stylo) skip-if(stylo) == grid-whitespace-handling-1b.xhtml grid-whitespace-handling-1-ref.xhtml
+fails-if(!styloVsGecko) == grid-whitespace-handling-1a.xhtml grid-whitespace-handling-1-ref.xhtml
+fails-if(!styloVsGecko) skip-if(styloVsGecko) == grid-whitespace-handling-1b.xhtml grid-whitespace-handling-1-ref.xhtml
 == grid-whitespace-handling-2.xhtml  grid-whitespace-handling-2-ref.xhtml
 == grid-placement-definite-001.html grid-placement-definite-001-ref.html
 == grid-placement-definite-002.html grid-placement-definite-002-ref.html
 == grid-placement-definite-003.html grid-placement-definite-003-ref.html
 == grid-placement-negative-lines-001.html grid-placement-negative-lines-001-ref.html
 == grid-placement-auto-row-sparse-001.html grid-placement-auto-row-sparse-001-ref.html
 == grid-placement-auto-row-dense-001.html grid-placement-auto-row-dense-001-ref.html
 == grid-placement-auto-col-sparse-001.html grid-placement-auto-col-sparse-001-ref.html
@@ -14,29 +14,29 @@ fails-if(!stylo) skip-if(stylo) == grid-
 == grid-placement-implicit-named-areas-001.html grid-placement-implicit-named-areas-001-ref.html
 == grid-placement-named-lines-001.html grid-placement-named-lines-001-ref.html
 == grid-placement-named-lines-002.html grid-placement-named-lines-002-ref.html
 == grid-placement-named-lines-003.html grid-placement-named-lines-003-ref.html
 == grid-track-sizing-001.html grid-track-sizing-001-ref.html
 == grid-track-sizing-002.html grid-track-sizing-002-ref.html
 == grid-abspos-items-001.html grid-abspos-items-001-ref.html
 == grid-abspos-items-002.html grid-abspos-items-002-ref.html
-fails-if(stylo) == grid-abspos-items-003.html grid-abspos-items-003-ref.html
-fails-if(stylo) == grid-abspos-items-004.html grid-abspos-items-004-ref.html
-fails-if(stylo) == grid-abspos-items-005.html grid-abspos-items-005-ref.html
-fails-if(stylo) == grid-abspos-items-006.html grid-abspos-items-006-ref.html
-fails-if(stylo) == grid-abspos-items-007.html grid-abspos-items-007-ref.html
-fails-if(stylo) == grid-abspos-items-008.html grid-abspos-items-008-ref.html
-fails-if(stylo) == grid-abspos-items-009.html grid-abspos-items-009-ref.html
-fails-if(stylo) == grid-abspos-items-010.html grid-abspos-items-010-ref.html
+fails-if(styloVsGecko) == grid-abspos-items-003.html grid-abspos-items-003-ref.html
+fails-if(styloVsGecko) == grid-abspos-items-004.html grid-abspos-items-004-ref.html
+fails-if(styloVsGecko) == grid-abspos-items-005.html grid-abspos-items-005-ref.html
+fails-if(styloVsGecko) == grid-abspos-items-006.html grid-abspos-items-006-ref.html
+fails-if(styloVsGecko) == grid-abspos-items-007.html grid-abspos-items-007-ref.html
+fails-if(styloVsGecko) == grid-abspos-items-008.html grid-abspos-items-008-ref.html
+fails-if(styloVsGecko) == grid-abspos-items-009.html grid-abspos-items-009-ref.html
+fails-if(styloVsGecko) == grid-abspos-items-010.html grid-abspos-items-010-ref.html
 == grid-abspos-items-011.html grid-abspos-items-011-ref.html
 == grid-abspos-items-012.html grid-abspos-items-012-ref.html
 == grid-abspos-items-013.html grid-abspos-items-013-ref.html
-fails-if(stylo) == grid-abspos-items-014.html grid-abspos-items-014-ref.html
-fails-if(stylo) == grid-abspos-items-015.html grid-abspos-items-015-ref.html
+fails-if(styloVsGecko) == grid-abspos-items-014.html grid-abspos-items-014-ref.html
+fails-if(styloVsGecko) == grid-abspos-items-015.html grid-abspos-items-015-ref.html
 == grid-order-abspos-items-001.html grid-order-abspos-items-001-ref.html
 == grid-order-placement-auto-001.html grid-order-placement-auto-001-ref.html
 fuzzy-if(skiaContent,1,200) == grid-order-placement-definite-001.html grid-order-placement-definite-001-ref.html
 skip-if(Android) == grid-placement-definite-implicit-001.html grid-placement-definite-implicit-001-ref.html
 == grid-placement-definite-implicit-002.html grid-placement-definite-implicit-002-ref.html
 skip-if(Android) fuzzy-if(winWidget,1,32) == grid-placement-auto-implicit-001.html grid-placement-auto-implicit-001-ref.html
 == grid-placement-abspos-implicit-001.html grid-placement-abspos-implicit-001-ref.html
 == rtl-grid-placement-definite-001.html rtl-grid-placement-definite-001-ref.html
@@ -72,124 +72,124 @@ fuzzy-if(winWidget,1,36) == grid-auto-mi
 == grid-min-content-min-sizing-transferred-size-003.html grid-min-content-min-sizing-transferred-size-003-ref.html
 == grid-min-content-min-sizing-transferred-size-004.html grid-min-content-min-sizing-transferred-size-004-ref.html
 skip-if(Android) == grid-auto-min-sizing-percent-001.html grid-auto-min-sizing-percent-001-ref.html # bug 1305716
 == grid-track-intrinsic-sizing-001.html grid-track-intrinsic-sizing-001-ref.html
 == grid-track-intrinsic-sizing-002.html grid-track-intrinsic-sizing-002-ref.html
 == grid-track-intrinsic-sizing-003.html grid-track-intrinsic-sizing-003-ref.html
 == grid-track-intrinsic-sizing-004.html grid-track-intrinsic-sizing-004-ref.html
 == grid-track-percent-sizing-001.html grid-track-percent-sizing-001-ref.html
-fails-if(stylo) == grid-track-fit-content-sizing-001.html grid-track-fit-content-sizing-001-ref.html
+fails-if(styloVsGecko) == grid-track-fit-content-sizing-001.html grid-track-fit-content-sizing-001-ref.html
 == grid-track-fit-content-sizing-002.html grid-track-fit-content-sizing-002-ref.html
 == grid-max-sizing-flex-001.html grid-max-sizing-flex-001-ref.html
 == grid-max-sizing-flex-002.html grid-max-sizing-flex-002-ref.html
 == grid-max-sizing-flex-003.html grid-max-sizing-flex-003-ref.html
 == grid-max-sizing-flex-004.html grid-max-sizing-flex-004-ref.html
 == grid-max-sizing-flex-005.html grid-max-sizing-flex-005-ref.html
 == grid-max-sizing-flex-006.html grid-max-sizing-flex-006-ref.html
-fails-if(stylo) == grid-max-sizing-flex-007.html grid-max-sizing-flex-007-ref.html
-fails-if(stylo) == grid-max-sizing-flex-008.html grid-max-sizing-flex-008-ref.html
+fails-if(styloVsGecko) == grid-max-sizing-flex-007.html grid-max-sizing-flex-007-ref.html
+fails-if(styloVsGecko) == grid-max-sizing-flex-008.html grid-max-sizing-flex-008-ref.html
 == grid-flex-min-sizing-001.html grid-flex-min-sizing-001-ref.html
 == grid-flex-min-sizing-002.html grid-flex-min-sizing-002-ref.html
-fails-if(stylo) == grid-item-align-001.html grid-item-align-001-ref.html
-fails-if(stylo) == grid-item-align-002.html grid-item-align-002-ref.html
-fails-if(stylo) == grid-item-align-003.html grid-item-align-003-ref.html
-fails-if(stylo) == grid-item-justify-001.html grid-item-justify-001-ref.html
-fails-if(stylo) == grid-item-justify-002.html grid-item-justify-002-ref.html
-fails-if(stylo) == grid-item-stretch-001.html grid-item-stretch-001-ref.html
-fails-if(stylo) == grid-item-intrinsic-ratio-stretch-001.html grid-item-intrinsic-ratio-stretch-001-ref.html
-fails-if(stylo) == grid-item-intrinsic-ratio-stretch-002.html grid-item-intrinsic-ratio-stretch-002-ref.html
-fails-if(stylo) == grid-item-intrinsic-ratio-stretch-003.html grid-item-intrinsic-ratio-stretch-003-ref.html
-fails-if(stylo) == grid-item-intrinsic-ratio-stretch-004.html grid-item-intrinsic-ratio-stretch-004-ref.html
-fails-if(stylo) == grid-item-intrinsic-ratio-stretch-005.html grid-item-intrinsic-ratio-stretch-005-ref.html
-fails-if(stylo) == grid-item-intrinsic-ratio-stretch-006.html grid-item-intrinsic-ratio-stretch-006-ref.html
-fails-if(stylo) == grid-item-intrinsic-ratio-stretch-007.html grid-item-intrinsic-ratio-stretch-007-ref.html
-fails-if(stylo) == grid-item-intrinsic-ratio-normal-001.html grid-item-intrinsic-ratio-normal-001-ref.html
-fails-if(stylo) == grid-item-intrinsic-ratio-normal-002.html grid-item-intrinsic-ratio-normal-002-ref.html
-fails-if(stylo) == grid-item-intrinsic-ratio-normal-003.html grid-item-intrinsic-ratio-normal-003-ref.html
-fails-if(stylo) == grid-item-intrinsic-ratio-normal-004.html grid-item-intrinsic-ratio-normal-004-ref.html
-fails-if(stylo) == grid-item-intrinsic-ratio-normal-005.html grid-item-intrinsic-ratio-normal-005-ref.html
-fails-if(stylo) == grid-item-intrinsic-size-normal-001.html grid-item-intrinsic-size-normal-001-ref.html
-fails-if(stylo) == grid-item-intrinsic-size-normal-002.html grid-item-intrinsic-size-normal-002-ref.html
+fails-if(styloVsGecko) == grid-item-align-001.html grid-item-align-001-ref.html
+fails-if(styloVsGecko) == grid-item-align-002.html grid-item-align-002-ref.html
+fails-if(styloVsGecko) == grid-item-align-003.html grid-item-align-003-ref.html
+fails-if(styloVsGecko) == grid-item-justify-001.html grid-item-justify-001-ref.html
+fails-if(styloVsGecko) == grid-item-justify-002.html grid-item-justify-002-ref.html
+fails-if(styloVsGecko) == grid-item-stretch-001.html grid-item-stretch-001-ref.html
+fails-if(styloVsGecko) == grid-item-intrinsic-ratio-stretch-001.html grid-item-intrinsic-ratio-stretch-001-ref.html
+fails-if(styloVsGecko) == grid-item-intrinsic-ratio-stretch-002.html grid-item-intrinsic-ratio-stretch-002-ref.html
+fails-if(styloVsGecko) == grid-item-intrinsic-ratio-stretch-003.html grid-item-intrinsic-ratio-stretch-003-ref.html
+fails-if(styloVsGecko) == grid-item-intrinsic-ratio-stretch-004.html grid-item-intrinsic-ratio-stretch-004-ref.html
+fails-if(styloVsGecko) == grid-item-intrinsic-ratio-stretch-005.html grid-item-intrinsic-ratio-stretch-005-ref.html
+fails-if(styloVsGecko) == grid-item-intrinsic-ratio-stretch-006.html grid-item-intrinsic-ratio-stretch-006-ref.html
+fails-if(styloVsGecko) == grid-item-intrinsic-ratio-stretch-007.html grid-item-intrinsic-ratio-stretch-007-ref.html
+fails-if(styloVsGecko) == grid-item-intrinsic-ratio-normal-001.html grid-item-intrinsic-ratio-normal-001-ref.html
+fails-if(styloVsGecko) == grid-item-intrinsic-ratio-normal-002.html grid-item-intrinsic-ratio-normal-002-ref.html
+fails-if(styloVsGecko) == grid-item-intrinsic-ratio-normal-003.html grid-item-intrinsic-ratio-normal-003-ref.html
+fails-if(styloVsGecko) == grid-item-intrinsic-ratio-normal-004.html grid-item-intrinsic-ratio-normal-004-ref.html
+fails-if(styloVsGecko) == grid-item-intrinsic-ratio-normal-005.html grid-item-intrinsic-ratio-normal-005-ref.html
+fails-if(styloVsGecko) == grid-item-intrinsic-size-normal-001.html grid-item-intrinsic-size-normal-001-ref.html
+fails-if(styloVsGecko) == grid-item-intrinsic-size-normal-002.html grid-item-intrinsic-size-normal-002-ref.html
 == grid-item-auto-min-size-clamp-001.html grid-item-auto-min-size-clamp-001-ref.html
 == grid-item-auto-min-size-clamp-002.html grid-item-auto-min-size-clamp-002-ref.html
 == grid-item-auto-min-size-clamp-003.html grid-item-auto-min-size-clamp-003-ref.html
 == grid-item-auto-min-size-clamp-004.html grid-item-auto-min-size-clamp-004-ref.html
 == grid-item-auto-min-size-clamp-005.html grid-item-auto-min-size-clamp-005-ref.html
 == grid-item-auto-min-size-clamp-006.html grid-item-auto-min-size-clamp-006-ref.html
 == grid-item-auto-min-size-clamp-007.html grid-item-auto-min-size-clamp-007-ref.html
-fails-if(stylo) == grid-item-overflow-stretch-001.html grid-item-overflow-stretch-001-ref.html
-fails-if(stylo) == grid-item-overflow-stretch-002.html grid-item-overflow-stretch-002-ref.html
-fails-if(stylo) == grid-item-overflow-stretch-003.html grid-item-overflow-stretch-003-ref.html
-fails-if(stylo) == grid-item-overflow-stretch-004.html grid-item-overflow-stretch-004-ref.html
-fails-if(stylo) == grid-item-overflow-stretch-005.html grid-item-overflow-stretch-005-ref.html
-fails-if(stylo) == grid-item-overflow-stretch-006.html grid-item-overflow-stretch-006-ref.html
-fails-if(stylo) == grid-item-canvas-001.html grid-item-canvas-001-ref.html
-skip-if(Android) fails-if(stylo) == grid-item-button-001.html grid-item-button-001-ref.html
-fails-if(stylo) == grid-item-table-stretch-001.html grid-item-table-stretch-001-ref.html
-fails-if(stylo) == grid-item-table-stretch-002.html grid-item-table-stretch-002-ref.html
-fails-if(stylo) == grid-item-table-stretch-003.html grid-item-table-stretch-003-ref.html
-fails-if(stylo) == grid-item-table-stretch-004.html grid-item-table-stretch-004-ref.html
-fails-if(stylo) == grid-item-fieldset-stretch-001.html grid-item-fieldset-stretch-001-ref.html
-skip-if(Android) fails-if(stylo) == grid-item-video-stretch-001.html grid-item-video-stretch-001-ref.html # Huh, Android doesn't have webm support?
-skip-if(Android) fails-if(stylo) == grid-item-video-stretch-002.html grid-item-video-stretch-002-ref.html # Huh, Android doesn't have webm support?
-fails-if(stylo) == grid-item-input-stretch-001.html grid-item-input-stretch-001-ref.html
-fails-if(stylo) == grid-item-self-baseline-001.html grid-item-self-baseline-001-ref.html
-random-if(http.oscpu!="Linux\u0020i686") fails-if(stylo) == grid-item-content-baseline-001.html grid-item-content-baseline-001-ref.html # depends on exact Ahem baseline font metrics which seems to differ between platforms: bug 1310792
-random-if(http.oscpu!="Linux\u0020i686") fails-if(stylo) == grid-item-content-baseline-002.html grid-item-content-baseline-002-ref.html # ditto
-random-if(http.oscpu!="Linux\u0020i686") fails-if(stylo) == grid-item-mixed-baseline-001.html grid-item-mixed-baseline-001-ref.html # ditto
-random-if(http.oscpu!="Linux\u0020i686") fails-if(stylo) == grid-item-mixed-baseline-002.html grid-item-mixed-baseline-002-ref.html # ditto
-random-if(http.oscpu!="Linux\u0020i686") fails-if(stylo) == grid-item-mixed-baseline-003.html grid-item-mixed-baseline-003-ref.html # ditto
-skip-if(!gtkWidget) fails-if(stylo) == grid-item-mixed-baseline-004.html grid-item-mixed-baseline-004-ref.html # ditto
-fails-if(stylo) == grid-align-content-001.html grid-align-content-001-ref.html
-fails-if(stylo) == grid-justify-content-001.html grid-justify-content-001-ref.html
+fails-if(styloVsGecko) == grid-item-overflow-stretch-001.html grid-item-overflow-stretch-001-ref.html
+fails-if(styloVsGecko) == grid-item-overflow-stretch-002.html grid-item-overflow-stretch-002-ref.html
+fails-if(styloVsGecko) == grid-item-overflow-stretch-003.html grid-item-overflow-stretch-003-ref.html
+fails-if(styloVsGecko) == grid-item-overflow-stretch-004.html grid-item-overflow-stretch-004-ref.html
+fails-if(styloVsGecko) == grid-item-overflow-stretch-005.html grid-item-overflow-stretch-005-ref.html
+fails-if(styloVsGecko) == grid-item-overflow-stretch-006.html grid-item-overflow-stretch-006-ref.html
+fails-if(styloVsGecko) == grid-item-canvas-001.html grid-item-canvas-001-ref.html
+skip-if(Android) fails-if(styloVsGecko) == grid-item-button-001.html grid-item-button-001-ref.html
+fails-if(styloVsGecko) == grid-item-table-stretch-001.html grid-item-table-stretch-001-ref.html
+fails-if(styloVsGecko) == grid-item-table-stretch-002.html grid-item-table-stretch-002-ref.html
+fails-if(styloVsGecko) == grid-item-table-stretch-003.html grid-item-table-stretch-003-ref.html
+fails-if(styloVsGecko) == grid-item-table-stretch-004.html grid-item-table-stretch-004-ref.html
+fails-if(styloVsGecko) == grid-item-fieldset-stretch-001.html grid-item-fieldset-stretch-001-ref.html
+skip-if(Android) fails-if(styloVsGecko) == grid-item-video-stretch-001.html grid-item-video-stretch-001-ref.html # Huh, Android doesn't have webm support?
+skip-if(Android) fails-if(styloVsGecko) == grid-item-video-stretch-002.html grid-item-video-stretch-002-ref.html # Huh, Android doesn't have webm support?
+fails-if(styloVsGecko) == grid-item-input-stretch-001.html grid-item-input-stretch-001-ref.html
+fails-if(styloVsGecko) == grid-item-self-baseline-001.html grid-item-self-baseline-001-ref.html
+random-if(http.oscpu!="Linux\u0020i686") fails-if(styloVsGecko) == grid-item-content-baseline-001.html grid-item-content-baseline-001-ref.html # depends on exact Ahem baseline font metrics which seems to differ between platforms: bug 1310792
+random-if(http.oscpu!="Linux\u0020i686") fails-if(styloVsGecko) == grid-item-content-baseline-002.html grid-item-content-baseline-002-ref.html # ditto
+random-if(http.oscpu!="Linux\u0020i686") fails-if(styloVsGecko) == grid-item-mixed-baseline-001.html grid-item-mixed-baseline-001-ref.html # ditto
+random-if(http.oscpu!="Linux\u0020i686") fails-if(styloVsGecko) == grid-item-mixed-baseline-002.html grid-item-mixed-baseline-002-ref.html # ditto
+random-if(http.oscpu!="Linux\u0020i686") fails-if(styloVsGecko) == grid-item-mixed-baseline-003.html grid-item-mixed-baseline-003-ref.html # ditto
+skip-if(!gtkWidget) fails-if(styloVsGecko) == grid-item-mixed-baseline-004.html grid-item-mixed-baseline-004-ref.html # ditto
+fails-if(styloVsGecko) == grid-align-content-001.html grid-align-content-001-ref.html
+fails-if(styloVsGecko) == grid-justify-content-001.html grid-justify-content-001-ref.html
 skip-if(Android&&isDebugBuild) == grid-justify-content-002.html grid-justify-content-002-ref.html # Bug 1245884 - slow
 skip-if(Android&&isDebugBuild) == grid-justify-content-003.html grid-justify-content-003-ref.html # Bug 1245884 - slow
-skip-if(!gtkWidget) fails-if(stylo) == grid-container-baselines-001.html grid-container-baselines-001-ref.html
-skip-if(!gtkWidget) fails-if(stylo) == grid-container-baselines-002.html grid-container-baselines-002-ref.html
-skip-if(!gtkWidget) fails-if(stylo) == grid-container-baselines-003.html grid-container-baselines-003-ref.html
+skip-if(!gtkWidget) fails-if(styloVsGecko) == grid-container-baselines-001.html grid-container-baselines-001-ref.html
+skip-if(!gtkWidget) fails-if(styloVsGecko) == grid-container-baselines-002.html grid-container-baselines-002-ref.html
+skip-if(!gtkWidget) fails-if(styloVsGecko) == grid-container-baselines-003.html grid-container-baselines-003-ref.html
 == grid-container-baselines-004.html grid-container-baselines-004-ref.html
 == grid-container-synthesized-baseline-001-ref.html grid-container-synthesized-baseline-001-ref.html
 skip-if(Android&&isDebugBuild) == grid-column-gap-001.html grid-column-gap-001-ref.html # Bug 1245884 - slow
 == grid-column-gap-002.html grid-column-gap-002-ref.html
 == grid-column-gap-003.html grid-column-gap-003-ref.html
-fails-if(stylo) == grid-column-gap-004.html grid-column-gap-004-ref.html
-fails-if(stylo) == grid-row-gap-001.html grid-row-gap-001-ref.html
-fails-if(stylo) == grid-percent-grid-gap-001.html grid-percent-grid-gap-001-ref.html
+fails-if(styloVsGecko) == grid-column-gap-004.html grid-column-gap-004-ref.html
+fails-if(styloVsGecko) == grid-row-gap-001.html grid-row-gap-001-ref.html
+fails-if(styloVsGecko) == grid-percent-grid-gap-001.html grid-percent-grid-gap-001-ref.html
 skip-if(Android&&isDebugBuild) == grid-row-gap-002.html grid-row-gap-002-ref.html # Bug 1245884 - slow
 skip-if(Android&&isDebugBuild) == grid-row-gap-003.html grid-row-gap-003-ref.html # Bug 1245884 - slow
 skip-if(Android&&isDebugBuild) == grid-row-gap-004.html grid-row-gap-004-ref.html # Bug 1245884 - slow
-fails-if(stylo) == grid-row-gap-005.html grid-row-gap-005-ref.html
+fails-if(styloVsGecko) == grid-row-gap-005.html grid-row-gap-005-ref.html
 == grid-container-overflow-001.html grid-container-overflow-001-ref.html
-fails-if(stylo) == grid-item-margin-left-auto-001.html grid-item-margin-left-auto-001-ref.html
-fails-if(stylo) == grid-item-margin-left-auto-002.html grid-item-margin-left-auto-002-ref.html
-fails-if(stylo) == grid-item-margin-left-auto-003.html grid-item-margin-left-auto-003-ref.html
-fails-if(stylo) == grid-item-margin-left-auto-004.html grid-item-margin-left-auto-004-ref.html
-fails-if(stylo) == grid-item-margin-left-right-auto-001.html grid-item-margin-left-right-auto-001-ref.html
-fails-if(stylo) == grid-item-margin-left-right-auto-002.html grid-item-margin-left-right-auto-002-ref.html
-fails-if(stylo) == grid-item-margin-left-right-auto-003.html grid-item-margin-left-right-auto-003-ref.html
-fails-if(stylo) == grid-item-margin-left-right-auto-004.html grid-item-margin-left-right-auto-004-ref.html
-fails-if(stylo) == grid-item-margin-right-auto-001.html grid-item-margin-right-auto-001-ref.html
-fails-if(stylo) == grid-item-margin-right-auto-002.html grid-item-margin-right-auto-002-ref.html
-fails-if(stylo) == grid-item-margin-right-auto-003.html grid-item-margin-right-auto-003-ref.html
-fails-if(stylo) == grid-item-margin-right-auto-004.html grid-item-margin-right-auto-004-ref.html
-fails-if(stylo) == grid-container-min-max-width-height-001.html grid-container-min-max-width-height-001-ref.html
+fails-if(styloVsGecko) == grid-item-margin-left-auto-001.html grid-item-margin-left-auto-001-ref.html
+fails-if(styloVsGecko) == grid-item-margin-left-auto-002.html grid-item-margin-left-auto-002-ref.html
+fails-if(styloVsGecko) == grid-item-margin-left-auto-003.html grid-item-margin-left-auto-003-ref.html
+fails-if(styloVsGecko) == grid-item-margin-left-auto-004.html grid-item-margin-left-auto-004-ref.html
+fails-if(styloVsGecko) == grid-item-margin-left-right-auto-001.html grid-item-margin-left-right-auto-001-ref.html
+fails-if(styloVsGecko) == grid-item-margin-left-right-auto-002.html grid-item-margin-left-right-auto-002-ref.html
+fails-if(styloVsGecko) == grid-item-margin-left-right-auto-003.html grid-item-margin-left-right-auto-003-ref.html
+fails-if(styloVsGecko) == grid-item-margin-left-right-auto-004.html grid-item-margin-left-right-auto-004-ref.html
+fails-if(styloVsGecko) == grid-item-margin-right-auto-001.html grid-item-margin-right-auto-001-ref.html
+fails-if(styloVsGecko) == grid-item-margin-right-auto-002.html grid-item-margin-right-auto-002-ref.html
+fails-if(styloVsGecko) == grid-item-margin-right-auto-003.html grid-item-margin-right-auto-003-ref.html
+fails-if(styloVsGecko) == grid-item-margin-right-auto-004.html grid-item-margin-right-auto-004-ref.html
+fails-if(styloVsGecko) == grid-container-min-max-width-height-001.html grid-container-min-max-width-height-001-ref.html
 == grid-clamping-001.html grid-clamping-001-ref.html
 == grid-clamping-002.html grid-clamping-002-ref.html
 == grid-repeat-auto-fill-fit-001.html grid-repeat-auto-fill-fit-001-ref.html
 == grid-repeat-auto-fill-fit-002.html grid-repeat-auto-fill-fit-002-ref.html
 == grid-repeat-auto-fill-fit-003.html grid-repeat-auto-fill-fit-003-ref.html
 == grid-repeat-auto-fill-fit-004.html grid-repeat-auto-fill-fit-004-ref.html
 == grid-repeat-auto-fill-fit-005.html grid-repeat-auto-fill-fit-005-ref.html
 == grid-repeat-auto-fill-fit-006.html grid-repeat-auto-fill-fit-006-ref.html
 == grid-repeat-auto-fill-fit-007.html grid-repeat-auto-fill-fit-007-ref.html
 == grid-repeat-auto-fill-fit-008.html grid-repeat-auto-fill-fit-008-ref.html
 == grid-repeat-auto-fill-fit-009.html grid-repeat-auto-fill-fit-009-ref.html
-fails-if(stylo) == grid-repeat-auto-fill-fit-010.html grid-repeat-auto-fill-fit-010-ref.html
-fails-if(stylo) == grid-repeat-auto-fill-fit-011.html grid-repeat-auto-fill-fit-010-ref.html
+fails-if(styloVsGecko) == grid-repeat-auto-fill-fit-010.html grid-repeat-auto-fill-fit-010-ref.html
+fails-if(styloVsGecko) == grid-repeat-auto-fill-fit-011.html grid-repeat-auto-fill-fit-010-ref.html
 == grid-item-blockifying-001.html grid-item-blockifying-001-ref.html
 == grid-fragmentation-001.html grid-fragmentation-001-ref.html
 == grid-fragmentation-002.html grid-fragmentation-002-ref.html
 == grid-fragmentation-003.html grid-fragmentation-003-ref.html
 == grid-fragmentation-004.html grid-fragmentation-004-ref.html
 == grid-fragmentation-005.html grid-fragmentation-005-ref.html
 == grid-fragmentation-006.html grid-fragmentation-006-ref.html
 == grid-fragmentation-007.html grid-fragmentation-007-ref.html
@@ -223,17 +223,17 @@ asserts(0-10) == grid-fragmentation-015.
 == grid-fragmentation-dyn3-001.html grid-fragmentation-001-ref.html
 == grid-fragmentation-dyn4-001.html grid-fragmentation-001-ref.html
 == grid-fragmentation-dyn1-002.html grid-fragmentation-002-ref.html
 == grid-fragmentation-dyn3-002.html grid-fragmentation-002-ref.html
 == grid-fragmentation-dyn3-003.html grid-fragmentation-003-ref.html
 == grid-fragmentation-dyn4-004.html grid-fragmentation-004-ref.html
 == grid-fragmentation-dyn4-005.html grid-fragmentation-005-ref.html
 == grid-fragmentation-dyn5-005.html grid-fragmentation-005-ref.html
-skip-if(stylo) == grid-fragmentation-dyn1-006.html grid-fragmentation-006-ref.html
+skip-if(styloVsGecko) == grid-fragmentation-dyn1-006.html grid-fragmentation-006-ref.html
 == grid-fragmentation-dyn3-007.html grid-fragmentation-007-ref.html
 == grid-fragmentation-dyn5-007.html grid-fragmentation-007-ref.html
 == grid-fragmentation-dyn5-008.html grid-fragmentation-008-ref.html
 == grid-fragmentation-dyn3-009.html grid-fragmentation-009-ref.html
 == grid-fragmentation-dyn3-009.html grid-fragmentation-009-ref.html
 == grid-fragmentation-dyn4-015.html grid-fragmentation-015-ref.html
 == grid-fragmentation-dyn1-015.html grid-fragmentation-015-ref.html
 == grid-fragmentation-dyn1-016.html grid-fragmentation-016-ref.html
@@ -274,10 +274,10 @@ asserts(1-10) == grid-fragmentation-dyn4
 == grid-fragmentation-dyn2-028.html grid-fragmentation-028-ref.html
 == grid-fragmentation-dyn3-028.html grid-fragmentation-028-ref.html
 == grid-fragmentation-dyn4-028.html grid-fragmentation-028-ref.html
 == grid-fragmentation-dyn5-028.html grid-fragmentation-028-ref.html
 == grid-fragmentation-dyn1-029.html grid-fragmentation-029-ref.html
 == grid-fragmentation-dyn2-029.html grid-fragmentation-029-ref.html
 == grid-fragmentation-dyn2-030.html grid-fragmentation-030-ref.html
 == grid-fragmentation-dyn2-031.html grid-fragmentation-031-ref.html
-fails-if(stylo) == bug1306106.html bug1306106-ref.html
+fails-if(styloVsGecko) == bug1306106.html bug1306106-ref.html
 == grid-percent-intrinsic-sizing-001.html grid-percent-intrinsic-sizing-001-ref.html
--- a/layout/reftests/css-import/reftest.list
+++ b/layout/reftests/css-import/reftest.list
@@ -1,10 +1,10 @@
 == 290018-1.html 290018-ref.html
 == 436261-1.html 436261-ref.html
 == 436261-2.html 436261-ref.html
-fails-if(stylo) == 436261-3.html 436261-ref.html
+fails-if(styloVsGecko) == 436261-3.html 436261-ref.html
 == 444723-1.html 444723-ref.html
 == 444723-2.html 444723-ref.html
-fails-if(stylo) == 445415-1a.xhtml 445415-1-ref.xhtml
+fails-if(styloVsGecko) == 445415-1a.xhtml 445415-1-ref.xhtml
 == 445415-1b.xhtml 445415-1-ref.xhtml
 == 445415-2a.xhtml 445415-2-ref.xhtml
-fails-if(stylo) == 445415-2b.xhtml 445415-2-ref.xhtml
+fails-if(styloVsGecko) == 445415-2b.xhtml 445415-2-ref.xhtml
--- a/layout/reftests/css-invalid/default-style/reftest.list
+++ b/layout/reftests/css-invalid/default-style/reftest.list
@@ -1,5 +1,5 @@
 == input.html input-ref.html
 == button.html button-ref.html
-fails-if(stylo) == textarea.html textarea-ref.html
+fails-if(styloVsGecko) == textarea.html textarea-ref.html
 == select.html select-ref.html
 == fieldset.html fieldset-ref.html
--- a/layout/reftests/css-invalid/textarea/reftest.list
+++ b/layout/reftests/css-invalid/textarea/reftest.list
@@ -1,13 +1,13 @@
-fails-if(stylo) == textarea-valid.html textarea-ref.html
-fails-if(stylo) == textarea-customerror.html textarea-ref.html
-fails-if(stylo) == textarea-disabled.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-disabled.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-not-disabled.html textarea-ref.html
-fails-if(stylo) == textarea-readonly.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-readonly.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-not-readonly.html textarea-ref.html
-fails-if(stylo) == textarea-required-valid.html textarea-withtext-ref.html
-fails-if(stylo) == textarea-required-invalid.html textarea-ref.html
-fails-if(stylo) == textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
-fails-if(stylo) == textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
-fails-if(stylo) == textarea-fieldset-legend.html textarea-fieldset-legend-ref.html
+fails-if(styloVsGecko) == textarea-valid.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-customerror.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-disabled.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-disabled.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-not-disabled.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-readonly.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-readonly.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-not-readonly.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-required-valid.html textarea-withtext-ref.html
+fails-if(styloVsGecko) == textarea-required-invalid.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
+fails-if(styloVsGecko) == textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
+fails-if(styloVsGecko) == textarea-fieldset-legend.html textarea-fieldset-legend-ref.html
--- a/layout/reftests/css-mediaqueries/reftest.list
+++ b/layout/reftests/css-mediaqueries/reftest.list
@@ -11,9 +11,9 @@ fuzzy-if(Android,8,454) == mq_print_maxh
 == mq_print_maxwidth.xhtml mq_print-ref.xhtml
 
 == mq_print_maxwidth_updown.xhtml mq_print-ref.xhtml
 == mq_print_maxheight_updown.xhtml mq_print-ref.xhtml
 == mq_print_minheight_updown.xhtml mq_print-ref.xhtml
 == mq_print_minwidth_updown.xhtml mq_print-ref.xhtml
 
 == scoped-mq-update.html scoped-mq-update-ref.html
-fails-if(stylo) == system-metrics-1.html system-metrics-1-ref.html
+fails-if(styloVsGecko) == system-metrics-1.html system-metrics-1-ref.html
--- a/layout/reftests/css-optional/reftest.list
+++ b/layout/reftests/css-optional/reftest.list
@@ -1,10 +1,10 @@
 # Checking if these elements support :optional.
-fails-if(stylo) == css-optional-textarea.html css-optional-textarea-ref.html
+fails-if(styloVsGecko) == css-optional-textarea.html css-optional-textarea-ref.html
 == css-optional-input.html css-optional-input-ref.html
 == css-optional-select.html css-optional-select-ref.html
 == css-optional-button.html about:blank
 
 # Checking dynamic behavior.
 == css-optional-dyn-1.html css-optional-input-ref.html
 == css-optional-dyn-2.html about:blank
 
--- a/layout/reftests/css-parsing/reftest.list
+++ b/layout/reftests/css-parsing/reftest.list
@@ -1,9 +1,9 @@
 == at-rule-013.html at-rule-013-ref.html
-fails-if(stylo) == invalid-url-handling.xhtml invalid-url-handling-ref.xhtml
+fails-if(styloVsGecko) == invalid-url-handling.xhtml invalid-url-handling-ref.xhtml
 == pseudo-elements-1.html pseudo-elements-1-ref.html
 == invalid-attr-1.html invalid-attr-1-ref.html
 == at-rule-error-handling-import-1.html at-rule-error-handling-ref.html
 == at-rule-error-handling-media-1.html at-rule-error-handling-ref.html
 == invalid-font-face-descriptor-1.html invalid-font-face-descriptor-1-ref.html
 == two-dash-identifiers.html two-dash-identifiers-ref.html
 == supports-moz-bool-pref.html supports-moz-bool-pref-ref.html
--- a/layout/reftests/css-placeholder/reftest.list
+++ b/layout/reftests/css-placeholder/reftest.list
@@ -1,7 +1,7 @@
 include input/reftest.list
 include textarea/reftest.list
 
-fuzzy-if(skiaContent,1,4) fails-if(stylo) == css-restrictions.html css-restrictions-ref.html
-fails-if(stylo) == css-simple-styling.html css-simple-styling-ref.html
-fails-if(stylo) != css-background.html css-background-ref.html
-fuzzy-if(skiaContent,1,180) fails-if(stylo) == ignore-pseudo-class.html ignore-pseudo-class-ref.html
+fuzzy-if(skiaContent,1,4) fails-if(styloVsGecko) == css-restrictions.html css-restrictions-ref.html
+fails-if(styloVsGecko) == css-simple-styling.html css-simple-styling-ref.html
+fails-if(styloVsGecko) != css-background.html css-background-ref.html
+fuzzy-if(skiaContent,1,180) fails-if(styloVsGecko) == ignore-pseudo-class.html ignore-pseudo-class-ref.html
--- a/layout/reftests/css-placeholder/textarea/reftest.list
+++ b/layout/reftests/css-placeholder/textarea/reftest.list
@@ -3,24 +3,24 @@
 # text colour without changing the caret which means that the tested page has
 # a black caret with a grey text and the reference has a grey caret with grey
 # text. The only thing that is doable is to make the caret grey in the tested
 # page but that would make the test moot because a failure wouldn't be seen.
 # A real way to fix this would be to be able to style the caret or to implement
 # ::value (bug 648643), depending of the ::value behaviour (it could change the
 # caret colour and the text colour or just the text colour).
 
-fails-if(stylo) == placeholder-simple.html placeholder-simple-ref.html
+fails-if(styloVsGecko) == placeholder-simple.html placeholder-simple-ref.html
 # needs-focus == placeholder-focus.html placeholder-focus-ref.html
-needs-focus fails-if(stylo) == placeholder-blur.html placeholder-simple-ref.html
-fails-if(stylo) == placeholder-value.html placeholder-value-ref.html
-fails-if(stylo) == placeholder-empty-string.html placeholder-empty-string-ref.html
-fails-if(stylo) == placeholder-add.html placeholder-simple-ref.html
-fails-if(stylo) == placeholder-removal.html textarea-ref.html
-fails-if(stylo) == placeholder-value-set.html placeholder-value-ref.html
-fails-if(stylo) == placeholder-value-unset.html placeholder-simple-ref.html
-fails-if(stylo) == placeholder-value-reset.html placeholder-simple-ref.html
-fails-if(stylo) == placeholdershown.html placeholdershown-ref.html
+needs-focus fails-if(styloVsGecko) == placeholder-blur.html placeholder-simple-ref.html
+fails-if(styloVsGecko) == placeholder-value.html placeholder-value-ref.html
+fails-if(styloVsGecko) == placeholder-empty-string.html placeholder-empty-string-ref.html
+fails-if(styloVsGecko) == placeholder-add.html placeholder-simple-ref.html
+fails-if(styloVsGecko) == placeholder-removal.html textarea-ref.html
+fails-if(styloVsGecko) == placeholder-value-set.html placeholder-value-ref.html
+fails-if(styloVsGecko) == placeholder-value-unset.html placeholder-simple-ref.html
+fails-if(styloVsGecko) == placeholder-value-reset.html placeholder-simple-ref.html
+fails-if(styloVsGecko) == placeholdershown.html placeholdershown-ref.html
 == css-resize.html css-resize-ref.html
-fails-if(stylo) == css-display.html placeholder-simple-ref.html
+fails-if(styloVsGecko) == css-display.html placeholder-simple-ref.html
 # We can't check except by verifying that the output is different.
 # Same reasons as focus issues explained above.
-fails-if(stylo) != css-opacity.html placeholder-simple-ref.html
+fails-if(styloVsGecko) != css-opacity.html placeholder-simple-ref.html
--- a/layout/reftests/css-required/reftest.list
+++ b/layout/reftests/css-required/reftest.list
@@ -1,10 +1,10 @@
 # Checking if these types/elements support :required
-fails-if(stylo) == css-required-textarea.html css-required-textarea-ref.html
+fails-if(styloVsGecko) == css-required-textarea.html css-required-textarea-ref.html
 == css-required-radio.html css-required-radio-ref.html
 == css-required-text.html css-required-text-ref.html
 == css-required-checkbox.html css-required-checkbox-ref.html
 == css-required-file.html css-required-file-ref.html
 == css-required-password.html css-required-password-ref.html
 == css-required-tel.html css-required-tel-ref.html
 == css-required-search.html css-required-search-ref.html
 == css-required-select.html css-required-select-ref.html
--- a/layout/reftests/css-ruby/reftest.list
+++ b/layout/reftests/css-ruby/reftest.list
@@ -1,55 +1,55 @@
 == bidi-1.html bidi-1-ref.html
 == bidi-2.html bidi-2-ref.html
 == box-generation-1.html box-generation-1-ref.html
 == box-generation-2.html box-generation-2-ref.html
 == box-generation-3.html box-generation-3-ref.html
 == box-generation-4.html box-generation-4-ref.html
 == box-generation-5.html box-generation-5-ref.html
-fails-if(stylo) == box-properties-1.html box-properties-1-ref.html
-fails-if(stylo) == box-properties-2.html box-properties-2-ref.html
-fails-if(stylo) == box-properties-3.html box-properties-3-ref.html
-fails-if(stylo) == box-properties-4.html box-properties-4-ref.html
+fails-if(styloVsGecko) == box-properties-1.html box-properties-1-ref.html
+fails-if(styloVsGecko) == box-properties-2.html box-properties-2-ref.html
+fails-if(styloVsGecko) == box-properties-3.html box-properties-3-ref.html
+fails-if(styloVsGecko) == box-properties-4.html box-properties-4-ref.html
 == dynamic-insertion-1.html dynamic-insertion-1-ref.html
 == dynamic-insertion-2.html dynamic-insertion-2-ref.html
-fails-if(stylo) == dynamic-insertion-3.html dynamic-insertion-3-ref.html
+fails-if(styloVsGecko) == dynamic-insertion-3.html dynamic-insertion-3-ref.html
 == dynamic-removal-1.html dynamic-removal-1-ref.html
 == dynamic-removal-2.html dynamic-removal-2-ref.html
 == dynamic-removal-3.html dynamic-removal-3-ref.html
 == float-handling.html float-handling-ref.html
 test-pref(dom.meta-viewport.enabled,true) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == inflated-ruby-1.html inflated-ruby-1-ref.html
 == intra-level-whitespace-1.html intra-level-whitespace-1-ref.html
 == intra-level-whitespace-2.html intra-level-whitespace-2-ref.html
 == intra-level-whitespace-3.html intra-level-whitespace-3-ref.html
 == intrinsic-isize-1.html intrinsic-isize-1-ref.html
 == intrinsic-isize-2.html intrinsic-isize-2-ref.html
-fails-if(stylo) == justification-1.html justification-1-ref.html
-fails-if(stylo) == justification-2.html justification-2-ref.html
+fails-if(styloVsGecko) == justification-1.html justification-1-ref.html
+fails-if(styloVsGecko) == justification-2.html justification-2-ref.html
 fuzzy-if(winWidget,255,792) == lang-specific-style-1.html lang-specific-style-1-ref.html # bug 1134947
 == line-breaking-1.html line-breaking-1-ref.html
-fails-if(stylo) == line-breaking-2.html line-breaking-2-ref.html
-fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),3,2) skip-if(stylo) == line-break-suppression-1.html line-break-suppression-1-ref.html
-fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),3,2) skip-if(stylo) == line-break-suppression-2.html line-break-suppression-2-ref.html
-skip-if(stylo) == line-break-suppression-3.html line-break-suppression-3-ref.html
+fails-if(styloVsGecko) == line-breaking-2.html line-breaking-2-ref.html
+fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),3,2) skip-if(styloVsGecko) == line-break-suppression-1.html line-break-suppression-1-ref.html
+fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),3,2) skip-if(styloVsGecko) == line-break-suppression-2.html line-break-suppression-2-ref.html
+skip-if(styloVsGecko) == line-break-suppression-3.html line-break-suppression-3-ref.html
 == line-break-suppression-4.html line-break-suppression-4-ref.html
 == line-break-suppression-5.html line-break-suppression-5-ref.html
 == line-height-1.html line-height-1-ref.html
 == line-height-2.html line-height-2-ref.html
 == line-height-3.html line-height-3-ref.html
 == line-height-4.html line-height-4-ref.html
-test-pref(font.minimum-size.ja,16) fails-if(stylo) == min-font-size-1.html min-font-size-1-ref.html
-skip-if(stylo) load nested-ruby-1.html
+test-pref(font.minimum-size.ja,16) fails-if(styloVsGecko) == min-font-size-1.html min-font-size-1-ref.html
+skip-if(styloVsGecko) load nested-ruby-1.html
 == no-transform.html no-transform-ref.html
-fails-if(stylo) == relative-positioning-1.html relative-positioning-1-ref.html
+fails-if(styloVsGecko) == relative-positioning-1.html relative-positioning-1-ref.html
 == relative-positioning-2.html relative-positioning-2-ref.html
-fails-if(stylo) == ruby-align-1.html ruby-align-1-ref.html
-fails-if(stylo) == ruby-align-1a.html ruby-align-1-ref.html
-fails-if(stylo) == ruby-align-2.html ruby-align-2-ref.html
-fails-if(stylo) == ruby-align-2a.html ruby-align-2-ref.html
+fails-if(styloVsGecko) == ruby-align-1.html ruby-align-1-ref.html
+fails-if(styloVsGecko) == ruby-align-1a.html ruby-align-1-ref.html
+fails-if(styloVsGecko) == ruby-align-2.html ruby-align-2-ref.html
+fails-if(styloVsGecko) == ruby-align-2a.html ruby-align-2-ref.html
 == ruby-position-horizontal.html ruby-position-horizontal-ref.html
 == ruby-position-vertical-lr.html ruby-position-vertical-lr-ref.html
 == ruby-position-vertical-rl.html ruby-position-vertical-rl-ref.html
 != ruby-reflow-1-opaqueruby.html ruby-reflow-1-noruby.html
 fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),13,1) == ruby-reflow-1-transparentruby.html ruby-reflow-1-noruby.html
 == ruby-span-1.html ruby-span-1-ref.html
 == ruby-whitespace-1.html ruby-whitespace-1-ref.html
 == ruby-whitespace-2.html ruby-whitespace-2-ref.html
--- a/layout/reftests/css-selectors/reftest.list
+++ b/layout/reftests/css-selectors/reftest.list
@@ -1,6 +1,6 @@
 == state-dependent-in-any.html state-dependent-in-any-ref.html
 == attr-case-insensitive-1.html attr-case-insensitive-1-ref.html
 == sibling-combinators-on-anon-content-1.xhtml sibling-combinators-on-anon-content-ref.xhtml
 == sibling-combinators-on-anon-content-2.xhtml sibling-combinators-on-anon-content-ref.xhtml
-fails-if(stylo) == nth-child-1.html nth-child-ref.html
-fails-if(stylo) == nth-child-2.html nth-child-ref.html
+fails-if(styloVsGecko) == nth-child-1.html nth-child-ref.html
+fails-if(styloVsGecko) == nth-child-2.html nth-child-ref.html
--- a/layout/reftests/css-ui-invalid/default-style/reftest.list
+++ b/layout/reftests/css-ui-invalid/default-style/reftest.list
@@ -1,10 +1,10 @@
 == input.html input-ref.html
 == button.html button-ref.html
-fails-if(stylo) == textarea.html textarea-ref.html
+fails-if(styloVsGecko) == textarea.html textarea-ref.html
 == select.html select-ref.html
 == fieldset.html fieldset-ref.html
 == output.html output-ref.html
 random-if(winWidget) needs-focus == input-focus.html input-focus-ref.html # Intermittent failures, bug 660224
 needs-focus == button-focus.html button-focus-ref.html
-needs-focus fails-if(stylo) == textarea-focus.html textarea-focus-ref.html
+needs-focus fails-if(styloVsGecko) == textarea-focus.html textarea-focus-ref.html
 random-if(winWidget) needs-focus == select-focus.html select-focus-ref.html # Intermittent failures, bug 660224
--- a/layout/reftests/css-ui-invalid/textarea/reftest.list
+++ b/layout/reftests/css-ui-invalid/textarea/reftest.list
@@ -1,15 +1,15 @@
-fails-if(stylo) == textarea-valid.html textarea-ref.html
-fails-if(stylo) == textarea-customerror.html textarea-ref.html
-fails-if(stylo) == textarea-disabled.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-disabled.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-not-disabled.html textarea-ref.html
-fails-if(stylo) == textarea-readonly.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-readonly.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-not-readonly-not-changed.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-not-readonly-changed.html textarea-ref.html
-fails-if(stylo) == textarea-required-valid.html textarea-withtext-ref.html
-fails-if(stylo) == textarea-required-invalid.html textarea-ref.html
-fails-if(stylo) == textarea-required-invalid-changed.html textarea-ref.html
-fails-if(stylo) == textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
-fails-if(stylo) == textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
-fails-if(stylo) == textarea-novalidate.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-valid.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-customerror.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-disabled.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-disabled.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-not-disabled.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-readonly.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-readonly.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-not-readonly-not-changed.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-not-readonly-changed.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-required-valid.html textarea-withtext-ref.html
+fails-if(styloVsGecko) == textarea-required-invalid.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-required-invalid-changed.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
+fails-if(styloVsGecko) == textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
+fails-if(styloVsGecko) == textarea-novalidate.html textarea-ref.html
--- a/layout/reftests/css-ui-valid/textarea/reftest.list
+++ b/layout/reftests/css-ui-valid/textarea/reftest.list
@@ -1,17 +1,17 @@
-fails-if(stylo) == textarea-valid.html textarea-ref.html
-fails-if(stylo) == textarea-customerror.html textarea-ref.html
-fails-if(stylo) == textarea-disabled.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-disabled.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-not-disabled.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-not-disabled-changed.html textarea-ref.html
-fails-if(stylo) == textarea-readonly.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-readonly.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-not-readonly.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-not-readonly-changed.html textarea-ref.html
-fails-if(stylo) == textarea-required-valid.html textarea-withtext-ref.html
-fails-if(stylo) == textarea-required-valid-changed.html textarea-withtext-ref.html
-fails-if(stylo) == textarea-required-invalid.html textarea-ref.html
-fails-if(stylo) == textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
-fails-if(stylo) == textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
-fails-if(stylo) == textarea-fieldset-legend.html textarea-fieldset-legend-ref.html
-fails-if(stylo) == textarea-novalidate.html textarea-withtext-ref.html
+fails-if(styloVsGecko) == textarea-valid.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-customerror.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-disabled.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-disabled.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-not-disabled.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-not-disabled-changed.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-readonly.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-readonly.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-not-readonly.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-not-readonly-changed.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-required-valid.html textarea-withtext-ref.html
+fails-if(styloVsGecko) == textarea-required-valid-changed.html textarea-withtext-ref.html
+fails-if(styloVsGecko) == textarea-required-invalid.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
+fails-if(styloVsGecko) == textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
+fails-if(styloVsGecko) == textarea-fieldset-legend.html textarea-fieldset-legend-ref.html
+fails-if(styloVsGecko) == textarea-novalidate.html textarea-withtext-ref.html
--- a/layout/reftests/css-valid/textarea/reftest.list
+++ b/layout/reftests/css-valid/textarea/reftest.list
@@ -1,13 +1,13 @@
-fails-if(stylo) == textarea-valid.html textarea-ref.html
-fails-if(stylo) == textarea-customerror.html textarea-ref.html
-fails-if(stylo) == textarea-disabled.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-disabled.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-not-disabled.html textarea-ref.html
-fails-if(stylo) == textarea-readonly.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-readonly.html textarea-ref.html
-fails-if(stylo) == textarea-dyn-not-readonly.html textarea-ref.html
-fails-if(stylo) == textarea-required-valid.html textarea-withtext-ref.html
-fails-if(stylo) == textarea-required-invalid.html textarea-ref.html
-fails-if(stylo) == textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
-fails-if(stylo) == textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
-fails-if(stylo) == textarea-fieldset-legend.html textarea-fieldset-legend-ref.html
+fails-if(styloVsGecko) == textarea-valid.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-customerror.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-disabled.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-disabled.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-not-disabled.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-readonly.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-readonly.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-dyn-not-readonly.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-required-valid.html textarea-withtext-ref.html
+fails-if(styloVsGecko) == textarea-required-invalid.html textarea-ref.html
+fails-if(styloVsGecko) == textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
+fails-if(styloVsGecko) == textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
+fails-if(styloVsGecko) == textarea-fieldset-legend.html textarea-fieldset-legend-ref.html
--- a/layout/reftests/css-valuesandunits/reftest.list
+++ b/layout/reftests/css-valuesandunits/reftest.list
@@ -4,12 +4,12 @@
 == unit-rem-iframe.html unit-rem-ref-iframe.html
 == unit-rem-root-fontsize.html unit-rem-ref-root-fontsize.html
 == unit-rem-root-fontsize.html unit-rem-ref2-root-fontsize.html
 == unit-rem-root-width.html unit-rem-ref-root-width.html
 == unit-rem.svg unit-rem-ref.svg
 == unit-vh-vw.html unit-vh-vw-ref.html
 == unit-vh-vw-zoom.html unit-vh-vw-zoom-ref.html
 == unit-vh-vw-overflow-auto.html unit-vh-vw-overflow-auto-ref.html
-fails-if(stylo) == unit-vh-vw-overflow-scroll.html unit-vh-vw-overflow-scroll-ref.html
-fails-if(stylo) == unit-vh-vw-overflow-scroll-x.html unit-vh-vw-overflow-scroll-x-ref.html
-fails-if(stylo) == unit-vh-vw-overflow-scroll-y.html unit-vh-vw-overflow-scroll-y-ref.html
+fails-if(styloVsGecko) == unit-vh-vw-overflow-scroll.html unit-vh-vw-overflow-scroll-ref.html
+fails-if(styloVsGecko) == unit-vh-vw-overflow-scroll-x.html unit-vh-vw-overflow-scroll-x-ref.html
+fails-if(styloVsGecko) == unit-vh-vw-overflow-scroll-y.html unit-vh-vw-overflow-scroll-y-ref.html
 skip-if(Android) != unit-vh-vw-overflow-auto.html unit-vh-vw-overflow-scroll.html
--- a/layout/reftests/details-summary/reftest.list
+++ b/layout/reftests/details-summary/reftest.list
@@ -60,19 +60,19 @@
 # Various properties on details or summary
 == details-display-inline.html details-display-inline-ref.html
 == details-percentage-height-children.html details-percentage-height-children-ref.html
 == details-absolute-children.html details-absolute-children-ref.html
 == details-three-columns.html details-three-columns-ref.html
 == details-writing-mode.html details-writing-mode-ref.html
 == details-in-ol.html details-in-ol-ref.html
 == summary-three-columns.html summary-three-columns-ref.html
-fails-if(stylo) == details-first-line.html details-first-line-ref.html
-fails-if(stylo) == open-details-first-line-1.html open-details-first-line-ref.html
-fails-if(stylo) == open-details-first-line-2.html open-details-first-line-ref.html
+fails-if(styloVsGecko) == details-first-line.html details-first-line-ref.html
+fails-if(styloVsGecko) == open-details-first-line-1.html open-details-first-line-ref.html
+fails-if(styloVsGecko) == open-details-first-line-2.html open-details-first-line-ref.html
 
 # Dispatch mouse click to summary
 == mouse-click-single-summary.html open-single-summary.html
 == mouse-click-twice-single-summary.html single-summary.html
 == mouse-click-open-single-summary.html single-summary.html
 == mouse-click-twice-open-single-summary.html open-single-summary.html
 == mouse-click-open-second-summary.html open-multiple-summary.html
 == mouse-click-overflow-hidden-details.html overflow-hidden-open-details.html
--- a/layout/reftests/dom/reftest.list
+++ b/layout/reftests/dom/reftest.list
@@ -44,12 +44,12 @@
 == multipleinsertionpoints-insertmultiple.xhtml multipleinsertionpoints-ref.xhtml
 
 # test appending some nodes whose frame construction should be done lazily
 # followed by appending a node that might not be done lazily
 == multipleappendwithxul.xhtml multipleappendwithxul-ref.xhtml
 == multipleappendwithinput.xhtml multipleappendwithinput-ref.xhtml
 == multipleappendwitheditable.xhtml multipleappendwitheditable-ref.xhtml
 
-fails-if(stylo) == xbl-children-1.xhtml xbl-children-1-ref.xhtml
+fails-if(styloVsGecko) == xbl-children-1.xhtml xbl-children-1-ref.xhtml
 == xbl-children-2.xhtml about:blank
 == xbl-children-3.xhtml xbl-children-3-ref.html
 == xbl-children-4.xhtml about:blank
--- a/layout/reftests/first-letter/reftest.list
+++ b/layout/reftests/first-letter/reftest.list
@@ -9,54 +9,54 @@
 == nested-1a.html nested-1-ref.html
 == nested-1b.html nested-1-ref.html
 == nested-1c.html nested-1-ref.html
 == nested-1d.html nested-1-ref.html
 == nested-1e.html nested-1-ref.html
 == nested-1f.html nested-1-ref.html
 == nested-1g.html nested-1-ref.html
 == quote-1a.html quote-1-ref.html
-fails-if(!stylo) == quote-1b.html quote-1-ref.html # bug 509685
-fails-if(!stylo) == quote-1c.html quote-1-ref.html # bug 509685
+fails-if(!styloVsGecko) == quote-1b.html quote-1-ref.html # bug 509685
+fails-if(!styloVsGecko) == quote-1c.html quote-1-ref.html # bug 509685
 == quote-1c.html quote-1b.html
-fails-if(!stylo) == quote-1d.html quote-1-ref.html
+fails-if(!styloVsGecko) == quote-1d.html quote-1-ref.html
 == quote-1d.html quote-1b.html
-fails-if(!stylo) == quote-1e.html quote-1-ref.html # bug 509685
+fails-if(!styloVsGecko) == quote-1e.html quote-1-ref.html # bug 509685
 == quote-1e.html quote-1b.html
 == quote-1f.html quote-1-ref.html
-fails-if(!stylo) fails-if(stylo) == dynamic-1.html dynamic-1-ref.html # bug 8253
+fails-if(!styloVsGecko) fails-if(styloVsGecko) == dynamic-1.html dynamic-1-ref.html # bug 8253
 random-if(d2d) == dynamic-2.html dynamic-2-ref.html
-fails-if(stylo) asserts-if(stylo,6) == dynamic-3a.html dynamic-3-ref.html
-fails-if(stylo) asserts-if(stylo,6) == dynamic-3b.html dynamic-3-ref.html
+fails-if(styloVsGecko) asserts-if(styloVsGecko,6) == dynamic-3a.html dynamic-3-ref.html
+fails-if(styloVsGecko) asserts-if(styloVsGecko,6) == dynamic-3b.html dynamic-3-ref.html
 == 23605-1.html 23605-1-ref.html
 == 23605-2.html 23605-2-ref.html
 == 23605-3.html 23605-3-ref.html
 == 23605-4.html 23605-4-ref.html
 == 23605-5.html 23605-5-ref.html
 == 23605-6.html 23605-6-ref.html
 != 229764-1.html 229764-ref.html
-fails-if(stylo) == 229764-2.html 229764-ref.html
+fails-if(styloVsGecko) == 229764-2.html 229764-ref.html
 == 329069-1.html 329069-1-ref.html
 fails-if(Android) == 329069-2.html 329069-2-ref.html # Bug 999139
 == 329069-3.html 329069-3-ref.html
 == 329069-4.html 329069-4-ref.html
 HTTP(..) == 329069-5.html 329069-5-ref.html
 == 342120-1.xhtml 342120-1-ref.xhtml
-fails-if(stylo) asserts-if(stylo,6) == 379799-1.html 379799-1-ref.html
+fails-if(styloVsGecko) asserts-if(styloVsGecko,6) == 379799-1.html 379799-1-ref.html
 == 399941-1.html 399941-1-ref.html
 == 399941-2.html 399941-2-ref.html
 == 399941-3.html 399941-3-ref.html
 == 399941-4.html 399941-4-ref.html
 == 399941-5.html 399941-5-ref.html
 == 399941-6.html 399941-6-ref.html
 == 399941-7.html 399941-7-ref.html
 == 399941-8.html 399941-8-ref.html
 == 399941-9.html 399941-9-ref.html
 == 429968-1a.html 429968-1-ref.html
-fails-if(stylo) == 429968-1b.html 429968-1-ref.html
+fails-if(styloVsGecko) == 429968-1b.html 429968-1-ref.html
 == 429968-2a.html 429968-2-ref.html
 == 429968-2b.html 429968-2-ref.html
 == 429968-2c.html 429968-2-ref.html
 == 441418-1.html 441418-1-ref.html
 == 469227-1.html 469227-1-ref.html
 == 484400-1.html 484400-1-ref.html
 == 594303-1.html 594303-1-ref.html
 fails-if(winWidget||cocoaWidget) == 617869-1.html 617869-1-ref.html
--- a/layout/reftests/first-line/reftest.list
+++ b/layout/reftests/first-line/reftest.list
@@ -1,37 +1,37 @@
 # basic functionality
-fails-if(stylo) == basic-1.html basic-ref.html
+fails-if(styloVsGecko) == basic-1.html basic-ref.html
 
 # handling of out-of-flows when ::first-line happens
 == out-of-flow-1a.html out-of-flow-1-ref.html
-fails-if(stylo) == out-of-flow-1b.html out-of-flow-1-ref.html
+fails-if(styloVsGecko) == out-of-flow-1b.html out-of-flow-1-ref.html
 == out-of-flow-1c.html out-of-flow-1-ref.html
-fails fails-if(stylo) == out-of-flow-1d.html out-of-flow-1-ref.html # bug 396645
+fails fails-if(styloVsGecko) == out-of-flow-1d.html out-of-flow-1-ref.html # bug 396645
 
 # parent style context correct
 == parent-style-1.html parent-style-1-ref.html
 == parent-style-2.html parent-style-2-ref.html
 == parent-style-3.html parent-style-3-ref.html
 
 # stress-tests
-skip-if(stylo) load stress-1.html # assertion test
+skip-if(styloVsGecko) load stress-1.html # assertion test
 == stress-2.html stress-2-ref.html # assertion + rendering test
 load stress-3.html # assertion test
 load stress-4.html # assertion/crash test.
 load stress-5.html # assertion/crash test
 load stress-6.html # assertion/crash test
 load stress-7.html # assertion/crash test
 == stress-8.html stress-8-ref.html # assertion/crash test
 == stress-9.html stress-9-ref.html # assertion/crash test
 load stress-10.html # crash test
 == stress-11.xhtml stress-11-ref.xhtml
 
-fails-if(stylo) == border-not-apply.html border-not-apply-ref.html
-fails-if(stylo) == 287088-1.html 287088-1-ref.html
-fails-if(stylo) == 287088-2.html 287088-2-ref.html
-fails-if(stylo) == 403177-1.html 403177-1-ref.html
-fails-if(stylo) == 469227-2.html 469227-2-ref.html
-fails-if(stylo) == 469227-3.html 469227-3-ref.html
+fails-if(styloVsGecko) == border-not-apply.html border-not-apply-ref.html
+fails-if(styloVsGecko) == 287088-1.html 287088-1-ref.html
+fails-if(styloVsGecko) == 287088-2.html 287088-2-ref.html
+fails-if(styloVsGecko) == 403177-1.html 403177-1-ref.html
+fails-if(styloVsGecko) == 469227-2.html 469227-2-ref.html
+fails-if(styloVsGecko) == 469227-3.html 469227-3-ref.html
 
-fails-if(stylo) == restyle-inside-first-line.html restyle-inside-first-line-ref.html
-fails-if(stylo) == font-styles.html font-styles-ref.html
-fuzzy-if(OSX==1010,1,2) fails-if(stylo) == font-styles-nooverflow.html font-styles-ref.html
+fails-if(styloVsGecko) == restyle-inside-first-line.html restyle-inside-first-line-ref.html
+fails-if(styloVsGecko) == font-styles.html font-styles-ref.html
+fuzzy-if(OSX==1010,1,2) fails-if(styloVsGecko) == font-styles-nooverflow.html font-styles-ref.html
--- a/layout/reftests/flexbox/reftest.list
+++ b/layout/reftests/flexbox/reftest.list
@@ -8,17 +8,17 @@
 # Where possible & practical, we should try to address these so we can migrate
 # tests over to the w3c-css directory, so that they can become part of the
 # W3C's test suite.
 
 # SUBDIRECTORY: Reftests for paginated flex containers
 include pagination/reftest.list
 
 # Tests for cross-axis alignment (align-self / align-items properties)
-fails fails-if(stylo) == flexbox-align-self-baseline-horiz-2.xhtml  flexbox-align-self-baseline-horiz-2-ref.xhtml # bug 793456, and possibly others
+fails fails-if(styloVsGecko) == flexbox-align-self-baseline-horiz-2.xhtml  flexbox-align-self-baseline-horiz-2-ref.xhtml # bug 793456, and possibly others
 # This one fails on windows R (but not Ru, strangely) and GTK.
 # On Windows R and GTK, the single-line <label> flex item has a different
 # background size in test vs. ref
 fuzzy-if(cocoaWidget,1,2) random-if(winWidget||gtkWidget) skip-if(Android) == flexbox-align-self-baseline-horiz-3.xhtml  flexbox-align-self-baseline-horiz-3-ref.xhtml # XXXdholbert investigate the random-if. The skip-if(Android) is because checkbox/radio appearance:none doesn't work as expected.
 == flexbox-align-self-baseline-horiz-4.xhtml flexbox-align-self-baseline-horiz-4-ref.xhtml
 
 # Tests for box-sizing on flex containers and flex items.
 == flexbox-box-sizing-on-container-horiz-1.html flexbox-box-sizing-on-container-horiz-1-ref.html
@@ -38,21 +38,21 @@ fuzzy-if(cocoaWidget,1,2) random-if(winW
 == flexbox-dyn-changePadding-1a.xhtml flexbox-dyn-changePadding-1-ref.xhtml
 == flexbox-dyn-changePadding-1b.xhtml flexbox-dyn-changePadding-1-ref.xhtml
 
 # Tests for dynamic insertions of content into a flex container
 # (with existing [div | span | text] inside the flexbox, and new content
 # inserted adjacent to that existing content.)
 fuzzy-if(skiaContent,3,10) == flexbox-dyn-insertAroundDiv-1.xhtml flexbox-dyn-insertAroundDiv-1-ref.xhtml
 == flexbox-dyn-insertAroundDiv-2.xhtml flexbox-dyn-insertAroundDiv-2-ref.xhtml
-fuzzy-if(skiaContent,3,10) fails-if(stylo) == flexbox-dyn-insertAroundDiv-3.xhtml flexbox-dyn-insertAroundDiv-3-ref.xhtml
+fuzzy-if(skiaContent,3,10) fails-if(styloVsGecko) == flexbox-dyn-insertAroundDiv-3.xhtml flexbox-dyn-insertAroundDiv-3-ref.xhtml
 
 fuzzy-if(skiaContent,3,10) == flexbox-dyn-insertAroundSpan-1.xhtml flexbox-dyn-insertAroundDiv-1-ref.xhtml
 == flexbox-dyn-insertAroundSpan-2.xhtml flexbox-dyn-insertAroundDiv-2-ref.xhtml
-fuzzy-if(skiaContent,3,10) fails-if(stylo) == flexbox-dyn-insertAroundSpan-3.xhtml flexbox-dyn-insertAroundDiv-3-ref.xhtml
+fuzzy-if(skiaContent,3,10) fails-if(styloVsGecko) == flexbox-dyn-insertAroundSpan-3.xhtml flexbox-dyn-insertAroundDiv-3-ref.xhtml
 
 == flexbox-dyn-insertAroundText-1.xhtml flexbox-dyn-insertAroundText-1-ref.xhtml
 == flexbox-dyn-insertAroundText-2.xhtml flexbox-dyn-insertAroundText-2-ref.xhtml
 == flexbox-dyn-insertAroundText-3.xhtml flexbox-dyn-insertAroundText-3-ref.xhtml
 
 # Variant of one of the above tests, to regression-test an invalidation issue
 == flexbox-dyn-insertEmptySpan-1.xhtml flexbox-dyn-insertEmptySpan-1-ref.xhtml
 
@@ -65,32 +65,32 @@ fuzzy-if(skiaContent,3,10) fails-if(styl
 == flexbox-float-1a.xhtml  flexbox-float-1-ref.xhtml
 == flexbox-float-1b.xhtml  flexbox-float-1-ref.xhtml
 == flexbox-float-1c.xhtml  flexbox-float-1-ref.xhtml
 == flexbox-float-1d.xhtml  flexbox-float-1-ref.xhtml
 == flexbox-float-2a.xhtml  flexbox-float-2-ref.xhtml
 == flexbox-float-2b.xhtml  flexbox-float-2-ref.xhtml
 
 # Tests for the order in which we paint flex items
-fails-if(!stylo) == flexbox-paint-ordering-3.html  flexbox-paint-ordering-3-ref.html # bug 874718
+fails-if(!styloVsGecko) == flexbox-paint-ordering-3.html  flexbox-paint-ordering-3-ref.html # bug 874718
 
 # Tests for handling of absolutely/fixed/relatively-positioned flex items.
 == flexbox-position-absolute-1.xhtml  flexbox-position-absolute-1-ref.xhtml
 == flexbox-position-absolute-2.xhtml  flexbox-position-absolute-2-ref.xhtml
 == flexbox-position-absolute-3.xhtml  flexbox-position-absolute-3-ref.xhtml
 == flexbox-position-absolute-4.xhtml  flexbox-position-absolute-4-ref.xhtml
 == flexbox-position-fixed-3.xhtml     flexbox-position-fixed-3-ref.xhtml
 fuzzy-if(Android,16,400) == flexbox-position-fixed-1.xhtml     flexbox-position-fixed-1-ref.xhtml
 fuzzy-if(Android,16,400) == flexbox-position-fixed-2.xhtml     flexbox-position-fixed-2-ref.xhtml
 == flexbox-position-fixed-3.xhtml     flexbox-position-fixed-3-ref.xhtml
 == flexbox-position-fixed-4.xhtml     flexbox-position-fixed-4-ref.xhtml
 
 # Tests for inline content in a flexbox that gets wrapped in an anonymous block
-fails-if(!stylo) == flexbox-inlinecontent-horiz-1a.xhtml flexbox-inlinecontent-horiz-1-ref.xhtml # reference case rendering is incorrect; bug 858333
-fails-if(!stylo) == flexbox-inlinecontent-horiz-1b.xhtml flexbox-inlinecontent-horiz-1-ref.xhtml # reference case rendering is incorrect; bug 858333
+fails-if(!styloVsGecko) == flexbox-inlinecontent-horiz-1a.xhtml flexbox-inlinecontent-horiz-1-ref.xhtml # reference case rendering is incorrect; bug 858333
+fails-if(!styloVsGecko) == flexbox-inlinecontent-horiz-1b.xhtml flexbox-inlinecontent-horiz-1-ref.xhtml # reference case rendering is incorrect; bug 858333
 == flexbox-inlinecontent-horiz-2.xhtml  flexbox-inlinecontent-horiz-2-ref.xhtml
 == flexbox-inlinecontent-horiz-3a.xhtml flexbox-inlinecontent-horiz-3-ref.xhtml
 == flexbox-inlinecontent-horiz-3b.xhtml flexbox-inlinecontent-horiz-3-ref.xhtml
 == flexbox-inlinecontent-horiz-3c.xhtml flexbox-inlinecontent-horiz-3-ref.xhtml
 == flexbox-inlinecontent-horiz-4.xhtml  flexbox-inlinecontent-horiz-4-ref.xhtml
 == flexbox-inlinecontent-horiz-5.xhtml  flexbox-inlinecontent-horiz-5-ref.xhtml
 
 # Tests for intrinsic sizing of flexboxes
--- a/layout/reftests/floats/reftest.list
+++ b/layout/reftests/floats/reftest.list
@@ -1,22 +1,22 @@
 == border-box-wrap-around-float.html border-box-wrap-around-float-ref.html
 == other-float-outside-rule-3-left.html other-float-outside-rule-3-left-ref.html
 == other-float-outside-rule-3-right.html other-float-outside-rule-3-right-ref.html
-fails-if(!stylo) == other-float-outside-rule-3-left-2.html other-float-outside-rule-3-left-2-ref.html # bug 616334
-fails-if(!stylo) == other-float-outside-rule-3-right-2.html other-float-outside-rule-3-right-2-ref.html # bug 616334
-fails-if(!stylo) == other-float-outside-rule-7-left.html other-float-outside-rule-7-left-ref.html # bug 616334
-fails-if(!stylo) == other-float-outside-rule-7-right.html other-float-outside-rule-7-right-ref.html # bug 616334
-fuzzy-if(gtkWidget,1,10) fails-if(stylo) == float-outside-block-push.html float-outside-block-push-ref.html # bug 815612
+fails-if(!styloVsGecko) == other-float-outside-rule-3-left-2.html other-float-outside-rule-3-left-2-ref.html # bug 616334
+fails-if(!styloVsGecko) == other-float-outside-rule-3-right-2.html other-float-outside-rule-3-right-2-ref.html # bug 616334
+fails-if(!styloVsGecko) == other-float-outside-rule-7-left.html other-float-outside-rule-7-left-ref.html # bug 616334
+fails-if(!styloVsGecko) == other-float-outside-rule-7-right.html other-float-outside-rule-7-right-ref.html # bug 616334
+fuzzy-if(gtkWidget,1,10) fails-if(styloVsGecko) == float-outside-block-push.html float-outside-block-push-ref.html # bug 815612
 == relative-float-1.html relative-float-1-ref.html
 == relative-float-2.html relative-float-2-ref.html
 == zero-height-float-base.html zero-height-float-ref.html
-fails-if(!stylo) == zero-height-float.html zero-height-float-ref.html # bug 81710
+fails-if(!styloVsGecko) == zero-height-float.html zero-height-float-ref.html # bug 81710
 == 345369-1.html 345369-1-ref.html
-fails-if(!stylo) == 345369-2.html 345369-2-ref.html
+fails-if(!styloVsGecko) == 345369-2.html 345369-2-ref.html
 == 345369-3.html 345369-3-ref.html
 == 345369-4.html 345369-4-ref.html
 == 345369-5.html 345369-5-ref.html
 == 429974-1.html 429974-1-ref.html
 == 478834-1.html 478834-1-ref.html
 == 546048-1.html 546048-1-ref.html
 == 775350-1.html 775350-1-ref.html
 == 1114329.html 1114329-ref.html
--- a/layout/reftests/font-face/reftest.list
+++ b/layout/reftests/font-face/reftest.list
@@ -7,17 +7,17 @@ HTTP(..) == download-2.html download-2-r
 HTTP(..) != download-2.html about:blank
 random-if(winWidget||gtkWidget) HTTP(..) == download-2-big.html download-2-big-otf.html # bug 470713
 HTTP(..) != download-2-big-otf.html about:blank
 asserts-if(Android&&!asyncPan,1-8) HTTP(..) != download-3-notref.html download-3.html # bug 1019192
 asserts-if(Android,0-8) HTTP(..) == download-3-ref.html download-3.html # same bugs as above
 asserts-if(Android,0-8) HTTP(..) == fallback-to-system-1.html fallback-to-system-1-ref.html # just delayed assertions from above tests
 HTTP(..) == name-override-simple-1.html name-override-simple-1-ref.html
 HTTP(..) != name-override-simple-1.html download-1-notref.html
-fails-if(!stylo) HTTP(..) == name-override-1.html name-override-1-ref.html
+fails-if(!styloVsGecko) HTTP(..) == name-override-1.html name-override-1-ref.html
 HTTP(..) == multiple-descriptor-1.html multiple-descriptor-1-ref.html
 HTTP(..) != multiple-descriptor-1.html multiple-descriptor-1-notref.html
 HTTP(..) == src-list-1.html src-list-1-ref.html
 HTTP(..) == src-list-2.html src-list-2-ref.html
 random-if(winWidget||gtkWidget) HTTP(..) == src-list-2-big-otf.html src-list-2-big-ref.html # bug 470713
 HTTP(..) == src-list-format-1.html src-list-format-1-ref.html
 HTTP(..) == src-list-format-2.html src-list-format-2-ref.html
 HTTP(..) == src-list-format-3.html src-list-format-3-ref.html
@@ -63,50 +63,50 @@ HTTP(..) == cross-iframe-1.html cross-if
 # unicode-range
 HTTP(..) == unicoderange-1.html unicoderange-1-ref.html
 HTTP(..) == unicoderange-2.html unicoderange-2-ref.html
 HTTP(..) == unicoderange-3.html unicoderange-3-ref.html
 HTTP(..) == unicoderange-4.html unicoderange-4-ref.html
 
 # Dynamic changes
 # we need to skip these because of the bug that's causing order-2.html to fail
-skip-if(stylo) HTTP(..) == enable-sheet-1.html enable-sheet-1-ref.html
-skip skip-if(stylo) HTTP(..) == enable-sheet-2.html multiple-in-family-1-ref.html
+skip-if(styloVsGecko) HTTP(..) == enable-sheet-1.html enable-sheet-1-ref.html
+skip skip-if(styloVsGecko) HTTP(..) == enable-sheet-2.html multiple-in-family-1-ref.html
 skip HTTP(..) == enable-sheet-3.html multiple-in-family-1-ref.html
 HTTP(..) == enable-sheet-4.html enable-sheet-4-ref.html
-skip-if(stylo) HTTP(..) == enable-sheet-5.html enable-sheet-4-ref.html
+skip-if(styloVsGecko) HTTP(..) == enable-sheet-5.html enable-sheet-4-ref.html
 skip HTTP(..) == enable-sheet-6.html multiple-in-family-1-ref.html
 skip HTTP(..) == enable-sheet-7.html multiple-in-family-1-ref.html
 HTTP(..) == disable-sheet-1.html disable-sheet-1-ref.html
 # We're missing disable-sheet-{2,3,6,7} (analogs to
 # enable-sheet{2,3,6,7}) because I don't know how to detect test
 # completion for those cases.
 HTTP(..) == disable-sheet-4.html disable-sheet-4-ref.html
-skip-if(stylo) HTTP(..) == disable-sheet-5.html disable-sheet-4-ref.html
+skip-if(styloVsGecko) HTTP(..) == disable-sheet-5.html disable-sheet-4-ref.html
 HTTP(..) == sheet-set-base-1.html sheet-set-base-1-ref.html
-random-if(cocoaWidget) skip-if(stylo) HTTP(..) == sheet-set-switch-1.html sheet-set-switch-1-ref.html # bug 468217
-skip-if(stylo) HTTP(..) == insert-rule-1a.html insert-rule-1-ref.html
-skip-if(stylo) HTTP(..) == insert-rule-1b.html insert-rule-1-ref.html
-skip-if(stylo) HTTP(..) == delete-rule-1.html delete-rule-1-ref.html
-random-if(stylo) HTTP(..) == media-query-add-1.html media-query-add-1-ref.html
-random-if(stylo) HTTP(..) == media-query-remove-1.html media-query-remove-1-ref.html
+random-if(cocoaWidget) skip-if(styloVsGecko) HTTP(..) == sheet-set-switch-1.html sheet-set-switch-1-ref.html # bug 468217
+skip-if(styloVsGecko) HTTP(..) == insert-rule-1a.html insert-rule-1-ref.html
+skip-if(styloVsGecko) HTTP(..) == insert-rule-1b.html insert-rule-1-ref.html
+skip-if(styloVsGecko) HTTP(..) == delete-rule-1.html delete-rule-1-ref.html
+random-if(styloVsGecko) HTTP(..) == media-query-add-1.html media-query-add-1-ref.html
+random-if(styloVsGecko) HTTP(..) == media-query-remove-1.html media-query-remove-1-ref.html
 HTTP(..) != media-query-add-1-ref.html media-query-remove-1-ref.html
 
 HTTP(..) == ahem-metrics-1.html ahem-metrics-1-ref.html
-skip-if(stylo) HTTP(..) == ex-unit-1.html ex-unit-1-ref.html
-skip-if(stylo) HTTP(..) == ex-unit-1-dynamic.html ex-unit-1-ref.html
+skip-if(styloVsGecko) HTTP(..) == ex-unit-1.html ex-unit-1-ref.html
+skip-if(styloVsGecko) HTTP(..) == ex-unit-1-dynamic.html ex-unit-1-ref.html
 
 == local-1.html local-1-ref.html
 == local-styled-1.html local-styled-1-ref.html
 
 HTTP(..) == synthetic-weight-style.html synthetic-weight-style-ref.html
 HTTP(..) == synthetic-variations.html synthetic-variations-ref.html
 
 # Leak test
-skip-if(stylo) HTTP(..) load 486974-1.html
+skip-if(styloVsGecko) HTTP(..) load 486974-1.html
 
 # compare fonts with and without bad head checksum
 HTTP(..) == load-badchecksum.html load-badchecksum-ref.html
 
 # @font-face names take precedence over names of platform fonts (bug 494360)
 HTTP(..) == name-collision.html name-collision-ref.html
 HTTP(..) == name-collision-bad-url.html name-collision-bad-url-ref.html
 
@@ -127,17 +127,17 @@ HTTP(..) == 507960-1-bad-checksums-woff.
 HTTP(..) != 507960-1-bad-sfnt-version-ttf.html 507960-1-ref.html
 HTTP(..) != 507960-1-bad-sfnt-version-woff.html 507960-1-ref.html
 HTTP(..) != 507960-1-bad-woff-sig.html 507960-1-ref.html
 HTTP(..) != 507960-1-bad-offset-woff.html 507960-1-ref.html
 HTTP(..) != 507960-1-woff-bad-hint.html 507960-1-ref.html
 
 # Tests for bug 523717
 HTTP(..) == underline-offset-change-1.html underline-offset-change-1-ref.html
-skip-if(stylo) HTTP(..) == underline-offset-change-2.html underline-offset-change-2-ref.html
+skip-if(styloVsGecko) HTTP(..) == underline-offset-change-2.html underline-offset-change-2-ref.html
 fails-if(cocoaWidget) fails-if(winWidget) HTTP(..) != underline-offset-change-1-ref.html underline-offset-change-2-ref.html # Bug 534132
 
 HTTP(..) != 534352-1-extra-cmap-sentinel.html 534352-1-extra-cmap-sentinel-ref.html
 HTTP(..) == bug533251.html bug533251-ref.html
 
 # Bug 875287
 HTTP(..) == font-familiy-whitespace-1.html font-familiy-whitespace-1-ref.html
 HTTP(..) != font-familiy-whitespace-1.html font-familiy-whitespace-1-notref.html
--- a/layout/reftests/font-features/reftest.list
+++ b/layout/reftests/font-features/reftest.list
@@ -29,42 +29,42 @@ HTTP(..) == font-features-hlig-4.html fo
 HTTP(..) != font-features-hlig-5.html font-features-hlig.html
 HTTP(..) == font-features-ligatures-none.html font-features-noliga.html
 
 # check that feature in style rule overrides @font-face
 HTTP(..) == font-features-hlig-3.html font-features-noliga.html
 
 # compare font-language-override rendering to lang-tagged rendering
 HTTP(..) == font-features-turkish-override-1.html font-features-turkish.html
-fails-if(stylo) HTTP(..) == font-features-turkish-override-2.html font-features-turkish.html
+fails-if(styloVsGecko) HTTP(..) == font-features-turkish-override-2.html font-features-turkish.html
 
 # check use of font-language-override to override explicit lang tag
 HTTP(..) == font-features-turkish-override-3.html font-features-ref.html
-fails-if(stylo) HTTP(..) == font-features-turkish-override-4.html font-features-ref.html
+fails-if(styloVsGecko) HTTP(..) == font-features-turkish-override-4.html font-features-ref.html
 HTTP(..) == font-features-turkish-override-5.html font-features-turkish.html
 
 # check that last value wins if a feature is repeated
 HTTP(..) == font-features-order-1.html font-features-ref.html
 HTTP(..) == font-features-order-2.html font-features-noliga.html
 
 # check priority of feature settings vs. font-variant subproperty
 HTTP(..) == font-features-order-3.html font-features-noliga.html
 HTTP(..) == font-features-order-4.html font-features-noliga.html
 HTTP(..) == font-features-order-5.html font-features-hlig.html
 
 # check priority involving feature settings and font-variant-alternates
-fails-if(stylo) HTTP(..) == alternates-order.html alternates-order-ref.html
+fails-if(styloVsGecko) HTTP(..) == alternates-order.html alternates-order-ref.html
 
 # check that font-specific values line up with @font-face feature settings
 HTTP(..) == annotations.html annotations-ref.html
 
 # font-variant subproperties
 # test for specific features being on and others off, based on prop values
 # (debug problems with font-variant-debug.html which displays all props)
-fails-if(stylo) HTTP(..) == font-variant-alternates.html font-variant-alternates-ref.html
+fails-if(styloVsGecko) HTTP(..) == font-variant-alternates.html font-variant-alternates-ref.html
 HTTP(..) == font-variant-caps.html font-variant-caps-ref.html
 HTTP(..) == font-variant-east-asian.html font-variant-east-asian-ref.html
 HTTP(..) == font-variant-ligatures.html font-variant-ligatures-ref.html
 HTTP(..) == font-variant-numeric.html font-variant-numeric-ref.html
 HTTP(..) == font-variant-position.html font-variant-position-ref.html
 
 # font-kerning
 HTTP(..) != font-kerning-normal.html font-kerning-none.html
--- a/layout/reftests/font-inflation/reftest.list
+++ b/layout/reftests/font-inflation/reftest.list
@@ -27,23 +27,23 @@ test-pref(font.size.inflation.emPerLine,
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == decoration-1.html decoration-1-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == bullet-1.html bullet-1-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == input-text-1-height.html input-text-1-height-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == input-text-1-noheight.html input-text-1-noheight-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == input-text-2-height.html input-text-2-height-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == input-text-2-noheight.html input-text-2-noheight-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == input-text-3-height.html input-text-3-height-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == input-text-3-noheight.html input-text-3-noheight-ref.html
-test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) fails-if(stylo) == textarea-1.html textarea-1-ref.html
-test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) fails-if(stylo) == textarea-2.html textarea-2-ref.html
-test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) fails-if(stylo) == textarea-3.html textarea-3-ref.html
+test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) fails-if(styloVsGecko) == textarea-1.html textarea-1-ref.html
+test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) fails-if(styloVsGecko) == textarea-2.html textarea-2-ref.html
+test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) fails-if(styloVsGecko) == textarea-3.html textarea-3-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == css-transform-1.html css-transform-1-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == css-transform-2.html css-transform-2-ref.html
 fuzzy-if(asyncPan&&!layersGPUAccelerated,102,1764) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == container-with-clamping.html container-with-clamping-ref.html
-test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) skip-if(stylo) load video-1.html
+test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) skip-if(styloVsGecko) load video-1.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) HTTP(..) == intrinsic-min-1.html intrinsic-min-1-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) HTTP(..) == intrinsic-max-1.html intrinsic-max-1-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) HTTP(..) == intrinsic-fit-1a.html intrinsic-fit-1a-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) HTTP(..) == intrinsic-fit-1b.html intrinsic-fit-1b-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) HTTP(..) == intrinsic-fit-1c.html intrinsic-fit-1c-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) HTTP(..) == intrinsic-fit-2a.html intrinsic-fit-1a-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) HTTP(..) == intrinsic-fit-2b.html intrinsic-fit-1b-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) HTTP(..) == intrinsic-fit-2c.html intrinsic-fit-1c-ref.html
@@ -78,24 +78,24 @@ test-pref(font.size.inflation.emPerLine,
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-scope-float-1.html threshold-scope-float-1-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-scope-float-2.html threshold-scope-float-2-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-scope-float-overflow-1.html threshold-scope-float-overflow-1-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-scope-float-overflow-2.html threshold-scope-float-overflow-2-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-scope-cell-1.html threshold-scope-cell-1-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-scope-cell-2.html threshold-scope-cell-2-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-scope-cell-3.html threshold-scope-cell-3-ref.html
 
-fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(stylo) == threshold-textarea-contents-under-1.html threshold-textarea-contents-under-1.html
-fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(stylo) == threshold-textarea-contents-under-2.html threshold-textarea-contents-under-2.html
-fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(stylo) == threshold-textarea-contents-at-1.html threshold-textarea-contents-at-1-ref.html
-fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(stylo) == threshold-textarea-contents-at-2.html threshold-textarea-contents-at-2-ref.html
+fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(styloVsGecko) == threshold-textarea-contents-under-1.html threshold-textarea-contents-under-1.html
+fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(styloVsGecko) == threshold-textarea-contents-under-2.html threshold-textarea-contents-under-2.html
+fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(styloVsGecko) == threshold-textarea-contents-at-1.html threshold-textarea-contents-at-1-ref.html
+fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(styloVsGecko) == threshold-textarea-contents-at-2.html threshold-textarea-contents-at-2-ref.html
 fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-input-text-contents-under-1.html threshold-input-text-contents-under-1.html
-fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(stylo) == threshold-input-text-contents-under-2.html threshold-input-text-contents-under-2.html
+fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(styloVsGecko) == threshold-input-text-contents-under-2.html threshold-input-text-contents-under-2.html
 fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-input-text-contents-at-1.html threshold-input-text-contents-at-1-ref.html
-fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(stylo) == threshold-input-text-contents-at-2.html threshold-input-text-contents-at-2-ref.html
+fuzzy-if(gtkWidget,1,10) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) fails-if(styloVsGecko) == threshold-input-text-contents-at-2.html threshold-input-text-contents-at-2-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-select-listbox-contents-under-1.html threshold-select-listbox-contents-under-1.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-select-listbox-contents-under-2.html threshold-select-listbox-contents-under-2.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-select-listbox-contents-at-1.html threshold-select-listbox-contents-at-1-ref.html
 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-select-listbox-contents-at-2.html threshold-select-listbox-contents-at-2-ref.html
 fuzzy-if(gtkWidget,1,8) fuzzy-if(Android,4,2) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-select-combobox-contents-under-1.html threshold-select-combobox-contents-under-1.html
 fuzzy-if(gtkWidget,1,8) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-select-combobox-contents-under-2.html threshold-select-combobox-contents-under-2.html
 fuzzy-if(gtkWidget,1,8) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-select-combobox-contents-at-1.html threshold-select-combobox-contents-at-1-ref.html
 fuzzy-if(gtkWidget,1,8) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-select-combobox-contents-at-2.html threshold-select-combobox-contents-at-2-ref.html
--- a/layout/reftests/font-loading-api/reftest.list
+++ b/layout/reftests/font-loading-api/reftest.list
@@ -1,11 +1,11 @@
 default-preferences pref(layout.css.font-loading-api.enabled,true)
 
 HTTP(..) == dynamic-insert-1.html dynamic-insert-1-ref.html
 HTTP(..) == dynamic-remove-1.html dynamic-remove-1-ref.html
-fails-if(stylo) HTTP(..) == ex-unit-1.html ../font-face/ex-unit-1-ref.html
+fails-if(styloVsGecko) HTTP(..) == ex-unit-1.html ../font-face/ex-unit-1-ref.html
 fuzzy-if(skiaContent,2,10) HTTP(..) == multiple-sets-1.html multiple-sets-1-ref.html
 HTTP(..) == name-collision.html ../font-face/name-collision-ref.html
 HTTP(..) == order-1.html ../font-face/order-1-ref.html
 HTTP(..) == src-list-1.html ../font-face/src-list-1-ref.html
 HTTP(..) == src-list-2.html ../font-face/src-list-2-ref.html
 HTTP(..) == src-list-data-1.html ../font-face/src-list-data-ref.html
--- a/layout/reftests/font-matching/reftest.list
+++ b/layout/reftests/font-matching/reftest.list
@@ -45,17 +45,17 @@ random-if(cocoaWidget) != impact-bold.ht
 
 # localized font family names should always match just as English names do
 == localized-family-names-001.html localized-family-names-001-ref.html
 == localized-family-names-002.html localized-family-names-002-ref.html
 == localized-family-names-003.html localized-family-names-003-ref.html
 == localized-family-names-004.html localized-family-names-004-ref.html
 
 # family names with escaped spaces shouldn't match the names without the spaces
-fails-if(gtkWidget&&!stylo) == familyname-escapedidents.html familyname-escapedidents-ref.html # bug 1309425, bug 1328771
+fails-if(gtkWidget&&!styloVsGecko) == familyname-escapedidents.html familyname-escapedidents-ref.html # bug 1309425, bug 1328771
 
 # weight mapping tests
 HTTP(..) == normalmedium.html normalmedium-ref.html
 HTTP(..) != normalmedium.html normalmedium-notref.html
 
 # Linux fails due to bug 604815
 fuzzy-if(OSX==1010&&browserIsRemote,1,23) HTTP(..) == weightmapping-12.html weightmapping-12-ref.html
 HTTP(..) == weightmapping-25.html weightmapping-25-ref.html
--- a/layout/reftests/forms/button/reftest.list
+++ b/layout/reftests/forms/button/reftest.list
@@ -32,12 +32,12 @@ fails-if(Android) == disabled-1.html dis
 != disabled-6.html disabled-6-notref.html
 
 == width-auto-size-em-ltr.html width-auto-size-em-ltr-ref.html
 == width-auto-size-ltr.html width-auto-size-ltr-ref.html
 == width-exact-fit-ltr.html width-auto-size-ltr-ref.html
 == width-auto-size-em-rtl.html width-auto-size-em-rtl-ref.html
 == width-auto-size-rtl.html width-auto-size-rtl-ref.html
 == width-exact-fit-rtl.html width-auto-size-rtl-ref.html
-fails-if(stylo) == display-grid-flex-columnset.html display-grid-flex-columnset-ref.html
+fails-if(styloVsGecko) == display-grid-flex-columnset.html display-grid-flex-columnset-ref.html
 == 1317351.html 1317351-ref.html
 
 == dynamic-text-indent.html dynamic-text-indent-ref.html
--- a/layout/reftests/forms/fieldset/reftest.list
+++ b/layout/reftests/forms/fieldset/reftest.list
@@ -1,26 +1,26 @@
 fuzzy-if(skiaContent,2,13) == dynamic-legend-scroll-1.html dynamic-legend-scroll-1-ref.html
 == fieldset-hidden-1.html fieldset-hidden-1-ref.html
 == fieldset-intrinsic-width-1.html fieldset-intrinsic-width-1-ref.html
 == fieldset-percentage-padding-1.html fieldset-percentage-padding-1-ref.html
-fails-if(stylo) == fieldset-scroll-1.html fieldset-scroll-1-ref.html
+fails-if(styloVsGecko) == fieldset-scroll-1.html fieldset-scroll-1-ref.html
 == fieldset-scrolled-1.html fieldset-scrolled-1-ref.html
 == fieldset-overflow-auto-1.html fieldset-overflow-auto-1-ref.html
 fuzzy-if(winWidget&&!layersGPUAccelerated,140,276) == positioned-container-1.html positioned-container-1-ref.html
 == relpos-legend-1.html relpos-legend-1-ref.html
 == relpos-legend-2.html relpos-legend-2-ref.html
 == relpos-legend-3.html relpos-legend-3-ref.html
 == relpos-legend-4.html relpos-legend-4-ref.html
 == sticky-legend-1.html sticky-legend-1-ref.html
 fuzzy-if(skiaContent,1,40768) == abs-pos-child-sizing.html abs-pos-child-sizing-ref.html
 == overflow-hidden.html overflow-hidden-ref.html
 == legend-rtl.html legend-rtl-ref.html
-fails-if(stylo) == fieldset-grid-001.html fieldset-grid-001-ref.html
-fails-if(stylo) == fieldset-flexbox-001.html fieldset-flexbox-001-ref.html
+fails-if(styloVsGecko) == fieldset-grid-001.html fieldset-grid-001-ref.html
+fails-if(styloVsGecko) == fieldset-flexbox-001.html fieldset-flexbox-001-ref.html
 == fieldset-min-width-1a.html fieldset-min-width-1-ref.html
 == fieldset-min-width-1b.html fieldset-min-width-1-ref.html
 == fieldset-min-width-2a.html fieldset-min-width-2-ref.html
 == fieldset-min-width-2b.html fieldset-min-width-2-ref.html
 == legend-overlapping-right-border-1.html legend-overlapping-right-border-1-ref.html
 == fieldset-border-image-1a.html fieldset-border-image-1-ref.html
 == fieldset-border-image-1b.html fieldset-border-image-1-ref.html
 == fieldset-border-image-2a.html fieldset-border-image-2-ref.html
--- a/layout/reftests/forms/input/datetime/reftest.list
+++ b/layout/reftests/forms/input/datetime/reftest.list
@@ -1,13 +1,13 @@
 default-preferences pref(dom.forms.datetime,true)
 
 # not valid on Android where type=time looks like type=text
-skip-if(Android) fails-if(stylo) != time-simple-unthemed.html time-simple-unthemed-ref.html
-skip-if(Android) fails-if(stylo) != time-large-font.html time-basic.html
-skip-if(Android) fails-if(stylo) != time-width-height.html time-basic.html
-skip-if(Android) fails-if(stylo) != time-border.html time-basic.html
+skip-if(Android) fails-if(styloVsGecko) != time-simple-unthemed.html time-simple-unthemed-ref.html
+skip-if(Android) fails-if(styloVsGecko) != time-large-font.html time-basic.html
+skip-if(Android) fails-if(styloVsGecko) != time-width-height.html time-basic.html
+skip-if(Android) fails-if(styloVsGecko) != time-border.html time-basic.html
 # only valid on Android where type=number looks the same as type=text
-skip-if(!Android) fails-if(stylo) == time-simple-unthemed.html time-simple-unthemed-ref.html
+skip-if(!Android) fails-if(styloVsGecko) == time-simple-unthemed.html time-simple-unthemed-ref.html
 
 # type change
-skip-if(Android) fails-if(stylo) == to-time-from-other-type-unthemed.html time-simple-unthemed.html
+skip-if(Android) fails-if(styloVsGecko) == to-time-from-other-type-unthemed.html time-simple-unthemed.html
 skip-if(Android) == from-time-to-other-type-unthemed.html from-time-to-other-type-unthemed-ref.html
--- a/layout/reftests/forms/input/number/reftest.list
+++ b/layout/reftests/forms/input/number/reftest.list
@@ -31,20 +31,20 @@ skip-if(Android) == number-min-height-1.
 skip-if(Android) == number-min-height-2.html number-min-height-2-ref.html
 skip-if(Android) == number-max-height-1.html number-max-height-1-ref.html
 skip-if(Android) == number-max-height-2.html number-max-height-2-ref.html
 
 # number of significant fractional digits:
 == number-significant-fractional-digits.html number-significant-fractional-digits-ref.html
 
 # focus
-fuzzy-if(skiaContent,2,5) needs-focus skip-if(stylo) == focus-handling.html focus-handling-ref.html
+fuzzy-if(skiaContent,2,5) needs-focus skip-if(styloVsGecko) == focus-handling.html focus-handling-ref.html
 
 # select
-fuzzy-if(skiaContent,1,1) skip-if(stylo) == number-selected.html number-selected-ref.html
+fuzzy-if(skiaContent,1,1) skip-if(styloVsGecko) == number-selected.html number-selected-ref.html
 
 # pseudo-elements not usable from content:
 == number-pseudo-elements.html number-pseudo-elements-ref.html
 
 == number-placeholder.html number-placeholder-ref.html
 
 # check that if the anonymous text control is reframed, we reframe the whole
 # number control (the fuzzy is for the top-right and bottom-left of the border
--- a/layout/reftests/forms/input/range/reftest.list
+++ b/layout/reftests/forms/input/range/reftest.list
@@ -1,17 +1,17 @@
 
 # sanity checks:
 != not-other-type-unthemed-1.html not-other-type-unthemed-1a-notref.html
 != not-other-type-unthemed-1.html not-other-type-unthemed-1b-notref.html
 != not-other-type-unthemed-1.html not-other-type-unthemed-1c-notref.html
 
 # dynamic type changes:
 fuzzy-if(skiaContent,1,40) == to-range-from-other-type-unthemed-1.html to-range-from-other-type-unthemed-1-ref.html
-skip-if(stylo) == from-range-to-other-type-unthemed-1.html from-range-to-other-type-unthemed-1-ref.html
+skip-if(styloVsGecko) == from-range-to-other-type-unthemed-1.html from-range-to-other-type-unthemed-1-ref.html
 
 # for different values:
 != different-fraction-of-range-unthemed-1.html different-fraction-of-range-unthemed-1-notref.html
 == same-fraction-of-range-unthemed-1.html same-fraction-of-range-unthemed-1-ref.html
 
 # dynamic value changes:
 fuzzy-if(skiaContent,1,40) == value-prop-unthemed.html 75pct-unthemed-common-ref.html
 == value-prop.html 75pct-common-ref.html
--- a/layout/reftests/forms/input/text/reftest.list
+++ b/layout/reftests/forms/input/text/reftest.list
@@ -1,10 +1,10 @@
 == bounds-1.html bounds-1-ref.html
 fuzzy-if(asyncPan&&!layersGPUAccelerated,140,111) == size-1.html size-1-ref.html
 == size-2.html size-2-ref.html
-fails-if(stylo) HTTP(..) == baseline-1.html baseline-1-ref.html
+fails-if(styloVsGecko) HTTP(..) == baseline-1.html baseline-1-ref.html
 HTTP(..) == centering-1.xul centering-1-ref.xul
 == dynamic-height-1.xul dynamic-height-1-ref.xul
 fuzzy-if(skiaContent,1,500) needs-focus == select.html select-ref.html
 == intrinsic-size.html intrinsic-size-ref.html
-fails-if(stylo) == line-height-0.5.html line-height-1.0.html
+fails-if(styloVsGecko) == line-height-0.5.html line-height-1.0.html
 != line-height-1.5.html line-height-1.0.html
--- a/layout/reftests/forms/legend/reftest.list
+++ b/layout/reftests/forms/legend/reftest.list
@@ -1,4 +1,4 @@
 == legend.html legend-ref.html
-fuzzy-if(skiaContent,1,7) pref(dom.webcomponents.enabled,true) fails-if(stylo) == shadow-dom.html shadow-dom-ref.html
+fuzzy-if(skiaContent,1,7) pref(dom.webcomponents.enabled,true) fails-if(styloVsGecko) == shadow-dom.html shadow-dom-ref.html
 == 1273433.html 1273433-ref.html
-fails-if(stylo) == 1339287.html 1339287-ref.html
+fails-if(styloVsGecko) == 1339287.html 1339287-ref.html
--- a/layout/reftests/forms/placeholder/reftest.list
+++ b/layout/reftests/forms/placeholder/reftest.list
@@ -5,31 +5,31 @@
 # text. The only thing that is doable is to make the caret grey in the tested
 # page but that would make the test moot because a failure wouldn't be seen.
 # A real way to fix this would be to be able to style the caret or to implement
 # ::value (bug 648643), depending of the ::value behaviour (it could change the
 # caret colour and the text colour or just the text colour).
 
 == placeholder-1-text.html placeholder-visible-ref.html
 == placeholder-1-password.html placeholder-visible-ref.html
-fails-if(stylo) == placeholder-1-textarea.html placeholder-visible-textarea-ref.html
+fails-if(styloVsGecko) == placeholder-1-textarea.html placeholder-visible-textarea-ref.html
 == placeholder-2.html placeholder-visible-ref.html
-fails-if(stylo) == placeholder-2-textarea.html placeholder-visible-textarea-ref.html
+fails-if(styloVsGecko) == placeholder-2-textarea.html placeholder-visible-textarea-ref.html
 == placeholder-3.html placeholder-overridden-ref.html
 == placeholder-4.html placeholder-overridden-ref.html
 == placeholder-5.html placeholder-visible-ref.html
-fuzzy-if(winWidget,160,10) fuzzy-if(Android,1,1) fuzzy-if(asyncPan&&!layersGPUAccelerated,146,317) fuzzy-if(OSX==1010&&browserIsRemote,1,8) fails-if(stylo) == placeholder-6.html placeholder-overflow-ref.html
-skip-if(Android&&asyncPan) fails-if(stylo) == placeholder-6-textarea.html placeholder-overflow-textarea-ref.html
+fuzzy-if(winWidget,160,10) fuzzy-if(Android,1,1) fuzzy-if(asyncPan&&!layersGPUAccelerated,146,317) fuzzy-if(OSX==1010&&browserIsRemote,1,8) fails-if(styloVsGecko) == placeholder-6.html placeholder-overflow-ref.html
+skip-if(Android&&asyncPan) fails-if(styloVsGecko) == placeholder-6-textarea.html placeholder-overflow-textarea-ref.html
 # needs-focus == placeholder-7.html placeholder-focus-ref.html
 # needs-focus == placeholder-8.html placeholder-focus-ref.html
 # needs-focus == placeholder-9.html placeholder-focus-ref.html
 needs-focus == placeholder-10.html placeholder-visible-ref.html
 == placeholder-11.html placeholder-visible-ref.html
 == placeholder-12.html placeholder-visible-ref.html
 == placeholder-13.html placeholder-visible-ref.html
 == placeholder-14.html placeholder-visible-ref.html
 == placeholder-18.html placeholder-overridden-ref.html
 random-if(winWidget) == placeholder-19.xul  placeholder-overridden-ref.xul
 # needs-focus == placeholder-20.html placeholder-focus-ref.html
 needs-focus == placeholder-21.html placeholder-blank-ref.html
 needs-focus == placeholder-22.html placeholder-blank-ref.html
-fails-if(stylo) == placeholder-rtl.html placeholder-rtl-ref.html
+fails-if(styloVsGecko) == placeholder-rtl.html placeholder-rtl-ref.html
 pref(dom.placeholder.show_on_focus,false) needs-focus == placeholder-focus-pref.html placeholder-blank-ref.html
--- a/layout/reftests/forms/progress/reftest.list
+++ b/layout/reftests/forms/progress/reftest.list
@@ -1,13 +1,13 @@
 == values.html values-ref.html
 == values-rtl.html values-rtl-ref.html
 == margin-padding.html margin-padding-ref.html
 == margin-padding-rtl.html margin-padding-rtl-ref.html
-random-if(stylo) == bar-pseudo-element.html bar-pseudo-element-ref.html
+random-if(styloVsGecko) == bar-pseudo-element.html bar-pseudo-element-ref.html
 == bar-pseudo-element-rtl.html bar-pseudo-element-rtl-ref.html
 == indeterminate-style-width.html indeterminate-style-width-ref.html
 
 # vertical tests
 == values-vertical.html values-vertical-ref.html
 == values-vertical-rtl.html values-vertical-rtl-ref.html
 == margin-padding-vertical.html margin-padding-vertical-ref.html
 == margin-padding-vertical-rtl.html margin-padding-vertical-rtl-ref.html
@@ -22,17 +22,17 @@ random-if(stylo) == bar-pseudo-element.h
 
 # Tests for bugs:
 == block-invalidate.html block-invalidate-ref.html
 == in-cells.html in-cells-ref.html
 == max-height.html max-height-ref.html
 
 # Tests for block and inline orientation in combination with writing-mode
 != progress-orient-horizontal.html progress-orient-vertical.html
-fails-if((!cocoaWidget||OSX==1010)&&!stylo) != progress-orient-vertical.html progress-orient-vertical-rtl.html # only OS X currently has direction-dependent rendering here
+fails-if((!cocoaWidget||OSX==1010)&&!styloVsGecko) != progress-orient-vertical.html progress-orient-vertical-rtl.html # only OS X currently has direction-dependent rendering here
 == progress-orient-block.html progress-orient-vertical.html
 == progress-orient-inline.html progress-orient-horizontal.html
 == progress-vlr.html progress-orient-vertical.html
 == progress-vlr-orient-block.html progress-orient-horizontal.html
 == progress-vlr-orient-inline.html progress-orient-vertical.html
 == progress-vlr-orient-horizontal.html progress-orient-horizontal.html
 == progress-vlr-orient-vertical.html progress-orient-vertical.html
 == progress-vrl.html progress-orient-vertical-rtl.html
--- a/layout/reftests/forms/reftest.list
+++ b/layout/reftests/forms/reftest.list
@@ -1,13 +1,13 @@
-fuzzy-if(skiaContent,1,10) fails-if(stylo) HTTP(..) == text-control-baseline-1.html text-control-baseline-1-ref.html
+fuzzy-if(skiaContent,1,10) fails-if(styloVsGecko) HTTP(..) == text-control-baseline-1.html text-control-baseline-1-ref.html
 fuzzy-if(cocoaWidget,16,64) fuzzy-if(Android,52,64) fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu),104,224) fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),88,400) == display-block-baselines-1.html display-block-baselines-1-ref.html # anti-aliasing issues
 == display-block-baselines-2.html display-block-baselines-2-ref.html
-fails-if(stylo) == display-block-baselines-3.html display-block-baselines-3-ref.html
-fails-if(stylo) == display-block-baselines-4.html display-block-baselines-4-ref.html
+fails-if(styloVsGecko) == display-block-baselines-3.html display-block-baselines-3-ref.html
+fails-if(styloVsGecko) == display-block-baselines-4.html display-block-baselines-4-ref.html
 fuzzy-if(Android,4,8) fuzzy-if(skiaContent,7,2) == display-block-baselines-5.html display-block-baselines-5-ref.html
 
 # button element
 include button/reftest.list
 
 # legend element
 include legend/reftest.list
 
--- a/layout/reftests/forms/textarea/reftest.list
+++ b/layout/reftests/forms/textarea/reftest.list
@@ -1,14 +1,14 @@
-skip-if(Android) fails-if(stylo) == resize.html resize-ref.html
+skip-if(Android) fails-if(styloVsGecko) == resize.html resize-ref.html
 # an offset seems to apply to the native resizer on windows so skip this test for now
-skip-if(Android) skip-if(winWidget) fuzzy-if(cocoaWidget,1,33) fuzzy-if(skiaContent&&!winWidget&&!Android,5,10) fails-if(stylo) == resize-background.html resize-background-ref.html
-skip-if(Android) fails-if(stylo) != ltr.html rtl.html
+skip-if(Android) skip-if(winWidget) fuzzy-if(cocoaWidget,1,33) fuzzy-if(skiaContent&&!winWidget&&!Android,5,10) fails-if(styloVsGecko) == resize-background.html resize-background-ref.html
+skip-if(Android) fails-if(styloVsGecko) != ltr.html rtl.html
 skip-if(Android) != ltr-scrollbar.html rtl-scrollbar.html
 skip-if(Android) != in-ltr-doc-scrollbar.html in-rtl-doc-scrollbar.html
-skip-if(Android) fails-if(stylo) != ltr.html no-resize.html
-skip-if(Android) fails-if(xulRuntime.widgetToolkit=="gtk2") fails-if(stylo) != rtl.html no-resize.html # bug 834724
-fuzzy-if(skiaContent,1,1) fails-if(stylo) == rtl.html rtl-dynamic-attr.html
-fuzzy-if(skiaContent,1,1) fails-if(stylo) == rtl.html rtl-dynamic-style.html
-fails-if(stylo) == rtl.html in-dynamic-rtl-doc.html
-fuzzy-if(skiaContent,1,3) fails-if(stylo) == setvalue-framereconstruction-1.html setvalue-framereconstruction-ref.html
-fuzzy-if(asyncPan&&!layersGPUAccelerated,102,4168) fails-if(stylo) == padding-scrollbar-placement.html padding-scrollbar-placement-ref.html
-fails-if(stylo) == various-cols.html various-cols-ref.html
+skip-if(Android) fails-if(styloVsGecko) != ltr.html no-resize.html
+skip-if(Android) fails-if(xulRuntime.widgetToolkit=="gtk2") fails-if(styloVsGecko) != rtl.html no-resize.html # bug 834724
+fuzzy-if(skiaContent,1,1) fails-if(styloVsGecko) == rtl.html rtl-dynamic-attr.html
+fuzzy-if(skiaContent,1,1) fails-if(styloVsGecko) == rtl.html rtl-dynamic-style.html
+fails-if(styloVsGecko) == rtl.html in-dynamic-rtl-doc.html
+fuzzy-if(skiaContent,1,3) fails-if(styloVsGecko) == setvalue-framereconstruction-1.html setvalue-framereconstruction-ref.html
+fuzzy-if(asyncPan&&!layersGPUAccelerated,102,4168) fails-if(styloVsGecko) == padding-scrollbar-placement.html padding-scrollbar-placement-ref.html
+fails-if(styloVsGecko) == various-cols.html various-cols-ref.html
--- a/layout/reftests/forms/textbox/reftest.list
+++ b/layout/reftests/forms/textbox/reftest.list
@@ -1,11 +1,11 @@
 # access-key tests are no use on OS X because access keys are not indicated visually
 # no real XUL theme on Android so we just skip
 skip-if(cocoaWidget||Android) != accesskey-1.xul accesskey-1-notref.xul
 skip-if(cocoaWidget||Android) == accesskey-2.xul accesskey-2-ref.xul
 # accesskey-3 fails because of defects in XUL bidi support
-fails-if(!cocoaWidget&&!stylo) skip-if(cocoaWidget||Android) == accesskey-3.xul accesskey-3-ref.xul
+fails-if(!cocoaWidget&&!styloVsGecko) skip-if(cocoaWidget||Android) == accesskey-3.xul accesskey-3-ref.xul
 skip-if(cocoaWidget||Android) != accesskey-3.xul accesskey-3-notref.xul
 skip-if(cocoaWidget||Android) == accesskey-4.xul accesskey-4-ref.xul
 skip-if(cocoaWidget||Android) != accesskey-4.xul accesskey-4-notref.xul
 skip-if(Android) == align-baseline-1.xul align-baseline-1-ref.xul # test for bug 494901
 skip-if(Android) == setsize.xul setsize-ref.xul
--- a/layout/reftests/image-element/reftest.list
+++ b/layout/reftests/image-element/reftest.list
@@ -1,16 +1,16 @@
 random == bug-364968.html bug-364968-ref.html
 == bug-463204.html bug-463204-ref.html
 == canvas-outside-document.html canvas-inside-document.html
 == mozsetimageelement-01.html mozsetimageelement-01-ref.html
 == mozsetimageelement-02.html about:blank
 == image-outside-document-invalidate.html about:blank
 == canvas-outside-document-invalidate-01.html about:blank
-fails-if(azureSkia) fails-if(cocoaWidget) skip-if(stylo) == canvas-outside-document-invalidate-02.html about:blank # See bug 666800
+fails-if(azureSkia) fails-if(cocoaWidget) skip-if(styloVsGecko) == canvas-outside-document-invalidate-02.html about:blank # See bug 666800
 #fails with Skia due to Skia bug http://code.google.com/p/skia/issues/detail?id=568
 == element-paint-simple.html element-paint-simple-ref.html
 == element-paint-repeated.html element-paint-repeated-ref.html
 == element-paint-recursion.html element-paint-recursion-ref.html
 HTTP(..) == element-paint-continuation.html element-paint-continuation-ref.html
 == element-paint-transform-01.html element-paint-transform-01-ref.html
 random-if(d2d) == element-paint-transform-02.html element-paint-transform-02-ref.html # bug 587133
 fuzzy-if(d2d&&/^Windows\x20NT\x206\.1/.test(http.oscpu),16,90) == element-paint-background-size-01.html element-paint-background-size-01-ref.html
--- a/layout/reftests/image/reftest.list
+++ b/layout/reftests/image/reftest.list
@@ -38,29 +38,29 @@ fuzzy(1,1) == image-orientation-explicit
 fuzzy(1,1) == image-orientation-explicit.html?180      image-orientation-ref.html?180
 fuzzy(1,1) == image-orientation-explicit.html?270      image-orientation-ref.html?270
 fuzzy(1,1) == image-orientation-explicit.html?0&flip   image-orientation-ref.html?0&flip
 fuzzy(1,1) == image-orientation-explicit.html?90&flip  image-orientation-ref.html?90&flip
 fuzzy(1,1) == image-orientation-explicit.html?180&flip image-orientation-ref.html?180&flip
 fuzzy(1,1) == image-orientation-explicit.html?270&flip image-orientation-ref.html?270&flip
 
 # Tests for image-orientation used with non-axis-aligned angles:
-fuzzy(1,1) fails-if(stylo) == image-orientation-explicit.html?-45      image-orientation-ref.html?0
+fuzzy(1,1) fails-if(styloVsGecko) == image-orientation-explicit.html?-45      image-orientation-ref.html?0
 fuzzy(1,1) == image-orientation-explicit.html?-15      image-orientation-ref.html?0
 fuzzy(1,1) == image-orientation-explicit.html?15       image-orientation-ref.html?0
 fuzzy(1,1) == image-orientation-explicit.html?45       image-orientation-ref.html?90
 fuzzy(1,1) == image-orientation-explicit.html?75       image-orientation-ref.html?90
 fuzzy(1,1) == image-orientation-explicit.html?105      image-orientation-ref.html?90
 fuzzy(1,1) == image-orientation-explicit.html?135      image-orientation-ref.html?180
 fuzzy(1,1) == image-orientation-explicit.html?165      image-orientation-ref.html?180
 fuzzy(1,1) == image-orientation-explicit.html?195      image-orientation-ref.html?180
 fuzzy(1,1) == image-orientation-explicit.html?225      image-orientation-ref.html?270
 fuzzy(1,1) == image-orientation-explicit.html?255      image-orientation-ref.html?270
 fuzzy(1,1) == image-orientation-explicit.html?285      image-orientation-ref.html?270
-fuzzy(1,1) fails-if(stylo) == image-orientation-explicit.html?315      image-orientation-ref.html?0
+fuzzy(1,1) fails-if(styloVsGecko) == image-orientation-explicit.html?315      image-orientation-ref.html?0
 fuzzy(1,1) == image-orientation-explicit.html?345      image-orientation-ref.html?0
 
 # Tests for image-orientation used on generated content:
 fuzzy(1,1) == image-orientation-generated-content.html?from-image image-orientation-generated-content-ref.html?270&flip
 fuzzy(1,1) == image-orientation-generated-content.html?0          image-orientation-generated-content-ref.html?0
 fuzzy(1,1) == image-orientation-generated-content.html?90         image-orientation-generated-content-ref.html?90
 fuzzy(1,1) == image-orientation-generated-content.html?180        image-orientation-generated-content-ref.html?180
 fuzzy(1,1) == image-orientation-generated-content.html?270        image-orientation-generated-content-ref.html?270
@@ -104,26 +104,26 @@ fuzzy(1,1) == image-orientation-backgrou
 # <img srcset> tests
 == image-srcset-basic-selection-0.1x.html image-srcset-basic-selection-0.1x-ref.html
 == image-srcset-basic-selection-2x.html image-srcset-basic-selection-2x-ref.html
 == image-srcset-basic-selection-0.5x.html image-srcset-basic-selection-0.5x-ref.html
 == image-srcset-basic-selection-0.6x.html image-srcset-basic-selection-0.6x-ref.html
 == image-srcset-basic-selection-1.5x.html image-srcset-basic-selection-1.5x-ref.html
 == image-srcset-basic-selection-1x.html image-srcset-basic-selection-1x-ref.html
 == image-srcset-basic-selection-width-0.5x.html image-srcset-basic-selection-width-0.5x-ref.html
-fails-if(stylo) == image-srcset-basic-selection-width-10x.html image-srcset-basic-selection-width-10x-ref.html
+fails-if(styloVsGecko) == image-srcset-basic-selection-width-10x.html image-srcset-basic-selection-width-10x-ref.html
 == image-srcset-basic-selection-width-2x.html image-srcset-basic-selection-width-2x-ref.html
 == image-srcset-basic-selection-width-1x.html image-srcset-basic-selection-width-1x-ref.html
 == image-srcset-default-2x.html image-srcset-default-2x-ref.html
 == image-srcset-default-1x.html image-srcset-default-1x-ref.html
 == image-srcset-default-src-2x.html image-srcset-default-src-2x-ref.html
 == image-srcset-default-src-1x.html image-srcset-default-src-1x-ref.html
 == image-srcset-orientation-2x.html image-srcset-orientation-2x-ref.html
 == image-srcset-orientation-1x.html image-srcset-orientation-1x-ref.html
-fails-if(stylo) == image-srcset-svg-3x.html image-srcset-svg-3x-ref.html
+fails-if(styloVsGecko) == image-srcset-svg-3x.html image-srcset-svg-3x-ref.html
 == image-srcset-svg-2x.html image-srcset-svg-2x-ref.html
 == image-srcset-svg-1x.html image-srcset-svg-1x-ref.html
 == image-srcset-svg-default-2x.html image-srcset-svg-default-2x-ref.html
 == image-srcset-svg-default-1x.html image-srcset-svg-default-1x-ref.html
 
 == image-resize-percent-height.html image-resize-ref.html
 == image-resize-percent-width.html image-resize-ref.html
 
--- a/layout/reftests/invalidation/reftest.list
+++ b/layout/reftests/invalidation/reftest.list
@@ -43,17 +43,17 @@ pref(layout.animated-image-layers.enable
 fails-if(webrender) != scroll-inactive-layers.html about:blank
 fails-if(webrender) != scroll-inactive-layers-2.html about:blank
 fails-if(webrender) != inactive-layertree-visible-region-1.html about:blank
 fails-if(webrender) != inactive-layertree-visible-region-2.html about:blank
 fails-if(webrender) != transform-floating-point-invalidation.html about:blank
 fails-if(webrender) != transform-floating-point-invalidation.html?reverse about:blank
 fails-if(webrender) != nudge-to-integer-invalidation.html about:blank
 fails-if(webrender) != nudge-to-integer-invalidation.html?reverse about:blank
-fails-if(webrender) skip-if(stylo) != clipped-animated-transform-1.html about:blank # Bug 1352628 (stylo)
+fails-if(webrender) skip-if(styloVsGecko) != clipped-animated-transform-1.html about:blank # Bug 1352628 (styloVsGecko)
 fails-if(webrender) != paintedlayer-recycling-1.html about:blank
 fails-if(webrender) != paintedlayer-recycling-2.html about:blank
 pref(layers.single-tile.enabled,false) fails-if(webrender) != paintedlayer-recycling-3.html about:blank
 fails-if(webrender) != paintedlayer-recycling-4.html about:blank
 fails-if(webrender) != paintedlayer-recycling-5.html about:blank
 fails-if(webrender) != paintedlayer-recycling-6.html about:blank
 fails-if(webrender) != paintedlayer-recycling-7.html about:blank
 != masklayer-1.html about:blank
--- a/layout/reftests/layers/reftest.list
+++ b/layout/reftests/layers/reftest.list
@@ -1,27 +1,27 @@
 == move-to-background-1.html move-to-background-1-ref.html
 fuzzy-if(cocoaWidget,2,6) random-if(Android) == component-alpha-exit-1.html component-alpha-exit-1-ref.html # bug 760275
 != pull-background-1.html about:blank
-random-if(stylo) != pull-background-2.html about:blank
+random-if(styloVsGecko) != pull-background-2.html about:blank
 fails-if(webrender) != pull-background-3.html about:blank
 fails-if(webrender) != pull-background-4.html about:blank
-fuzzy-if(stylo,1,1) != pull-background-5.html about:blank
+fuzzy-if(styloVsGecko,1,1) != pull-background-5.html about:blank
 != pull-background-6.html about:blank
 # The animated-position tests are disabled for intermittent failures / passes, bug 1150941
 skip != pull-background-animated-position-1.html about:blank # Fails with event regions
 skip != pull-background-animated-position-2.html about:blank
 skip != pull-background-animated-position-3.html about:blank # Fails because PaintedLayer item assignment doesn't recognize overflow:hidden clips
 skip != pull-background-animated-position-4.html about:blank # Fails because PaintedLayer item assignment and background pulling don't recognize overflow:hidden clips
 skip != pull-background-animated-position-5.html about:blank # Fails because ownLayer bounds don't anticipate changes of animated contents, but doesn't fail with event regions
 skip-if(!asyncPan) != pull-background-displayport-1.html about:blank
-skip-if(!asyncPan) random-if(stylo) != pull-background-displayport-2.html about:blank
+skip-if(!asyncPan) random-if(styloVsGecko) != pull-background-displayport-2.html about:blank
 skip-if(!asyncPan) != pull-background-displayport-3.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515
 skip-if(!asyncPan) != pull-background-displayport-4.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515
-skip-if(!asyncPan) fuzzy-if(stylo,1,1) != pull-background-displayport-5.html about:blank
+skip-if(!asyncPan) fuzzy-if(styloVsGecko,1,1) != pull-background-displayport-5.html about:blank
 skip-if(!asyncPan) != pull-background-displayport-6.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515
 fuzzy(2,30150) == opacity-blending.html opacity-blending-ref.html
 fuzzy(16,5) fails-if(webrender) == mask-layer-transform.html mask-layer-transform-ref.html
 fuzzy-if(gtkWidget,1,17) fuzzy-if(Android,3,4) == forced-bg-color-outside-visible-region.html forced-bg-color-outside-visible-region-ref.html
 != layerize-over-fixed-bg-1.html about:blank
 skip-if(!asyncPan) != fixed-pos-scrolled-clip-layerize.html about:blank
 skip-if(!asyncPan) == fixed-pos-scrolled-clip-opacity-layerize.html fixed-pos-scrolled-clip-opacity-inside-layerize.html
 
--- a/layout/reftests/list-item/reftest.list
+++ b/layout/reftests/list-item/reftest.list
@@ -1,14 +1,14 @@
 fuzzy-if(OSX,55,4) == numbering-1.html numbering-1-ref.html
 == numbering-2.html numbering-2-ref.html
 pref(layout.css.grid.enabled,true) fuzzy-if(OSX,8,1) == numbering-3.html numbering-3-ref.html
 fuzzy-if(OSX,72,2) == numbering-4.html numbering-4-ref.html
 fails-if(webrender) == numbering-5.html numbering-5-ref.html
 == ol-reversed-1a.html ol-reversed-1-ref.html
-asserts(1) asserts-if(stylo,2) == ol-reversed-1b.html ol-reversed-1-ref.html # bug 478135
+asserts(1) asserts-if(styloVsGecko,2) == ol-reversed-1b.html ol-reversed-1-ref.html # bug 478135
 == ol-reversed-1c.html ol-reversed-1-ref.html
 == ol-reversed-2.html ol-reversed-2-ref.html
 == ol-reversed-3.html ol-reversed-3-ref.html
 == bullet-space-1.html bullet-space-1-ref.html
 == bullet-space-2.html bullet-space-2-ref.html
 == bullet-intrinsic-isize-1.html bullet-intrinsic-isize-1-ref.html
 fails-if(webrender) == bullet-intrinsic-isize-2.html bullet-intrinsic-isize-2-ref.html
--- a/layout/reftests/margin-collapsing/reftest.list
+++ b/layout/reftests/margin-collapsing/reftest.list
@@ -363,22 +363,22 @@
 == block-zero-min-height-3a.html block-zero-min-height-3-ref.html
 == block-zero-min-height-3b.html block-zero-min-height-3-ref.html
 == block-zero-min-height-3c.html block-zero-min-height-3-ref.html
 == block-zero-min-height-3d.html block-zero-min-height-3-ref.html
 # If a parent box's height is 'auto' and its 'min-height' is non-zero,
 # then its bottom margin collapses with its last-child's bottom margin.
 # This is true even if the two margins do not actually touch each other,
 # as they are still considered 'adjoining'.
-fails-if(!stylo) == block-min-height-last-child-1a.html block-min-height-last-child-1-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-min-height-last-child-1a.html block-min-height-last-child-1-ref.html # Bug 616339
 == block-min-height-last-child-1b.html block-min-height-last-child-1-ref.html
 == block-min-height-last-child-1c.html block-min-height-last-child-1-ref.html
-fails-if(!stylo) == block-min-height-last-child-2a.html block-min-height-last-child-2-ref.html # Bug 616339
-fails-if(!stylo) == block-min-height-last-child-2b.html block-min-height-last-child-2-ref.html # Bug 616339
-fails-if(!stylo) == block-min-height-last-child-3a.html block-min-height-last-child-3-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-min-height-last-child-2a.html block-min-height-last-child-2-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-min-height-last-child-2b.html block-min-height-last-child-2-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-min-height-last-child-3a.html block-min-height-last-child-3-ref.html # Bug 616339
 == block-min-height-last-child-3b.html block-min-height-last-child-3-ref.html
 == block-min-height-last-child-3c.html block-min-height-last-child-3-ref.html
 == block-min-height-last-child-4a.html block-min-height-last-child-4-ref.html
 == block-min-height-last-child-4b.html block-min-height-last-child-4-ref.html
 == block-min-height-last-child-4c.html block-min-height-last-child-4-ref.html
 == block-min-height-last-child-5a.html block-min-height-last-child-5-ref.html
 == block-min-height-last-child-5b.html block-min-height-last-child-5-ref.html
 == block-min-height-last-child-6a.html block-min-height-last-child-6-ref.html
@@ -387,22 +387,22 @@ fails-if(!stylo) == block-min-height-las
 == block-min-height-last-child-7a.html block-min-height-last-child-7-ref.html
 == block-min-height-last-child-7b.html block-min-height-last-child-7-ref.html
 == block-min-height-last-child-7c.html block-min-height-last-child-7-ref.html
 == block-min-height-last-child-8a.html block-min-height-last-child-8-ref.html
 == block-min-height-last-child-8b.html block-min-height-last-child-8-ref.html
 == block-min-height-last-child-9a.html block-min-height-last-child-9-ref.html
 == block-min-height-last-child-9b.html block-min-height-last-child-9-ref.html
 == block-min-height-last-child-9c.html block-min-height-last-child-9-ref.html
-fails-if(!stylo) == block-min-height-last-child-1a-dyn.html block-min-height-last-child-1-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-min-height-last-child-1a-dyn.html block-min-height-last-child-1-ref.html # Bug 616339
 == block-min-height-last-child-1b-dyn.html block-min-height-last-child-1-ref.html
 == block-min-height-last-child-1c-dyn.html block-min-height-last-child-1-ref.html
-fails-if(!stylo) == block-min-height-last-child-2a-dyn.html block-min-height-last-child-2-ref.html # Bug 616339
-fails-if(!stylo) == block-min-height-last-child-2b-dyn.html block-min-height-last-child-2-ref.html # Bug 616339
-fails-if(!stylo) == block-min-height-last-child-3a-dyn.html block-min-height-last-child-3-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-min-height-last-child-2a-dyn.html block-min-height-last-child-2-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-min-height-last-child-2b-dyn.html block-min-height-last-child-2-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-min-height-last-child-3a-dyn.html block-min-height-last-child-3-ref.html # Bug 616339
 == block-min-height-last-child-3b-dyn.html block-min-height-last-child-3-ref.html
 == block-min-height-last-child-3c-dyn.html block-min-height-last-child-3-ref.html
 == block-min-height-last-child-4a-dyn.html block-min-height-last-child-4-ref.html
 == block-min-height-last-child-4b-dyn.html block-min-height-last-child-4-ref.html
 == block-min-height-last-child-4c-dyn.html block-min-height-last-child-4-ref.html
 == block-min-height-last-child-5a-dyn.html block-min-height-last-child-5-ref.html
 == block-min-height-last-child-5b-dyn.html block-min-height-last-child-5-ref.html
 == block-min-height-last-child-6a-dyn.html block-min-height-last-child-6-ref.html
@@ -431,22 +431,22 @@ fails-if(!stylo) == block-min-height-las
 == block-max-height-last-child-4a.html block-max-height-last-child-4-ref.html
 == block-max-height-last-child-4b.html block-max-height-last-child-4-ref.html
 == block-max-height-last-child-4c.html block-max-height-last-child-4-ref.html
 == block-max-height-last-child-5a.html block-max-height-last-child-5-ref.html
 == block-max-height-last-child-5b.html block-max-height-last-child-5-ref.html
 == block-max-height-last-child-6a.html block-max-height-last-child-6-ref.html
 == block-max-height-last-child-6b.html block-max-height-last-child-6-ref.html
 == block-max-height-last-child-6c.html block-max-height-last-child-6-ref.html
-fails-if(!stylo) == block-max-height-last-child-7a.html block-max-height-last-child-7-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-max-height-last-child-7a.html block-max-height-last-child-7-ref.html # Bug 616339
 == block-max-height-last-child-7b.html block-max-height-last-child-7-ref.html
 == block-max-height-last-child-7c.html block-max-height-last-child-7-ref.html
-fails-if(!stylo) == block-max-height-last-child-8a.html block-max-height-last-child-8-ref.html # Bug 616339
-fails-if(!stylo) == block-max-height-last-child-8b.html block-max-height-last-child-8-ref.html # Bug 616339
-fails-if(!stylo) == block-max-height-last-child-9a.html block-max-height-last-child-9-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-max-height-last-child-8a.html block-max-height-last-child-8-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-max-height-last-child-8b.html block-max-height-last-child-8-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-max-height-last-child-9a.html block-max-height-last-child-9-ref.html # Bug 616339
 == block-max-height-last-child-9b.html block-max-height-last-child-9-ref.html
 == block-max-height-last-child-9c.html block-max-height-last-child-9-ref.html
 == block-max-height-last-child-1a-dyn.html block-max-height-last-child-1-ref.html
 == block-max-height-last-child-1b-dyn.html block-max-height-last-child-1-ref.html
 == block-max-height-last-child-1c-dyn.html block-max-height-last-child-1-ref.html
 == block-max-height-last-child-2a-dyn.html block-max-height-last-child-2-ref.html
 == block-max-height-last-child-2b-dyn.html block-max-height-last-child-2-ref.html
 == block-max-height-last-child-3a-dyn.html block-max-height-last-child-3-ref.html
@@ -455,22 +455,22 @@ fails-if(!stylo) == block-max-height-las
 == block-max-height-last-child-4a-dyn.html block-max-height-last-child-4-ref.html
 == block-max-height-last-child-4b-dyn.html block-max-height-last-child-4-ref.html
 == block-max-height-last-child-4c-dyn.html block-max-height-last-child-4-ref.html
 == block-max-height-last-child-5a-dyn.html block-max-height-last-child-5-ref.html
 == block-max-height-last-child-5b-dyn.html block-max-height-last-child-5-ref.html
 == block-max-height-last-child-6a-dyn.html block-max-height-last-child-6-ref.html
 == block-max-height-last-child-6b-dyn.html block-max-height-last-child-6-ref.html
 == block-max-height-last-child-6c-dyn.html block-max-height-last-child-6-ref.html
-fails-if(!stylo) == block-max-height-last-child-7a-dyn.html block-max-height-last-child-7-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-max-height-last-child-7a-dyn.html block-max-height-last-child-7-ref.html # Bug 616339
 == block-max-height-last-child-7b-dyn.html block-max-height-last-child-7-ref.html
 == block-max-height-last-child-7c-dyn.html block-max-height-last-child-7-ref.html
-fails-if(!stylo) == block-max-height-last-child-8a-dyn.html block-max-height-last-child-8-ref.html # Bug 616339
-fails-if(!stylo) == block-max-height-last-child-8b-dyn.html block-max-height-last-child-8-ref.html # Bug 616339
-fails-if(!stylo) == block-max-height-last-child-9a-dyn.html block-max-height-last-child-9-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-max-height-last-child-8a-dyn.html block-max-height-last-child-8-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-max-height-last-child-8b-dyn.html block-max-height-last-child-8-ref.html # Bug 616339
+fails-if(!styloVsGecko) == block-max-height-last-child-9a-dyn.html block-max-height-last-child-9-ref.html # Bug 616339
 == block-max-height-last-child-9b-dyn.html block-max-height-last-child-9-ref.html
 == block-max-height-last-child-9c-dyn.html block-max-height-last-child-9-ref.html
 # If a parent box's height is not 'auto' then its bottom margin
 # never collapses with its last-child's bottom margin,
 # as these margins are not considered 'adjoining'.
 # According to CSS 2.1 ยง10.7 (Minimum and maximum heights) this is true,
 # even if the value of min- or max-height is used instead.
 == block-fix-height-last-child-1a.html block-fix-height-last-child-1-ref.html
@@ -678,29 +678,29 @@ fails-if(!stylo) == block-max-height-las
 == table-caption-top-1-dyn.html table-caption-top-1-ref.html
 == table-caption-top-2-dyn.html table-caption-top-1-ref.html
 == table-caption-top-outside-1-dyn.html table-caption-top-1-ref.html
 == table-caption-top-outside-2-dyn.html table-caption-top-2-ref.html
 == table-caption-bottom-1-dyn.html table-caption-bottom-1-ref.html
 == table-caption-bottom-2-dyn.html table-caption-bottom-1-ref.html
 == table-caption-bottom-outside-1-dyn.html table-caption-bottom-1-ref.html
 == table-caption-bottom-outside-2-dyn.html table-caption-bottom-1-ref.html
-fails-if(!stylo) == caption-sibling-1a.html caption-sibling-1-ref.html # Bug 144517
+fails-if(!styloVsGecko) == caption-sibling-1a.html caption-sibling-1-ref.html # Bug 144517
 != caption-sibling-1a.html caption-sibling-1-noref.html
-fails-if(!stylo) == caption-sibling-1b.html caption-sibling-1-ref.html # Bug 144517
+fails-if(!styloVsGecko) == caption-sibling-1b.html caption-sibling-1-ref.html # Bug 144517
 != caption-sibling-1b.html caption-sibling-1-noref.html
-fails-if(!stylo) == caption-sibling-1c.html caption-sibling-1-ref.html # Bug 144517
+fails-if(!styloVsGecko) == caption-sibling-1c.html caption-sibling-1-ref.html # Bug 144517
 != caption-sibling-1c.html caption-sibling-1-noref2.html
-fails-if(!stylo) == caption-sibling-1a-dyn.html caption-sibling-1-ref.html # Bug 144517
+fails-if(!styloVsGecko) == caption-sibling-1a-dyn.html caption-sibling-1-ref.html # Bug 144517
 != caption-sibling-1a-dyn.html caption-sibling-1-noref.html
-fails-if(!stylo) == caption-sibling-1b-dyn.html caption-sibling-1-ref.html # Bug 144517
+fails-if(!styloVsGecko) == caption-sibling-1b-dyn.html caption-sibling-1-ref.html # Bug 144517
 != caption-sibling-1b-dyn.html caption-sibling-1-noref.html
-fails-if(!stylo) == caption-sibling-1c-dyn.html caption-sibling-1-ref.html # Bug 144517
+fails-if(!styloVsGecko) == caption-sibling-1c-dyn.html caption-sibling-1-ref.html # Bug 144517
 != caption-sibling-1c-dyn.html caption-sibling-1-noref2.html
-fails-if(!stylo) == caption-sibling-2-dyn.html caption-sibling-2-ref.html # Bug 144517
+fails-if(!styloVsGecko) == caption-sibling-2-dyn.html caption-sibling-2-ref.html # Bug 144517
 != caption-sibling-2-dyn.html caption-sibling-2-noref.html
 == caption-child-1.html caption-child-1-ref.html
 == caption-child-1-dyn.html caption-child-1-ref.html
 # * Multi-column elements, per CSS Multi-column Layout Module
 # (Candidate Recommendation 12 April 2011):
 # "A multi-column element establishes a new block formatting context [...]"
 == column-sibling-1a.html column-sibling-1-ref.html
 == column-sibling-1b.html column-sibling-1-ref.html
@@ -785,35 +785,35 @@ fails-if(!stylo) == caption-sibling-2-dy
 == block-clear-5a.html block-clear-5-left-ref.html
 == block-clear-5b.html block-clear-5-left-ref.html
 == block-clear-5c.html block-clear-5-left-ref.html
 == block-clear-5d.html block-clear-5-left-ref.html
 == block-clear-5e.html block-clear-5-right-ref.html
 == block-clear-5f.html block-clear-5-right-ref.html
 == block-clear-5g.html block-clear-5-right-ref.html
 == block-clear-5h.html block-clear-5-right-ref.html
-fails-if(!stylo) == block-clear-6a-left.html block-clear-6abc-left-ref.html # Bug 493380
+fails-if(!styloVsGecko) == block-clear-6a-left.html block-clear-6abc-left-ref.html # Bug 493380
 == block-clear-6b-left.html block-clear-6abc-left-ref.html
 == block-clear-6c-left.html block-clear-6abc-left-ref.html
-fails-if(!stylo) == block-clear-6d-left.html block-clear-6def-left-ref1.html # Bug 493380
-fails-if(!stylo) == block-clear-6d-left.html block-clear-6def-left-ref2.html # Bug 493380
+fails-if(!styloVsGecko) == block-clear-6d-left.html block-clear-6def-left-ref1.html # Bug 493380
+fails-if(!styloVsGecko) == block-clear-6d-left.html block-clear-6def-left-ref2.html # Bug 493380
 == block-clear-6e-left.html block-clear-6def-left-ref1.html
 == block-clear-6e-left.html block-clear-6def-left-ref2.html
 == block-clear-6f-left.html block-clear-6def-left-ref1.html
 == block-clear-6f-left.html block-clear-6def-left-ref2.html
-fails-if(!stylo) == block-clear-7a-left.html block-clear-7abcd-left-ref.html # Bug 493380
-fails-if(!stylo) == block-clear-7b-left.html block-clear-7abcd-left-ref.html # Bug 493380
-fails-if(!stylo) == block-clear-7c-left.html block-clear-7abcd-left-ref.html # Bug 493380
+fails-if(!styloVsGecko) == block-clear-7a-left.html block-clear-7abcd-left-ref.html # Bug 493380
+fails-if(!styloVsGecko) == block-clear-7b-left.html block-clear-7abcd-left-ref.html # Bug 493380
+fails-if(!styloVsGecko) == block-clear-7c-left.html block-clear-7abcd-left-ref.html # Bug 493380
 == block-clear-7d-left.html block-clear-7abcd-left-ref.html
-fails-if(!stylo) == block-clear-7e-left.html block-clear-7efgh-left-ref1.html # Bug 493380
-fails-if(!stylo) == block-clear-7e-left.html block-clear-7efgh-left-ref2.html # Bug 493380
-fails-if(!stylo) == block-clear-7f-left.html block-clear-7efgh-left-ref1.html # Bug 493380
-fails-if(!stylo) == block-clear-7f-left.html block-clear-7efgh-left-ref2.html # Bug 493380
-fails-if(!stylo) == block-clear-7g-left.html block-clear-7efgh-left-ref1.html # Bug 493380
-fails-if(!stylo) == block-clear-7g-left.html block-clear-7efgh-left-ref2.html # Bug 493380
+fails-if(!styloVsGecko) == block-clear-7e-left.html block-clear-7efgh-left-ref1.html # Bug 493380
+fails-if(!styloVsGecko) == block-clear-7e-left.html block-clear-7efgh-left-ref2.html # Bug 493380
+fails-if(!styloVsGecko) == block-clear-7f-left.html block-clear-7efgh-left-ref1.html # Bug 493380
+fails-if(!styloVsGecko) == block-clear-7f-left.html block-clear-7efgh-left-ref2.html # Bug 493380
+fails-if(!styloVsGecko) == block-clear-7g-left.html block-clear-7efgh-left-ref1.html # Bug 493380
+fails-if(!styloVsGecko) == block-clear-7g-left.html block-clear-7efgh-left-ref2.html # Bug 493380
 == block-clear-7h-left.html block-clear-7efgh-left-ref1.html
 == block-clear-7h-left.html block-clear-7efgh-left-ref2.html
 # "Margins of the root element's box do not collapse."
 # Testing the root margins of a generic XML document.
 == block-xml-root-1.xml block-xml-root-1-ref.xml
 # In XML and XHTML, the html element is not necessarily the root element of
 # a document. In that case, the margins of the html element collapse
 # like the margins of any other block boxes.
--- a/layout/reftests/mathml/reftest.list
+++ b/layout/reftests/mathml/reftest.list
@@ -1,23 +1,23 @@
 == dir-1.html dir-1-ref.html
 == dir-2.html dir-2-ref.html
 random-if(gtkWidget) == dir-3.html dir-3-ref.html # bug 1309426
 == dir-4.html dir-4-ref.html
 == dir-5.html dir-5-ref.html
 == dir-6.html dir-6-ref.html
 == dir-6a.html dir-6a-ref.html
 == dir-7.html dir-7-ref.html
-fails-if(!stylo) == dir-8.html dir-8-ref.html
-fails-if(!stylo) == dir-9.html dir-9-ref.html # Bug 787215
+fails-if(!styloVsGecko) == dir-8.html dir-8-ref.html
+fails-if(!styloVsGecko) == dir-9.html dir-9-ref.html # Bug 787215
 == dir-10.html dir-10-ref.html
 == dir-11.html dir-11-ref.html
 == css-spacing-1.html css-spacing-1-ref.html
-pref(mathml.disabled,true) fails-if(stylo) == disabled-scriptlevel-1.html disabled-scriptlevel-1-ref.html
-pref(mathml.disabled,true) fails-if(stylo) == disabled-scriptlevel-1.xhtml disabled-scriptlevel-1-ref.xhtml
+pref(mathml.disabled,true) fails-if(styloVsGecko) == disabled-scriptlevel-1.html disabled-scriptlevel-1-ref.html
+pref(mathml.disabled,true) fails-if(styloVsGecko) == disabled-scriptlevel-1.xhtml disabled-scriptlevel-1-ref.xhtml
 == displaystyle-1.html displaystyle-1-ref.html
 == displaystyle-2.html displaystyle-2-ref.html
 == displaystyle-3.html displaystyle-3-ref.html
 == displaystyle-4.html displaystyle-4-ref.html
 random-if(smallScreen&&Android) fuzzy(255,200) == mirror-op-1.html mirror-op-1-ref.html
 != mirror-op-2.html mirror-op-2-ref.html
 != mirror-op-3.html mirror-op-3-ref.html
 != mirror-op-4.html mirror-op-4-ref.html
@@ -37,18 +37,18 @@ random-if(smallScreen&&Android) fuzzy(25
 == mfenced-5b.xhtml mfenced-5-ref.xhtml
 == mfenced-5c.xhtml mfenced-5-ref.xhtml
 == mfenced-5d.xhtml mfenced-5-ref.xhtml
 == mfenced-6.html mfenced-6-ref.html
 == mfenced-7.html mfenced-7-ref.html
 != mfenced-8.html mfenced-8-ref.html
 == mfenced-9.html mfenced-9-ref.html
 == mfenced-10.html mfenced-10-ref.html
-fails-if(gtkWidget&&!stylo) == mfenced-11.html mfenced-11-ref.html # bug 670592, bug 1328771
-fails-if(gtkWidget&&!stylo) == mfenced-12.html mfenced-12-ref.html # bug 670592, bug 1328771
+fails-if(gtkWidget&&!styloVsGecko) == mfenced-11.html mfenced-11-ref.html # bug 670592, bug 1328771
+fails-if(gtkWidget&&!styloVsGecko) == mfenced-12.html mfenced-12-ref.html # bug 670592, bug 1328771
 == mi-mathvariant-1.xhtml mi-mathvariant-1-ref.xhtml
 == mi-mathvariant-2.xhtml mi-mathvariant-2-ref.xhtml
 != mi-mathvariant-3.html mi-mathvariant-3-ref.html
 != non-spacing-accent-1.xhtml non-spacing-accent-1-ref.xhtml
 == overbar-width-1.xhtml overbar-width-1-ref.xhtml
 == quotes-1.xhtml quotes-1-ref.xhtml
 != stretchy-underbar-1.xhtml stretchy-underbar-1-ref.xhtml
 != stretchy-munderover-1a.html stretchy-munderover-1-ref.html
@@ -76,17 +76,17 @@ fails-if(gtkWidget&&!stylo) == mfenced-1
 == stretchy-mfenced-2a.html stretchy-mfenced-2-ref.html
 != stretchy-mfenced-2b.html stretchy-mfenced-2-ref.html
 != stretchy-mfenced-3a.html stretchy-mfenced-3-ref.html
 != stretchy-mfenced-3b.html stretchy-mfenced-3-ref.html
 == stretchy-mfenced-4a.html stretchy-mfenced-4-ref.html
 == stretchy-mfenced-4b.html stretchy-mfenced-4-ref.html
 == stretchy-mover-1a.html stretchy-mover-1-ref.html
 == stretchy-mover-1b.html stretchy-mover-1-ref.html
-fails-if(!stylo) == stretchy-mover-2a.html stretchy-mover-2-ref.html
+fails-if(!styloVsGecko) == stretchy-mover-2a.html stretchy-mover-2-ref.html
 != stretchy-mover-2b.html stretchy-mover-2-ref.html
 == stretchy-mover-3.html stretchy-mover-3-ref.html
 == stretchy-largeop-1.html stretchy-largeop-1-ref.html
 == stretchy-largeop-2.html stretchy-largeop-2-ref.html
 == stretchy-largeop-3.html stretchy-largeop-3-ref.html
 == table-width-1.xhtml table-width-1-ref.xhtml
 == table-width-2.html table-width-2-ref.html
 == table-width-3.html table-width-3-ref.html
@@ -109,17 +109,17 @@ fails-if(!stylo) == stretchy-mover-2a.ht
 != embellished-op-3-3.html embellished-op-3-3-ref.html
 != embellished-op-3-4.html embellished-op-3-4-ref.html
 != embellished-op-3-5.html embellished-op-3-5-ref.html
 == embellished-op-4-1.html embellished-op-4-1-ref.html
 == embellished-op-4-2.html embellished-op-4-2-ref.html
 == embellished-op-4-3.html embellished-op-4-3-ref.html
 == embellished-op-5-1.html embellished-op-5-ref.html
 == embellished-op-5-2.html embellished-op-5-ref.html
-fails-if(gtkWidget&&!stylo) random-if(winWidget) == semantics-1.xhtml semantics-1-ref.xhtml # bug 1309429, bug 1328771
+fails-if(gtkWidget&&!styloVsGecko) random-if(winWidget) == semantics-1.xhtml semantics-1-ref.xhtml # bug 1309429, bug 1328771
 == semantics-2.html semantics-2-ref.html
 == semantics-3.html semantics-3-ref.html
 == semantics-4.html semantics-4-ref.html
 != mathcolor-1.xml mathcolor-1-ref.xml
 != mathcolor-2.xml mathcolor-2-ref.xml
 != mathcolor-3.xml mathcolor-3-ref.xml
 == mathcolor-4.xml mathcolor-4-ref.xml
 != mathbackground-1.xml mathbackground-1-ref.xml
@@ -193,17 +193,17 @@ random-if(gtkWidget) == mpadded-9.html m
 == mo-lspace-rspace-4.html mo-lspace-rspace-4-ref.html
 == mo-invisibleoperators.html mo-invisibleoperators-ref.html
 == mo-invisibleoperators-2.html mo-invisibleoperators-2-ref.html
 random-if(gtkWidget) == mo-glyph-size.html mo-glyph-size-ref.html # bug 1309426
 == maction-dynamic-3.html maction-dynamic-3-ref.html # bug 773482
 == whitespace-trim-1.html whitespace-trim-1-ref.html
 == whitespace-trim-2.html whitespace-trim-2-ref.html
 == whitespace-trim-3.html whitespace-trim-3-ref.html
-fails-if(!stylo) == whitespace-trim-4.html whitespace-trim-4-ref.html # Bug 787215
+fails-if(!styloVsGecko) == whitespace-trim-4.html whitespace-trim-4-ref.html # Bug 787215
 == whitespace-trim-5.html whitespace-trim-5-ref.html
 random-if(winWidget&&!d2d) == opentype-stretchy.html opentype-stretchy-ref.html
 == opentype-fraction-dynamic-linethickness.html opentype-fraction-dynamic-linethickness-ref.html
 == operator-1.xhtml operator-1-ref.xhtml
 == scriptshift-1.xhtml scriptshift-1-ref.xhtml
 == number-size-1.xhtml number-size-1-ref.xhtml
 fuzzy-if(skiaContent,1,80) skip-if(winWidget) == multiscripts-1.html multiscripts-1-ref.html # Windows: bug 1314684
 == mathml-mmultiscript-base.html mathml-mmultiscript-base-ref.html
@@ -285,22 +285,22 @@ fuzzy-if(d2d,7,1) == menclose-6-updiagon
 == menclose-6-phasorangle.html menclose-6-ref.html
 == mmultiscript-align.html mmultiscript-align-ref.html
 fails-if(winWidget) == subscript-italic-correction.html subscript-italic-correction-ref.html # bug 961482
 fails-if(Android) == mathvariant-1a.html mathvariant-1a-ref.html # Bug 1010679
 fails-if(Android) == mathvariant-1b.html mathvariant-1b-ref.html # Bug 1010679
 fails-if(Android) == mathvariant-1c.html mathvariant-1c-ref.html # Bug 1010679
 == mathvariant-1d.html mathvariant-1d-ref.html
 fails-if(Android||OSX) == mathvariant-2.html mathvariant-2-ref.html # Bugs 1010678, 1010679
-fails-if(stylo) == mathvariant-3.html mathvariant-3-ref.html
+== mathvariant-3.html mathvariant-3-ref.html
 == mathvariant-4.html mathvariant-4-ref.html
 == mathvariant-5.html mathvariant-5-ref.html
 == dtls-1.html dtls-1-ref.html
-fails-if(stylo) == dtls-2.html dtls-2-ref.html # bug 1366206
-fails-if(stylo) == dtls-3.html dtls-3-ref.html # bug 1366206
+fails-if(styloVsGecko) == dtls-2.html dtls-2-ref.html # bug 1366206
+fails-if(styloVsGecko) == dtls-3.html dtls-3-ref.html # bug 1366206
 == ssty-1.html ssty-1-ref.html
 == ssty-2.html ssty-2-ref.html
 == ssty-3.html ssty-3-ref.html
 == ssty-4.html ssty-4-ref.html
 == mathscript-1.html mathscript-1-ref.html
 == mathscript-2.html mathscript-2-ref.html
 == mo-accent-dynamic.html mo-accent-dynamic-ref.html
 == mo-movablelimits-dynamic.html mo-movablelimits-dynamic-ref.html
@@ -364,17 +364,17 @@ fuzzy-if(OSX,1,100) fuzzy-if(skiaContent
 == mfrac-C-4.html mfrac-C-4-ref.html
 fuzzy-if(OSX,1,100) fuzzy-if(skiaContent,1,14) == mfrac-D-1.html mfrac-D-1-ref.html
 == mfrac-D-2.html mfrac-D-2-ref.html
 == mfrac-D-3.html mfrac-D-3-ref.html
 == mfrac-D-4.html mfrac-D-4-ref.html
 == mfrac-E-1.html mfrac-E-1-ref.html
 test-pref(dom.webcomponents.enabled,true) == shadow-dom-1.html shadow-dom-1-ref.html
 pref(font.size.inflation.emPerLine,25) == font-inflation-1.html font-inflation-1-ref.html
-test-pref(font.minimum-size.x-math,40) fails-if(stylo) == default-font.html default-font-ref.html
+test-pref(font.minimum-size.x-math,40) fails-if(styloVsGecko) == default-font.html default-font-ref.html
 != radicalbar-1.html about:blank
 != radicalbar-1a.html about:blank
 != radicalbar-1b.html about:blank
 != radicalbar-1c.html about:blank
 != radicalbar-1d.html about:blank
 != radicalbar-2.html about:blank
 != radicalbar-2a.html about:blank
 != radicalbar-2b.html about:blank
--- a/layout/reftests/native-theme/reftest.list
+++ b/layout/reftests/native-theme/reftest.list
@@ -2,24 +2,24 @@
 != button-not-blank.html about:blank
 != checkbox-not-blank.html about:blank
 != combobox-not-blank.html about:blank
 != fieldset-not-blank.html about:blank
 != file-not-blank.html about:blank
 != listbox-not-blank.html about:blank
 != radio-not-blank.html about:blank
 != text-control-not-blank.html about:blank
-fails-if(stylo) != textarea-not-blank.html about:blank
+fails-if(styloVsGecko) != textarea-not-blank.html about:blank
 
 # The following tests will fail if the platform does not have native
 # theme support (which all platforms should have).
 fails-if(!nativeThemePref) != text-input-native.html text-input-nonnative.html
-fuzzy-if(skiaContent,2,88) fails-if(stylo) == text-input-nonnative-when-styled.html text-input-nonnative-when-styled-ref.html
-fails-if(!nativeThemePref) fails-if(stylo) != textarea-native.html textarea-nonnative.html
-fuzzy-if(skiaContent,2,53) fails-if(stylo) == textarea-nonnative-when-styled.html textarea-nonnative-when-styled-ref.html
+fuzzy-if(skiaContent,2,88) fails-if(styloVsGecko) == text-input-nonnative-when-styled.html text-input-nonnative-when-styled-ref.html
+fails-if(!nativeThemePref) fails-if(styloVsGecko) != textarea-native.html textarea-nonnative.html
+fuzzy-if(skiaContent,2,53) fails-if(styloVsGecko) == textarea-nonnative-when-styled.html textarea-nonnative-when-styled-ref.html
 fails-if(!nativeThemePref) != button-native.html button-nonnative.html
 == button-nonnative-when-styled.html button-nonnative-when-styled-ref.html
 fails-if(!nativeThemePref&&!Android) != combobox-native.html combobox-nonnative.html
 == combobox-nonnative-when-styled.html combobox-nonnative-when-styled-ref.html
 fails-if(!nativeThemePref) needs-focus != listbox-native.html listbox-nonnative.html
 needs-focus == listbox-nonnative-when-styled.html listbox-nonnative-when-styled-ref.html
 fails-if(!nativeThemePref) != radio-native.html radio-nonnative.html
 == radio-still-native-when-styled.html radio-still-native-when-styled-ref.html
--- a/layout/reftests/object/reftest.list
+++ b/layout/reftests/object/reftest.list
@@ -30,18 +30,18 @@ HTTP == type-overridden-by-server.html t
 == unknown-type.html unknown-type-ref.html
 == malformed-xml.html malformed-xml-ref.html
 == malformed-xml-with-type.html malformed-xml-with-type-ref.html
 #
 # XXX missing tests 025-28 from http://biesi.damowmow.com/object/ here; would
 #     need to require Flash on the test machine to run them
 #
 # XXX need to support <img src="foo.svg"> for these to pass
-fails-if(!stylo) == svg.html svg-ref.html
-fails-if(!stylo) == svg-with-type.html svg-with-type-ref.html
+fails-if(!styloVsGecko) == svg.html svg-ref.html
+fails-if(!styloVsGecko) == svg-with-type.html svg-with-type-ref.html
 #
 # XXX missing test 031 from http://biesi.damowmow.com/object/ here; need to
 #     first support the standby attribute on objects, then need to figure out
 #     how to reproduce the setup needed for that test such that reftest will
 #     handle it correctly, since a still-loading image probably delays the
 #     snapshot reftest takes
 #
 # XXX missing test 032 from http://biesi.damowmow.com/object/ here; would
--- a/layout/reftests/ogg-video/reftest.list
+++ b/layout/reftests/ogg-video/reftest.list
@@ -1,35 +1,35 @@
 # NOTE: bug 1084564 covers "fails"/"skip" annotations for android below:
-fuzzy(255,5000) fails-if(stylo) == 444-1.html 444-1-ref.html
+fuzzy(255,5000) fails-if(styloVsGecko) == 444-1.html 444-1-ref.html
 fails-if(Android) HTTP(..) == aspect-ratio-1a.xhtml aspect-ratio-1-ref.html
 fails-if(Android) HTTP(..) == aspect-ratio-1b.xhtml aspect-ratio-1-ref.html
 fails-if(Android) skip-if(gtkWidget) HTTP(..) == aspect-ratio-2a.xhtml aspect-ratio-2-ref.html
 fails-if(Android) skip-if(gtkWidget) HTTP(..) == aspect-ratio-2b.xhtml aspect-ratio-2-ref.html
 HTTP(..) == aspect-ratio-3a.xhtml aspect-ratio-3-ref.xhtml
 HTTP(..) == aspect-ratio-3b.xhtml aspect-ratio-3-ref.xhtml
-fails-if(Android) random-if(layersGPUAccelerated) fails-if(stylo) == encoded-aspect-ratio-1.html encoded-aspect-ratio-1-ref.html
+fails-if(Android) random-if(layersGPUAccelerated) fails-if(styloVsGecko) == encoded-aspect-ratio-1.html encoded-aspect-ratio-1-ref.html
 fails-if(Android) HTTP(..) == basic-1.xhtml basic-1-ref.html
 skip-if(Android) HTTP(..) == canvas-1a.xhtml basic-1-ref.html
 fails-if(Android) HTTP(..) == canvas-1b.xhtml basic-1-ref.html
 == clipping-1a.html clipping-1-ref.html
 == empty-1a.html empty-1-ref.html
 == empty-1b.html empty-1-ref.html
 #these is skipped because we hang on the htmlparser tests when this is ran
 random skip-if(Android) HTTP(..) == object-aspect-ratio-1a.xhtml aspect-ratio-1-ref.html
 random skip-if(Android) HTTP(..) == object-aspect-ratio-1b.xhtml aspect-ratio-1-ref.html
 skip-if(Android) HTTP(..) == offset-1.xhtml offset-1-ref.html
 random skip-if(Android) HTTP(..) == object-aspect-ratio-2a.xhtml aspect-ratio-2-ref.html
 random skip-if(Android) HTTP(..) == object-aspect-ratio-2b.xhtml aspect-ratio-2-ref.html
 skip-if(Android) fuzzy-if(winWidget,1,56000) fuzzy-if(cocoaWidget,1,56000) HTTP(..) == zoomed-1.xhtml zoomed-1-ref.html # bug 778995 for fuzzy
-skip-if(Android) fails-if(stylo) == poster-1.html poster-ref-blue250x200.html
-skip-if(Android) fails-if(stylo) == poster-2.html poster-ref-black140x100.html
+skip-if(Android) fails-if(styloVsGecko) == poster-1.html poster-ref-blue250x200.html
+skip-if(Android) fails-if(styloVsGecko) == poster-2.html poster-ref-black140x100.html
 skip-if(Android) == poster-3.html poster-ref-black140x100.html
 skip-if(Android) == poster-4.html poster-ref-black140x100.html
 skip-if(Android) == poster-5.html poster-ref-black140x100.html
 skip-if(Android) == poster-6.html poster-ref-black140x100.html
 skip-if(Android) == poster-7.html poster-ref-red140x100.html
 skip-if(Android) == poster-8.html poster-ref-black140x100.html
 random skip-if(Android) == poster-10.html poster-ref-blue125x100.html
-random skip-if(Android) fails-if(stylo) == poster-11.html poster-ref-blue140x100.html
-random skip-if(Android) fails-if(stylo) == poster-12.html poster-ref-blue140x100.html
+random skip-if(Android) fails-if(styloVsGecko) == poster-11.html poster-ref-blue140x100.html
+random skip-if(Android) fails-if(styloVsGecko) == poster-12.html poster-ref-blue140x100.html
 skip-if(Android) == poster-13.html poster-ref-blue400x300.html
 skip-if(Android) == poster-15.html poster-ref-green70x30.html
--- a/layout/reftests/pagination/reftest.list
+++ b/layout/reftests/pagination/reftest.list
@@ -17,39 +17,39 @@ pref(layout.css.box-decoration-break.ena
 == abspos-breaking-dynamic-002.html abspos-breaking-dynamic-002-ref.html
 == abspos-breaking-dynamic-003.html abspos-breaking-dynamic-003-ref.html
 == abspos-overflow-01.xhtml abspos-overflow-01.ref.xhtml
 == abspos-overflow-01-cols.xhtml abspos-overflow-01-cols.ref.xhtml
 == border-breaking-000-cols.xhtml border-breaking-000-cols.ref.xhtml
 == border-breaking-001-cols.xhtml border-breaking-001-cols.ref.xhtml
 == border-breaking-002-cols.xhtml border-breaking-002-cols.ref.xhtml
 == border-breaking-003-cols.xhtml border-breaking-003-cols.ref.xhtml
-fails-if(!stylo) == border-breaking-004-cols.xhtml border-breaking-002-cols.ref.xhtml
+fails-if(!styloVsGecko) == border-breaking-004-cols.xhtml border-breaking-002-cols.ref.xhtml
 == content-inserted-000.xhtml content-inserted-000.ref.xhtml
 == content-inserted-001.xhtml content-inserted-001.ref.xhtml
 == content-inserted-002.xhtml content-inserted-002.ref.xhtml
 == content-inserted-003.xhtml content-inserted-002.ref.xhtml
 == content-inserted-004.xhtml content-inserted-002.ref.xhtml
 == content-inserted-005.xhtml content-inserted-002.ref.xhtml
 == content-inserted-006.xhtml content-inserted-002.ref.xhtml
 == content-inserted-007.xhtml content-inserted-002.ref.xhtml
 == content-inserted-008.xhtml content-inserted-001.ref.xhtml
 == content-inserted-009.xhtml content-inserted-002.ref.xhtml
 == dynamic-abspos-overflow-01-cols.xhtml dynamic-abspos-overflow-01-cols.ref.xhtml
-test-pref(layout.float-fragments-inside-column.enabled,false) fails-if(!stylo) == float-clear-000.html float-clear-000.ref.html
+test-pref(layout.float-fragments-inside-column.enabled,false) fails-if(!styloVsGecko) == float-clear-000.html float-clear-000.ref.html
 test-pref(layout.float-fragments-inside-column.enabled,true) == float-clear-000.html float-clear-000.ref.html
-fails-if(!stylo) == float-clear-001.html float-clear-000.ref.html
-test-pref(layout.float-fragments-inside-column.enabled,false) fails-if(!stylo) == float-clear-002.html float-clear-000.ref.html
+fails-if(!styloVsGecko) == float-clear-001.html float-clear-000.ref.html
+test-pref(layout.float-fragments-inside-column.enabled,false) fails-if(!styloVsGecko) == float-clear-002.html float-clear-000.ref.html
 test-pref(layout.float-fragments-inside-column.enabled,true) == float-clear-002.html float-clear-000.ref.html
-fails-if(!stylo) == float-clear-003.html float-clear-000.ref.html
+fails-if(!styloVsGecko) == float-clear-003.html float-clear-000.ref.html
 == float-clear-000-print.html float-clear-000-print.ref.html
 == float-clear-001-print.html float-clear-000-print.ref.html
 == float-clear-002-print.html float-clear-000-print.ref.html
 == float-clear-003-print.html float-clear-000-print.ref.html
-fails-if(!stylo) == float-continuations-000.html float-continuations-000.ref.html
+fails-if(!styloVsGecko) == float-continuations-000.html float-continuations-000.ref.html
 fuzzy-if(skiaContent,1,21) == resize-reflow-000.html resize-reflow-000.ref.html
 fuzzy-if(skiaContent,1,23) == resize-reflow-001.html resize-reflow-001.ref.html
 == table-page-break-before-auto-1.html table-page-break-before-auto-1-ref.html
 #== table-page-break-before-auto-2.html table-page-break-before-auto-2-ref.html bug 563280
 == table-page-break-before-always-1.html table-page-break-before-auto-2-ref.html
 == table-page-break-before-left-1.html table-page-break-before-auto-2-ref.html
 == table-page-break-before-right-1.html table-page-break-before-auto-2-ref.html
 == table-page-break-after-always-1.html table-page-break-before-auto-2-ref.html
@@ -69,9 +69,9 @@ fuzzy-if(skiaContent,1,23) == resize-ref
 == table-caption-splitaftercaption-5.html table-caption-splitaftercaption-5-ref.html
 == table-caption-splitaftercaption-6.html table-caption-splitaftercaption-6-ref.html
 == table-caption-splitaftercaption-7.html table-caption-splitaftercaption-7-ref.html
 # == table-caption-splitaftercaption-8.html blank.html # bug 672654
 # == table-caption-splitaftercaption-9.html blank.html # bug 672654
 # == table-caption-splitaftercaption-10.html blank.html # bug 672654
 # == table-caption-splitaftercaption-11.html blank.html # bug 672654
 == column-balancing-break-inside-avoid-2.html column-balancing-break-inside-avoid-2-ref.html
-fails-if(stylo) == combobox-page-break-inside.html combobox-page-break-inside-ref.html
+fails-if(styloVsGecko) == combobox-page-break-inside.html combobox-page-break-inside-ref.html
--- a/layout/reftests/pixel-rounding/reftest.list
+++ b/layout/reftests/pixel-rounding/reftest.list
@@ -75,28 +75,28 @@
 == background-image-height-top-5.html background-image-height-5.html
 == background-image-height-top-6.html background-image-height-6.html
 == background-image-width-left-4.html background-image-width-4.html
 == background-image-width-left-5.html background-image-width-5.html
 == background-image-width-left-6.html background-image-width-6.html
 
 
 # These all fail due bug 371180, plus a bunch of other bugs that ought to be filed.
-fails-if(!stylo) == collapsed-border-height-4.html border-base-ref.html
-fails-if(!stylo) == collapsed-border-height-5.html border-height-10-ref.html
-fails-if(!stylo) == collapsed-border-height-6.html border-height-10-ref.html
-fails-if(!stylo) == collapsed-border-width-4.html border-base-ref.html
-fails-if(!stylo) == collapsed-border-width-5.html border-width-10-ref.html
-fails-if(!stylo) == collapsed-border-width-6.html border-width-10-ref.html
-fails-if(!stylo) == collapsed-border-left-4.html border-base-ref.html
-fails-if(!stylo) == collapsed-border-left-5.html border-left-10-ref.html
-fails-if(!stylo) == collapsed-border-left-6.html border-left-10-ref.html
-fails-if(!stylo) == collapsed-border-top-4.html border-base-ref.html
-fails-if(!stylo) == collapsed-border-top-5.html border-top-10-ref.html
-fails-if(!stylo) == collapsed-border-top-6.html border-top-10-ref.html
+fails-if(!styloVsGecko) == collapsed-border-height-4.html border-base-ref.html
+fails-if(!styloVsGecko) == collapsed-border-height-5.html border-height-10-ref.html
+fails-if(!styloVsGecko) == collapsed-border-height-6.html border-height-10-ref.html
+fails-if(!styloVsGecko) == collapsed-border-width-4.html border-base-ref.html
+fails-if(!styloVsGecko) == collapsed-border-width-5.html border-width-10-ref.html
+fails-if(!styloVsGecko) == collapsed-border-width-6.html border-width-10-ref.html
+fails-if(!styloVsGecko) == collapsed-border-left-4.html border-base-ref.html
+fails-if(!styloVsGecko) == collapsed-border-left-5.html border-left-10-ref.html
+fails-if(!styloVsGecko) == collapsed-border-left-6.html border-left-10-ref.html
+fails-if(!styloVsGecko) == collapsed-border-top-4.html border-base-ref.html
+fails-if(!styloVsGecko) == collapsed-border-top-5.html border-top-10-ref.html
+fails-if(!styloVsGecko) == collapsed-border-top-6.html border-top-10-ref.html
 
 
 != image-base-ref.html image-height-10-ref.html
 == image-height-4.html image-base-ref.html
 == image-height-5.html image-height-10-ref.html
 == image-height-6.html image-height-10-ref.html
 != image-base-ref.html image-top-10-ref.html
 == image-top-4.html image-base-ref.html
@@ -174,10 +174,10 @@ fuzzy-if(skiaContent,1,145) == rounded-b
 == background-image-tiling.html background-image-tiling-ref.html
 
 != border-image-width-0.html border-image-width-10.html
 == border-image-width-4.html border-image-width-0.html
 == border-image-width-9.html border-image-width-0.html
 
 == iframe-1.html iframe-1-ref.html
 
-fails-if(stylo) == viewport-units-rounding-1.html viewport-units-rounding-1-ref.html
+fails-if(styloVsGecko) == viewport-units-rounding-1.html viewport-units-rounding-1-ref.html
 == viewport-units-rounding-2.html about:blank
--- a/layout/reftests/position-sticky/reftest.list
+++ b/layout/reftests/position-sticky/reftest.list
@@ -36,16 +36,16 @@ fuzzy-if(Android,2,3) == stacking-contex
 fuzzy-if(Android,4,810) == containing-block-1.html containing-block-1-ref.html
 == overconstrained-1.html overconstrained-1-ref.html
 == overconstrained-2.html overconstrained-2-ref.html
 == overconstrained-3.html overconstrained-3-ref.html
 == inline-1.html inline-1-ref.html
 == inline-2.html inline-2-ref.html
 fuzzy-if(OSX,99,210) == inline-3.html inline-3-ref.html
 skip-if(!asyncPan) == inline-4.html inline-4-ref.html
-fails-if(!stylo) == column-contain-1a.html column-contain-1-ref.html
+fails-if(!styloVsGecko) == column-contain-1a.html column-contain-1-ref.html
 == column-contain-1b.html column-contain-1-ref.html
 == column-contain-2.html column-contain-2-ref.html
 == block-in-inline-1.html block-in-inline-1-ref.html
 fuzzy-if(skiaContent,1,22) fuzzy-if(winWidget&&!layersGPUAccelerated,116,1320) fuzzy-if(Android,8,1533) == block-in-inline-2.html block-in-inline-2-ref.html
 fuzzy-if(Android,8,630) fuzzy-if(OSX,1,11) fuzzy-if(skiaContent,1,220) fuzzy-if(winWidget&&!layersGPUAccelerated,116,1320) == block-in-inline-3.html block-in-inline-3-ref.html
 == block-in-inline-continuations.html block-in-inline-continuations-ref.html
 fuzzy-if(winWidget&&!layersGPUAccelerated,140,140) == inner-table-1.html inner-table-1-ref.html
--- a/layout/reftests/printing/reftest.list
+++ b/layout/reftests/printing/reftest.list
@@ -18,17 +18,17 @@
 == 577450-1.html 577450-1-ref.html
 == 626395-1a.html 626395-1-ref.html
 == 626395-1b.html 626395-1-ref.html
 == 626395-2a.html 626395-2-ref.html
 == 626395-2b.html 626395-2-ref.html
 == 626395-2c.html 626395-2-ref.html
 == 626395-2d.html 626395-2-ref.html
 == 652178-1.html 652178-1-ref.html
-fails-if(stylo) == 115199-1.html 115199-1-ref.html
+fails-if(styloVsGecko) == 115199-1.html 115199-1-ref.html
 == 115199-2a.html 115199-2-ref.html
 == 115199-2b.html 115199-2-ref.html
 == 652178-1.html 652178-1-ref2.html
 fuzzy-if(cocoaWidget,1,5000) == 745025-1.html 745025-1-ref.html
 == 820496-1.html 820496-1-ref.html
 
 # NOTE: These tests don't yet rigorously test what they're
 # trying to test (shrink-to-fit behavior), due to bug 967311.
--- a/layout/reftests/reftest-sanity/reftest.list
+++ b/layout/reftests/reftest-sanity/reftest.list
@@ -40,18 +40,18 @@ HTTP(..) == filter-1.xhtml filter-1-ref.
 HTTP(..) == filter-2.xhtml filter-2-ref.xhtml
 
 # test that the MozReftestInvalidate event fires
 == invalidation.html about:blank
 == zoom-invalidation.html zoom-invalidation-ref.html # bug 773482
 
 # test that xulRuntime.OS works
 fails-if(xulRuntime.OS!="Linux"&&!Android) == data:text/html,<body>Linux data:text/html,<script>document.write(navigator.platform.substr(0,5))</script>
-fails-if(xulRuntime.OS!="WINNT"&&!stylo) == data:text/html,<body>Win data:text/html,<script>document.write(navigator.platform.substr(0,3))</script>
-fails-if(xulRuntime.OS!="Darwin"&&!stylo) == data:text/html,<body>Mac data:text/html,<script>document.write(navigator.platform.substr(0,3))</script>
+fails-if(xulRuntime.OS!="WINNT"&&!styloVsGecko) == data:text/html,<body>Win data:text/html,<script>document.write(navigator.platform.substr(0,3))</script>
+fails-if(xulRuntime.OS!="Darwin"&&!styloVsGecko) == data:text/html,<body>Mac data:text/html,<script>document.write(navigator.platform.substr(0,3))</script>
 
 # test parsing of asserts() expressions
 asserts(0) load about:blank
 asserts(0-5) load about:blank
 asserts-if(true,0) load about:blank
 asserts-if(false,7) load about:blank
 asserts-if(true,0-4) load about:blank
 asserts-if(false,6-8) load about:blank
@@ -81,17 +81,17 @@ include default-preferences-tests.list
 != page-height-2in.html page-height-2.1in.html
 == page-height-2in.html page-height-nobreak.html
 == page-height-2.1in.html page-height-forcebreak.html
 
 # Check that tests that need focus are skipped when it's not available
 needs-focus load needs-focus.html
 
 # Bug 632636
-fails-if(!stylo) == data:text/plain,HELLO about:blank
+fails-if(!styloVsGecko) == data:text/plain,HELLO about:blank
 needs-focus == data:text/plain, about:blank
 
 # Sanity check of viewport+displayport overrides
 pref(dom.meta-viewport.enabled,true) skip-if(!browserIsRemote) != test-displayport-2.html test-displayport-ref.html # bug 593168
 skip-if(!browserIsRemote) fails-if(OSX&&layersGPUAccelerated) fuzzy-if(layersOMTC,1,1390) random-if(Android) random-if(transparentScrollbars) == 647192-1.html 647192-1-ref.html
 skip-if(!browserIsRemote) == 656041-1.html 656041-1-ref.html
 pref(dom.meta-viewport.enabled,true) skip-if(!browserIsRemote||layersOMTC) == test-displayport-bg.html test-displayport-ref.html # bug 694706
 
@@ -106,59 +106,59 @@ require-or(unrecognizedCondition,skip) s
 require-or(true&&unrecognizedCondition,skip) script scripttest-fail.html
 require-or(unrecognizedCondition&&true,skip) script scripttest-fail.html
 require-or(unrecognizedCondition,fails) script scripttest-fail.html
 require-or(true,fails) script scripttest-pass.html
 require-or(true&&true,fails) script scripttest-pass.html
 
 # tests for pref(...) syntax in manifest, including "fails" examples with incorrect prefs
 # a boolean pref
-pref(gfx.downloadable_fonts.enabled,true) skip-if(stylo) HTTP(..) != font-download.html font-default.html
-pref(gfx.downloadable_fonts.enabled,false) skip-if(stylo) HTTP(..) == font-download.html font-default.html
-fails-if(!stylo) pref(gfx.downloadable_fonts.enabled,0) skip-if(stylo) HTTP(..) == font-download.html font-default.html
-fails-if(!stylo) pref(gfx.downloadable_fonts.enabled,"foo") skip-if(stylo) HTTP(..) == font-download.html font-default.html
+pref(gfx.downloadable_fonts.enabled,true) skip-if(styloVsGecko) HTTP(..) != font-download.html font-default.html
+pref(gfx.downloadable_fonts.enabled,false) skip-if(styloVsGecko) HTTP(..) == font-download.html font-default.html
+fails-if(!styloVsGecko) pref(gfx.downloadable_fonts.enabled,0) skip-if(styloVsGecko) HTTP(..) == font-download.html font-default.html
+fails-if(!styloVsGecko) pref(gfx.downloadable_fonts.enabled,"foo") skip-if(styloVsGecko) HTTP(..) == font-download.html font-default.html
 # a non-existent pref
-fails-if(!stylo) pref(not.a.real.pref.name,1) skip-if(stylo) == font-download.html font-default.html
+fails-if(!styloVsGecko) pref(not.a.real.pref.name,1) skip-if(styloVsGecko) == font-download.html font-default.html
 # an integer pref
 pref(font.size.variable.x-western,16) == font-size-16.html font-default.html
 pref(font.size.variable.x-western,16) != font-size-24.html font-default.html
 pref(font.size.variable.x-western,24) == font-size-24.html font-default.html
 pref(font.size.variable.x-western,24) != font-size-16.html font-default.html
-fails-if(!stylo) pref(font.size.variable.x-western,false) skip-if(stylo) == font-size-16.html font-default.html
-fails-if(!stylo) pref(font.size.variable.x-western,"foo") skip-if(stylo) == font-size-16.html font-default.html
+fails-if(!styloVsGecko) pref(font.size.variable.x-western,false) skip-if(styloVsGecko) == font-size-16.html font-default.html
+fails-if(!styloVsGecko) pref(font.size.variable.x-western,"foo") skip-if(styloVsGecko) == font-size-16.html font-default.html
 # a string pref
 pref(font.default.x-western,"serif") == font-serif.html font-default.html
 pref(font.default.x-western,"serif") != font-sans-serif.html font-default.html
 pref(font.default.x-western,"sans-serif") == font-sans-serif.html font-default.html
 pref(font.default.x-western,"sans-serif") != font-serif.html font-default.html
 fails pref(font.default.x-western,true) == font-serif.html font-default.html
 fails pref(font.default.x-western,0) == font-serif.html font-default.html
 # tests for ref-pref, and test-pref
-ref-pref(font.size.variable.x-western,16) skip-if(stylo) == font-size-16.html font-default.html
-ref-pref(font.size.variable.x-western,16) skip-if(stylo) != font-size-24.html font-default.html
-ref-pref(font.size.variable.x-western,24) skip-if(stylo) == font-size-24.html font-default.html
-ref-pref(font.size.variable.x-western,24) skip-if(stylo) != font-size-16.html font-default.html
-fails-if(!stylo) ref-pref(font.size.variable.x-western,false) skip-if(stylo) == font-size-16.html font-default.html
-fails-if(!stylo) ref-pref(font.size.variable.x-western,"foo") skip-if(stylo) == font-size-16.html font-default.html
+ref-pref(font.size.variable.x-western,16) skip-if(styloVsGecko) == font-size-16.html font-default.html
+ref-pref(font.size.variable.x-western,16) skip-if(styloVsGecko) != font-size-24.html font-default.html
+ref-pref(font.size.variable.x-western,24) skip-if(styloVsGecko) == font-size-24.html font-default.html
+ref-pref(font.size.variable.x-western,24) skip-if(styloVsGecko) != font-size-16.html font-default.html
+fails-if(!styloVsGecko) ref-pref(font.size.variable.x-western,false) skip-if(styloVsGecko) == font-size-16.html font-default.html
+fails-if(!styloVsGecko) ref-pref(font.size.variable.x-western,"foo") skip-if(styloVsGecko) == font-size-16.html font-default.html
 test-pref(font.size.variable.x-western,16) == font-default.html font-size-16.html
 test-pref(font.size.variable.x-western,16) != font-default.html font-size-24.html
 test-pref(font.size.variable.x-western,24) == font-default.html font-size-24.html
 test-pref(font.size.variable.x-western,24) != font-default.html font-size-16.html
 fails test-pref(font.size.variable.x-western,false) == font-default.html font-size-16.html
 fails test-pref(font.size.variable.x-western,"foo") == font-default.html font-size-16.html
-ref-pref(font.size.variable.x-western,16) test-pref(font.size.variable.x-western,24) skip-if(stylo) != font-default.html font-default.html
-ref-pref(font.size.variable.x-western,24) test-pref(font.size.variable.x-western,16) skip-if(stylo) != font-default.html font-default.html
-ref-pref(font.size.variable.x-western,24) test-pref(font.size.variable.x-western,24) skip-if(stylo) == font-default.html font-default.html
+ref-pref(font.size.variable.x-western,16) test-pref(font.size.variable.x-western,24) skip-if(styloVsGecko) != font-default.html font-default.html
+ref-pref(font.size.variable.x-western,24) test-pref(font.size.variable.x-western,16) skip-if(styloVsGecko) != font-default.html font-default.html
+ref-pref(font.size.variable.x-western,24) test-pref(font.size.variable.x-western,24) skip-if(styloVsGecko) == font-default.html font-default.html
 # reftest syntax: fuzzy(maxPixelDifference,maxNumberDifferingPixels)
 fuzzy(1,250000) == fuzzy.html fuzzy-ref.html
 fuzzy(1,250000) != too-fuzzy.html fuzzy-ref.html
 fuzzy-if(true,1,250000) == fuzzy.html fuzzy-ref.html
 fuzzy-if(false,2,1) == fuzzy-ref.html fuzzy-ref.html
 # When using 565 fuzzy.html and fuzzy-ref.html will compare as equal
-fails-if(!stylo) fuzzy-if(false,2,1) random-if(Android) == fuzzy.html fuzzy-ref.html
+fails-if(!styloVsGecko) fuzzy-if(false,2,1) random-if(Android) == fuzzy.html fuzzy-ref.html
 
 # Test that reftest-no-paint fails correctly
 fails == reftest-no-paint.html reftest-no-paint-ref.html
 
 skip-if(!asyncPan||!browserIsRemote) == async-scroll-1a.html async-scroll-1-ref.html
 
 # Disable low-res painting for this test as it will cause more to
 # be drawn than we want.
@@ -174,24 +174,24 @@ fuzzy(112,800) skip-if(!Android) pref(ap
 != reftest-opaque-layer-pass.html about:blank
 != about:blank reftest-opaque-layer-pass.html
 fails == reftest-opaque-layer-fail.html reftest-opaque-layer-fail.html
 
 # If reftest-opaque-layer fails (no matter whether it fails in the test or in the reference),
 # it shouldn't matter whether the test matches the reference.
 fails != reftest-opaque-layer-fail.html reftest-opaque-layer-fail.html
 fails == reftest-opaque-layer-fail.html about:blank
-fails-if(!stylo) == about:blank reftest-opaque-layer-fail.html
+fails-if(!styloVsGecko) == about:blank reftest-opaque-layer-fail.html
 fails != reftest-opaque-layer-fail.html about:blank
-fails-if(!stylo) != about:blank reftest-opaque-layer-fail.html
+fails-if(!styloVsGecko) != about:blank reftest-opaque-layer-fail.html
 
 # reftest-opaque-layer and reftest-wait
 == reftest-opaque-layer-wait-pass.html reftest-opaque-layer-pass.html
 != reftest-opaque-layer-wait-pass.html about:blank
-fails fails-if(stylo) == reftest-opaque-layer-wait-fail.html reftest-opaque-layer-fail.html
-fails-if(!stylo) fails-if(stylo) != reftest-opaque-layer-wait-fail.html about:blank
+fails fails-if(styloVsGecko) == reftest-opaque-layer-wait-fail.html reftest-opaque-layer-fail.html
+fails-if(!styloVsGecko) fails-if(styloVsGecko) != reftest-opaque-layer-wait-fail.html about:blank
 
 # reftest-assigned-layer
 != reftest-assigned-layer-pass.html about:blank
-fails-if(!stylo) fails-if(stylo) != reftest-assigned-layer-fail-1.html about:blank
-fails-if(!stylo) fails-if(stylo) != reftest-assigned-layer-fail-2.html about:blank
-fails-if(!stylo) fails-if(stylo) != reftest-assigned-layer-fail-3.html about:blank
-fails-if(!stylo) fails-if(stylo) != reftest-assigned-layer-fail-4.html about:blank
+fails-if(!styloVsGecko) fails-if(styloVsGecko) != reftest-assigned-layer-fail-1.html about:blank
+fails-if(!styloVsGecko) fails-if(styloVsGecko) != reftest-assigned-layer-fail-2.html about:blank
+fails-if(!styloVsGecko) fails-if(styloVsGecko) != reftest-assigned-layer-fail-3.html about:blank
+fails-if(!styloVsGecko) fails-if(styloVsGecko) != reftest-assigned-layer-fail-4.html about:blank
--- a/layout/reftests/reftest.list
+++ b/layout/reftests/reftest.list
@@ -300,16 +300,19 @@ include scoped-style/reftest.list
 include scrolling/reftest.list
 
 # selection
 include selection/reftest.list
 
 # sticky positioning
 include position-sticky/reftest.list
 
+# stylesheet cloning
+include stylesheet-cloning/reftest.list
+
 # svg/
 include svg/reftest.list
 
 # tab-size/
 include tab-size/reftest.list
 
 # table-anonymous-boxes/
 include table-anonymous-boxes/reftest.list
@@ -421,8 +424,11 @@ include box-sizing/reftest.list
 # invalidation
 include invalidation/reftest.list
 
 # encodings
 include ../../dom/encoding/test/reftest/reftest.list
 
 # APZ/async positioning tests
 include ../../gfx/layers/apz/test/reftest/reftest.list
+
+# Media
+include ../../dom/media/test/reftest/reftest.list
--- a/layout/reftests/scoped-style/reftest.list
+++ b/layout/reftests/scoped-style/reftest.list
@@ -1,57 +1,57 @@
-fails-if(stylo) == scoped-style-001.html scoped-style-001-ref.html
-fails-if(stylo) == scoped-style-002.html scoped-style-002-ref.html
-fails-if(stylo) == scoped-style-003.html scoped-style-003-ref.html
-fails-if(stylo) == scoped-style-004.html scoped-style-004-ref.html
-fails-if(stylo) == scoped-style-005.html scoped-style-005-ref.html
+fails-if(styloVsGecko) == scoped-style-001.html scoped-style-001-ref.html
+fails-if(styloVsGecko) == scoped-style-002.html scoped-style-002-ref.html
+fails-if(styloVsGecko) == scoped-style-003.html scoped-style-003-ref.html
+fails-if(styloVsGecko) == scoped-style-004.html scoped-style-004-ref.html
+fails-if(styloVsGecko) == scoped-style-005.html scoped-style-005-ref.html
 == scoped-style-006.html scoped-style-006-ref.html
 == scoped-style-007.html scoped-style-007-ref.html
-fails-if(stylo) == scoped-style-008.html scoped-style-008-ref.html
-fails-if(stylo) == scoped-style-009.html scoped-style-009-ref.html
-fails-if(stylo) == scoped-style-010.html scoped-style-010-ref.html
-fails-if(stylo) == scoped-style-011.html scoped-style-011-ref.html
-fails-if(stylo) == scoped-style-012.html scoped-style-012-ref.html
-fails-if(stylo) == scoped-style-013.html scoped-style-013-ref.html
+fails-if(styloVsGecko) == scoped-style-008.html scoped-style-008-ref.html
+fails-if(styloVsGecko) == scoped-style-009.html scoped-style-009-ref.html
+fails-if(styloVsGecko) == scoped-style-010.html scoped-style-010-ref.html
+fails-if(styloVsGecko) == scoped-style-011.html scoped-style-011-ref.html
+fails-if(styloVsGecko) == scoped-style-012.html scoped-style-012-ref.html
+fails-if(styloVsGecko) == scoped-style-013.html scoped-style-013-ref.html
 == scoped-style-014.html scoped-style-014-ref.html
-fails-if(stylo) == scoped-style-015.html scoped-style-015-ref.html
+fails-if(styloVsGecko) == scoped-style-015.html scoped-style-015-ref.html
 == scoped-style-016.html scoped-style-016-ref.html
-fails-if(stylo) == scoped-style-017.html scoped-style-017-ref.html
-fails-if(stylo) == scoped-style-018.html scoped-style-018-ref.html
-fails-if(stylo) == scoped-style-019.svg scoped-style-019-ref.svg
+fails-if(styloVsGecko) == scoped-style-017.html scoped-style-017-ref.html
+fails-if(styloVsGecko) == scoped-style-018.html scoped-style-018-ref.html
+fails-if(styloVsGecko) == scoped-style-019.svg scoped-style-019-ref.svg
 == scoped-style-020.html scoped-style-020-ref.html
 == scoped-style-021.html scoped-style-021-ref.html
 == scoped-style-022.html scoped-style-022-ref.html
-fails-if(stylo) == scoped-style-023.html scoped-style-023-ref.html
+fails-if(styloVsGecko) == scoped-style-023.html scoped-style-023-ref.html
 == scoped-style-024.html scoped-style-024-ref.html
 == scoped-style-important-001.html scoped-style-important-001-ref.html
-fails-if(stylo) == scoped-style-important-002.html scoped-style-important-002-ref.html
+fails-if(styloVsGecko) == scoped-style-important-002.html scoped-style-important-002-ref.html
 == scoped-style-important-003.html scoped-style-important-003-ref.html
 == scoped-style-important-004.html scoped-style-important-004-ref.html
 == scoped-style-important-005.html scoped-style-important-005-ref.html
 == scoped-style-important-006.html scoped-style-important-006-ref.html
 == scoped-style-important-007.html scoped-style-important-007-ref.html
-fails-if(stylo) == scoped-style-dynamic-001.html scoped-style-dynamic-001-ref.html
-fails-if(stylo) == scoped-style-dynamic-002.html scoped-style-dynamic-002-ref.html
-fails-if(stylo) == scoped-style-dynamic-003.html scoped-style-dynamic-003-ref.html
-fails-if(stylo) == scoped-style-dynamic-004.html scoped-style-dynamic-004-ref.html
-asserts-if(stylo,1) == scoped-style-dynamic-005.html scoped-style-dynamic-005-ref.html
-skip-if(stylo) == scoped-style-dynamic-006.html scoped-style-dynamic-006-ref.html
-fails-if(stylo) == scoped-style-dynamic-007.html scoped-style-dynamic-007-ref.html
-fails-if(stylo) == scoped-style-dynamic-008.html scoped-style-dynamic-008-ref.html
-skip-if(stylo) == scoped-style-dynamic-009.html scoped-style-dynamic-009-ref.html
-asserts-if(stylo,1) == scoped-style-dynamic-010.html scoped-style-dynamic-010-ref.html
-fails-if(stylo) == scoped-style-dynamic-011.html scoped-style-dynamic-011-ref.html
-asserts-if(stylo,1) == scoped-style-dynamic-012.svg scoped-style-dynamic-012-ref.svg
-fails-if(stylo) asserts-if(stylo,1) == scoped-style-dynamic-013.svg scoped-style-dynamic-013-ref.svg
-asserts-if(stylo,1) == scoped-style-dynamic-014.svg scoped-style-dynamic-014-ref.svg
-fails-if(stylo) asserts-if(stylo,1) == scoped-style-dynamic-015.svg scoped-style-dynamic-015-ref.svg
-fails-if(stylo) == scoped-style-import.html scoped-style-import-ref.html
-fails-if(stylo) == scoped-style-media.html scoped-style-media-ref.html
-fails-if(stylo) == scoped-style-namespace.html scoped-style-namespace-ref.html
-fails-if(stylo) == scoped-style-charset.html scoped-style-charset-ref.html
-fails-if(stylo) == scoped-style-document.html scoped-style-document-ref.html
-fails-if(stylo) HTTP(..) == scoped-style-font-face.html scoped-style-font-face-ref.html
-fails-if(stylo) == scoped-style-keyframes.html scoped-style-keyframes-ref.html
-fails-if(stylo) == scoped-style-supports.html scoped-style-supports-ref.html
-pref(layout.css.scope-pseudo.enabled,true) fails-if(stylo) == scoped-style-pseudo-001.html scoped-style-pseudo-001-ref.html
-pref(layout.css.scope-pseudo.enabled,true) fails-if(stylo) == scoped-style-pseudo-002.html scoped-style-pseudo-002-ref.html
+fails-if(styloVsGecko) == scoped-style-dynamic-001.html scoped-style-dynamic-001-ref.html
+fails-if(styloVsGecko) == scoped-style-dynamic-002.html scoped-style-dynamic-002-ref.html
+fails-if(styloVsGecko) == scoped-style-dynamic-003.html scoped-style-dynamic-003-ref.html
+fails-if(styloVsGecko) == scoped-style-dynamic-004.html scoped-style-dynamic-004-ref.html
+asserts-if(styloVsGecko,1) == scoped-style-dynamic-005.html scoped-style-dynamic-005-ref.html
+skip-if(styloVsGecko) == scoped-style-dynamic-006.html scoped-style-dynamic-006-ref.html
+fails-if(styloVsGecko) == scoped-style-dynamic-007.html scoped-style-dynamic-007-ref.html
+fails-if(styloVsGecko) == scoped-style-dynamic-008.html scoped-style-dynamic-008-ref.html
+skip-if(styloVsGecko) == scoped-style-dynamic-009.html scoped-style-dynamic-009-ref.html
+asserts-if(styloVsGecko,1) == scoped-style-dynamic-010.html scoped-style-dynamic-010-ref.html
+fails-if(styloVsGecko) == scoped-style-dynamic-011.html scoped-style-dynamic-011-ref.html
+asserts-if(styloVsGecko,1) == scoped-style-dynamic-012.svg scoped-style-dynamic-012-ref.svg
+fails-if(styloVsGecko) asserts-if(styloVsGecko,1) == scoped-style-dynamic-013.svg scoped-style-dynamic-013-ref.svg
+asserts-if(styloVsGecko,1) == scoped-style-dynamic-014.svg scoped-style-dynamic-014-ref.svg
+fails-if(styloVsGecko) asserts-if(styloVsGecko,1) == scoped-style-dynamic-015.svg scoped-style-dynamic-015-ref.svg
+fails-if(styloVsGecko) == scoped-style-import.html scoped-style-import-ref.html
+fails-if(styloVsGecko) == scoped-style-media.html scoped-style-media-ref.html
+fails-if(styloVsGecko) == scoped-style-namespace.html scoped-style-namespace-ref.html
+fails-if(styloVsGecko) == scoped-style-charset.html scoped-style-charset-ref.html
+fails-if(styloVsGecko) == scoped-style-document.html scoped-style-document-ref.html
+fails-if(styloVsGecko) HTTP(..) == scoped-style-font-face.html scoped-style-font-face-ref.html
+fails-if(styloVsGecko) == scoped-style-keyframes.html scoped-style-keyframes-ref.html
+fails-if(styloVsGecko) == scoped-style-supports.html scoped-style-supports-ref.html
+pref(layout.css.scope-pseudo.enabled,true) fails-if(styloVsGecko) == scoped-style-pseudo-001.html scoped-style-pseudo-001-ref.html
+pref(layout.css.scope-pseudo.enabled,true) fails-if(styloVsGecko) == scoped-style-pseudo-002.html scoped-style-pseudo-002-ref.html
 pref(layout.css.scope-pseudo.enabled,true) == scoped-style-pseudo-003.html scoped-style-pseudo-003-ref.html
--- a/layout/reftests/scrolling/reftest.list
+++ b/layout/reftests/scrolling/reftest.list
@@ -1,9 +1,9 @@
-skip-if(stylo) HTTP == deferred-anchor.xhtml#d deferred-anchor-ref.xhtml#d # bug 1354406
+skip-if(styloVsGecko) HTTP == deferred-anchor.xhtml#d deferred-anchor-ref.xhtml#d # bug 1354406
 fuzzy-if(xulRuntime.widgetToolkit=="gtk3",1,23) == deferred-anchor2.xhtml deferred-anchor-ref.xhtml#d # bug 1182632
 HTTP == fixed-1.html fixed-1.html?ref
 fuzzy-if(skiaContent,1,32200) HTTP == fixed-table-1.html fixed-table-1.html?ref
 HTTP == fixed-opacity-1.html fixed-opacity-1.html?ref
 HTTP == fixed-opacity-2.html fixed-opacity-2.html?ref
 random-if(gtkWidget) fuzzy-if(Android,3,60) HTTP == fixed-text-1.html fixed-text-1.html?ref
 HTTP == fixed-text-2.html fixed-text-2.html?ref
 random-if(Android) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),1,12) == iframe-border-radius.html iframe-border-radius-ref.html # bug 760269
@@ -15,19 +15,19 @@ skip-if(Android) pref(layout.css.scroll-
 skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-3.html scroll-behavior-3.html?ref # see bug 1041833
 skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-4.html scroll-behavior-4.html?ref # see bug 1041833
 skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-5.html scroll-behavior-5.html?ref # see bug 1041833
 skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-6.html scroll-behavior-6.html?ref # see bug 1041833
 skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-7.html scroll-behavior-7.html?ref # see bug 1041833
 skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-8.html scroll-behavior-8.html?ref # see bug 1041833
 skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-9.html scroll-behavior-9.html?ref # see bug 1041833
 skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-10.html scroll-behavior-10.html?ref # see bug 1041833
-skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) fails-if(stylo) == scroll-behavior-textarea.html scroll-behavior-textarea.html?ref # see bug 1320200
+skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) fails-if(styloVsGecko) == scroll-behavior-textarea.html scroll-behavior-textarea.html?ref # see bug 1320200
 HTTP == simple-1.html simple-1.html?ref
-skip-if(stylo) HTTP == subpixel-1.html#d subpixel-1-ref.html#d # bug 1354406
+skip-if(styloVsGecko) HTTP == subpixel-1.html#d subpixel-1-ref.html#d # bug 1354406
 fuzzy-if(Android,4,120) HTTP == text-1.html text-1.html?ref
 fuzzy-if(Android,4,120) HTTP == text-2.html?up text-2.html?ref
 fuzzy-if(d2d,1,4) HTTP == transformed-1.html transformed-1.html?ref
 HTTP == transformed-1.html?up transformed-1.html?ref
 fuzzy-if(Android,5,20000) == uncovering-1.html uncovering-1-ref.html
 fuzzy-if(Android,5,20000) == uncovering-2.html uncovering-2-ref.html
 fuzzy-if(asyncPan&&!layersGPUAccelerated,140,4520) == less-than-scrollbar-height.html less-than-scrollbar-height-ref.html
 == huge-horizontal-overflow.html huge-horizontal-overflow-ref.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/stylesheet-cloning/counter-style-rule-clone.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="data:text/css,@counter-style a { system: fixed; symbols: A B C D; suffix: '' }">
+<link rel="stylesheet" href="data:text/css,@counter-style a { system: fixed; symbols: A B C D; suffix: '' }">
+<link rel="stylesheet" href="test-common.css">
+<ol style="list-style-type: a">
+  <li><li><li><li><li>
+</ol>
+<script>
+  onload = function() {
+    var links = document.getElementsByTagName("link");
+    links[0].sheet.cssRules[0].symbols = "\25F0 \25F1 \25F2 \25F3";
+  }
+</script>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/layout/reftests/stylesheet-cloning/document-rule-clone.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="data:text/css,@-moz-document regexp('.*') {div { color: green; }}">
+<link rel="stylesheet" href="data:text/css,@-moz-document regexp('.*') {div { color: green; }}">
+<div>This should be green</div>
+<script>
+  onload = function() {
+    var links = document.getElementsByTagName("link");
+    links[0].sheet.cssRules[0].cssRules[0].style.color = "red";
+  }
+</script>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/stylesheet-cloning/glyphs-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<!-- list-style-type: a -->
+<div>A</div>
+<div>B</div>
+<div>C</div>
+<div>D</div>
+<div>5</div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/stylesheet-cloning/media-rule-clone.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="data:text/css,@media all {div { color: green; }}">
+<link rel="stylesheet" href="data:text/css,@media all {div { color: green; }}">
+<div>This should be green</div>
+<script>
+  onload = function() {
+    var links = document.getElementsByTagName("link");
+    links[0].sheet.cssRules[0].cssRules[0].style.color = "red";
+  }
+</script>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/stylesheet-cloning/ref-common.css
@@ -0,0 +1,12 @@
+body {
+  /* to match ua.css, see bug 1020143 */
+  font-variant-numeric: tabular-nums;
+}
+div, p {
+  padding: 0; margin: 0;
+  line-height: 150%;
+  float: left;
+}
+p {
+  padding-right: .5em;
+}
new file mode 100644
--- /dev/null
+++ b/layout/reftests/stylesheet-cloning/reftest.list
@@ -0,0 +1,6 @@
+fuzzy-if(webrender,212,342) == counter-style-rule-clone.html glyphs-ref.html # passes trivially
+# because "Dynamic change on @counter-style not yet supported"
+== document-rule-clone.html shouldbegreen-ref.html
+== media-rule-clone.html shouldbegreen-ref.html
+== style-rule-clone.html shouldbegreen-ref.html
+skip-if(stylo) == supports-rule-clone.html shouldbegreen-ref.html # bug 1367610
new file mode 100644
--- /dev/null
+++ b/layout/reftests/stylesheet-cloning/shouldbegreen-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<style>
+div {
+  color: green;
+}
+</style>
+<div>This should be green</div>
rename from layout/reftests/bugs/1348481-3.html
rename to layout/reftests/stylesheet-cloning/style-rule-clone.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/stylesheet-cloning/supports-rule-clone.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="data:text/css,@supports (color: green) {div { color: green; }}">
+<link rel="stylesheet" href="data:text/css,@supports (color: green) {div { color: green; }}">
+<div>This should be green</div>
+<script>
+  onload = function() {
+    var links = document.getElementsByTagName("link");
+    links[0].sheet.cssRules[0].cssRules[0].style.color = "red";
+  }
+</script>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/stylesheet-cloning/test-common.css
@@ -0,0 +1,18 @@
+body {
+  /* to match ua.css, see bug 1020143 */
+  font-variant-numeric: tabular-nums;
+}
+ol, ul, section, p {
+  padding: 0; margin: 0;
+  line-height: 150%;
+}
+ol, ul {
+  list-style-position: inside;
+}
+li, p {
+  float: left;
+  padding: 0;
+}
+p {
+  padding-right: .5em;
+}
--- a/layout/reftests/svg/as-image/reftest.list
+++ b/layout/reftests/svg/as-image/reftest.list
@@ -52,40 +52,40 @@ fuzzy(1,2) fuzzy-if(azureSkia,1,40000) =
 == canvas-drawImage-slice-1b.html lime100x100-ref.html
 
 == canvas-drawImage-origin-clean-1.html lime100x100-ref.html
 == canvas-drawImage-transform-restored.html canvas-drawImage-transform-restored-ref.html
 
 # Context paint tests (this feature is currently not part of any spec.)
 # context-fill:
 == context-fill-01.html blue100x100-ref.html
-fails-if(stylo) test-pref(svg.context-properties.content.enabled,true) == context-fill-01.html lime100x100-ref.html
+fails-if(styloVsGecko) test-pref(svg.context-properties.content.enabled,true) == context-fill-01.html lime100x100-ref.html
 == context-fill-02.html transparent100x100-w-border-ref.html
-fails-if(stylo) test-pref(svg.context-properties.content.enabled,true) == context-fill-02.html lime100x100-w-border-ref.html
-fails-if(stylo) test-pref(svg.context-properties.content.enabled,true) == context-fill-03.html lime100x100-50pct-ref.html
+fails-if(styloVsGecko) test-pref(svg.context-properties.content.enabled,true) == context-fill-02.html lime100x100-w-border-ref.html
+fails-if(styloVsGecko) test-pref(svg.context-properties.content.enabled,true) == context-fill-03.html lime100x100-50pct-ref.html
 # fuzz because on win8 the r & b components are off by one
-fails-if(stylo) fuzzy-if(winWidget,1,10000) test-pref(svg.context-properties.content.enabled,true) == context-fill-04.html lime100x100-50pct-ref.html
-fails-if(stylo) test-pref(svg.context-properties.content.enabled,true) == context-fill-05.html context-fill-or-stroke-05-ref.html
-fails-if(stylo) test-pref(svg.context-properties.content.enabled,true) == context-fill-06.html lime100x100-ref.html
-fails-if(stylo) test-pref(svg.context-properties.content.enabled,true) == context-fill-07.html context-fill-07-ref.html
+fails-if(styloVsGecko) fuzzy-if(winWidget,1,10000) test-pref(svg.context-properties.content.enabled,true) == context-fill-04.html lime100x100-50pct-ref.html
+fails-if(styloVsGecko) test-pref(svg.context-properties.content.enabled,true) == context-fill-05.html context-fill-or-stroke-05-ref.html
+fails-if(styloVsGecko) test-pref(svg.context-properties.content.enabled,true) == context-fill-06.html lime100x100-ref.html
+fails-if(styloVsGecko) test-pref(svg.context-properties.content.enabled,true) == context-fill-07.html context-fill-07-ref.html
 test-pref(svg.context-properties.content.enabled,true) == context-fill-08.html blue100x100-ref.html
-fails-if(stylo) test-pref(svg.context-properties.content.enabled,true) == context-fill-bg-image-01.html blue100x100-ref.html
+fails-if(styloVsGecko) test-pref(svg.context-properties.content.enabled,true) == context-fill-bg-image-01.html blue100x100-ref.html
 # context-stroke:
 == context-stroke-01.html blue100x100-ref.html
-fails-if(stylo) test-pref(svg.context-properties.content.enabled,true) == context-stroke-01.html lime100x100-ref.html
+fails-if(styloVsGecko) test-pref(svg.context-properties.content.enabled,true) == context-stroke-01.html lime100x100-ref.html
 == context-stroke-02.html transparent100x100-w-border-ref.html
-fails-if(stylo) test-pref(svg.context-properties.content.enabled,true) == context-stroke-02.html lime100x100-w-border-ref.html
-fails-if(stylo) test-pref(svg.context-properties.content.enabled,true) == context-stroke-03.html lime100x100-50pct-ref.html
+fails-if(styloVsGecko) test-pref(svg.context-properties.content.enabled,true) == context-stroke-02.html lime100x100-w-border-ref.html
+fails-if(styloVsGecko) test-pref(svg.context-properties.content.enabled,true) == context-stroke-03.html lime100x100-50pct-ref.html
 # fuzz because on win8 the r & b components are off by one
-fails-if(stylo) fuzzy-if(winWidget,1,10000) test-pref(svg.context-properties.content.enabled,true) == context-stroke-04.html lime100x100-50pct-ref.html
-fails-if(stylo) test-pref(svg.context-properties.content.enabled,true) == context-stroke-05.html context-fill-or-stroke-05-ref.html
-fails-if(stylo) test-pref(svg.context-properties.content.enabled,true) == context-stroke-06.html lime100x100-ref.html
+fails-if(styloVsGecko) fuzzy-if(winWidget,1,10000) test-pref(svg.context-properties.content.enabled,true) == context-stroke-04.html lime100x100-50pct-ref.html
+fails-if(styloVsGecko) test-pref(svg.context-properties.content.enabled,true) == context-stroke-05.html context-fill-or-stroke-05-ref.html
+fails-if(styloVsGecko) test-pref(svg.context-properties.content.enabled,true) == context-stroke-06.html lime100x100-ref.html
 test-pref(svg.context-properties.content.enabled,true) == context-stroke-07.html context-stroke-07-ref.html
 test-pref(svg.context-properties.content.enabled,true) == context-stroke-08.html blue100x100-border-ref.html
-fails-if(stylo) test-pref(svg.context-properties.content.enabled,true) == context-stroke-bg-image-01.html blue100x100-border-ref.html
+fails-if(styloVsGecko) test-pref(svg.context-properties.content.enabled,true) == context-stroke-bg-image-01.html blue100x100-border-ref.html
 
 # Simple <img> tests
 == img-simple-1.html  lime100x100-ref.html
 == img-simple-2.html  lime100x100-ref.html
 fuzzy-if(skiaContent,255,350) == img-simple-3.html  img-simple-3-ref.html
 == img-simple-4.html  lime100x100-ref.html
 fuzzy-if(skiaContent,255,90) == img-simple-5.html  img-simple-5-ref.html
 == img-simple-6.html  lime100x100-ref.html
--- a/layout/reftests/svg/filters/reftest.list
+++ b/layout/reftests/svg/filters/reftest.list
@@ -67,17 +67,17 @@ skip-if(d2d) == feGaussianBlur-cap-large
 
 == filter-clipped-rect-01.svg pass.svg
 == filter-in-pattern-01.svg pass.svg
 fuzzy(5,67) != filter-in-pattern-02.svg filter-in-pattern-02-ref.svg
 random-if(winWidget) == filter-in-mask.svg pass.svg # bug 1356139
 == filter-inner-svg-01.svg pass.svg
 == filter-inner-svg-02.svg pass.svg
 == filter-inner-svg-03.svg pass.svg
-fails-if(!stylo) == filter-marked-line-01.svg pass.svg # bug 477704
+fails-if(!styloVsGecko) == filter-marked-line-01.svg pass.svg # bug 477704
 == filter-kernelUnitLength-01.svg filter-kernelUnitLength-01-ref.svg
 == filter-marked-line-02.svg pass.svg
 == filter-marked-line-03.svg pass.svg
 == filter-marked-line-04.svg pass.svg
 == filter-marked-line-05.svg pass.svg
 == filter-marked-line-06.svg pass.svg
 == filter-marked-line-07.svg pass.svg
 == filter-marked-line-08.svg pass.svg
--- a/layout/reftests/svg/moz-only/reftest.list
+++ b/layout/reftests/svg/moz-only/reftest.list
@@ -1,19 +1,19 @@
 
 # XBL tests
 == xbl-basic-01.svg                             pass.svg
 == xbl-basic-02.svg                             pass.svg
 == xbl-basic-03.svg                             pass.svg
 == xbl-grad-ref--grad-in-binding-01.svg         pass.svg
 == xbl-grad-ref--grad-in-binding-02.svg         pass.svg
 == xbl-grad-ref--grad-in-bound-01.svg           pass.svg
-fails-if(!stylo) == xbl-grad-ref--grad-in-bound-02.svg     pass-black.svg
-fails-if(!stylo) == xbl-grad-ref--grad-in-resources-01.svg pass.svg
-fails-if(!stylo) == xbl-grad-ref--grad-in-resources-02.svg pass.svg
+fails-if(!styloVsGecko) == xbl-grad-ref--grad-in-bound-02.svg     pass-black.svg
+fails-if(!styloVsGecko) == xbl-grad-ref--grad-in-resources-01.svg pass.svg
+fails-if(!styloVsGecko) == xbl-grad-ref--grad-in-resources-02.svg pass.svg
 == xbl-grad-ref--grad-in-binding-03.svg         pass.svg
 == xbl-grad-ref--grad-in-bound-03.svg           pass.svg
 == xbl-grad-ref--grad-in-binding-04.svg         pass.svg
 == xbl-grad-ref--grad-in-bound-04.svg           pass.svg
 
 # Tests for zooming with the full page zoom UI
 random-if(d2d) == feImage-zoom-01a.svg          feImage-zoom-01-ref.svg
 random-if(d2d) == feImage-zoom-01b.svg          feImage-zoom-01-ref.svg
--- a/layout/reftests/svg/reftest.list
+++ b/layout/reftests/svg/reftest.list
@@ -90,19 +90,19 @@ default-preferences
 == conditions-02.svg pass.svg
 == conditions-03.svg pass.svg
 == conditions-04.svg pass.svg
 == conditions-05.svg about:blank
 == conditions-07.svg pass.svg
 fuzzy-if(skiaContent,1,320) == conditions-08.svg conditions-08-ref.svg
 == conditions-09.svg conditions-09-ref.svg
 
-fails-if(stylo) == currentColor-01.svg pass.svg
-fails-if(stylo) == currentColor-02.svg pass.svg
-fails-if(stylo) == currentColor-03.svg pass.svg
+fails-if(styloVsGecko) == currentColor-01.svg pass.svg
+fails-if(styloVsGecko) == currentColor-02.svg pass.svg
+fails-if(styloVsGecko) == currentColor-03.svg pass.svg
 
 == data-uri-with-filter-01.xhtml data-uri-with-filter-01-ref.svg
 == data-uri-with-gradient-01.xhtml data-uri-with-gradient-01-ref.svg
 == data-uri-with-pattern-01.xhtml pass.svg
 
 == dynamic-attr-removal-1.svg pass.svg
 == dynamic-attr-removal-2.svg pass.svg
 == dynamic-attr-change-1.svg pass.svg
@@ -284,17 +284,17 @@ fuzzy(1,5000) == mask-opacity-01.svg mas
 != mask-root-svg.svg about:blank
 == mask-transformed-01.svg mask-transformed-01-ref.svg
 == mask-transformed-02.svg pass.svg
 == mask-transformed-child-01.svg mask-transformed-child-01-ref.svg
 # fuzzy because of the differences between clipPath and mask clipping
 fuzzy-if(d2d||skiaContent,1,6400) == mask-type-01.svg mask-type-01-ref.svg
 fuzzy-if(d2d||skiaContent,1,6400) == mask-type-02.svg mask-type-01-ref.svg
 fuzzy-if(d2d||skiaContent,1,6400) == mask-type-03.svg mask-type-01-ref.svg
-fuzzy-if(d2d||skiaContent,1,6400) fails-if(stylo) == mask-type-04.svg mask-type-01-ref.svg
+fuzzy-if(d2d||skiaContent,1,6400) fails-if(styloVsGecko) == mask-type-04.svg mask-type-01-ref.svg
 == mask-use-element-01.svg pass.svg
 
 != nested-mask-mode.svg about:blank
 == nested-viewBox-01.svg pass.svg
 fuzzy-if(skiaContent,3,448000) == nesting-invalid-01.svg nesting-invalid-01-ref.svg
 
 fuzzy-if(d2d&&/^Windows\x20NT\x20(6\.1|10\.0)/.test(http.oscpu),63,168) fuzzy-if(cocoaWidget,1,122) fuzzy-if(skiaContent,2,1000) == non-scaling-stroke-01.svg non-scaling-stroke-01-ref.svg # bug 1074161 for Win7 and OSX 10.8
 fuzzy-if(gtkWidget,1,99) fuzzy-if(!contentSameGfxBackendAsCanvas,9,99) fuzzy-if(Android,9,586) == non-scaling-stroke-02.svg non-scaling-stroke-02-ref.svg
@@ -387,17 +387,17 @@ fuzzy-if(skiaContent,1,3600) == rect-01.
 
 == rootElement-null-01.svg pass.svg
 
 == script-empty-01.svg pass.svg
 
 == selector-01.svg pass.svg
 
 == stroke-dasharray-01.svg stroke-dasharray-01-ref.svg
-fuzzy-if(skiaContent,1,340) fails-if(stylo) == stroke-dasharray-02.svg pass.svg
+fuzzy-if(skiaContent,1,340) fails-if(styloVsGecko) == stroke-dasharray-02.svg pass.svg
 fuzzy-if(skiaContent,1,340) == stroke-dasharray-03.svg pass.svg
 == stroke-dasharray-and-pathLength-01.svg pass.svg
 == stroke-dasharray-and-text-01.svg stroke-dasharray-and-text-01-ref.svg
 == stroke-dashoffset-01.svg pass.svg
 == stroke-dashoffset-and-pathLength-01.svg pass.svg
 == stroke-linecap-circle-ellipse-01.svg stroke-linecap-circle-ellipse-01-ref.svg
 == stroke-linecap-circle-ellipse-dashed-01.svg pass.svg
 == stroke-linecap-round-w-zero-length-segs-01.svg pass.svg
@@ -502,17 +502,17 @@ fuzzy-if(skiaContent,1,300) == tspan-xy-
 fuzzy-if(skiaContent,1,300) == tspan-xy-04.svg tspan-xy-ref.svg
 fuzzy-if(skiaContent,1,300) == tspan-xy-05.svg tspan-xy-ref.svg
 fuzzy-if(skiaContent,1,300) == tspan-xy-06.svg tspan-xy-ref.svg
 fuzzy-if(skiaContent,1,100) == tspan-xy-anchor-middle-01.svg tspan-xy-anchor-middle-ref.svg
 fuzzy-if(skiaContent,1,100) == tspan-xy-anchor-end-01.svg tspan-xy-anchor-end-ref.svg
 
 == use-01.svg pass.svg
 == use-01-extref.svg pass.svg
-fails-if(stylo) == use-02-extref.svg use-02-extref-ref.svg
+fails-if(styloVsGecko) == use-02-extref.svg use-02-extref-ref.svg
 == use-extref-dataURI-01.svg pass.svg
 == use-children.svg pass.svg
 
 # test case for Fragment URLs
 # https://drafts.csswg.org/css-values/#local-urls
 == use-localRef-marker-01.svg use-localRef-marker-01-ref.svg
 == use-localRef-clipPath-01.svg use-localRef-clipPath-01-ref.svg
 == use-localRef-filter-01.svg use-localRef-filter-01-ref.svg
--- a/layout/reftests/svg/sizing/reftest.list
+++ b/layout/reftests/svg/sizing/reftest.list
@@ -302,11 +302,11 @@ random-if(Android) == object--auto-auto-
 # Here we have an assortment of different tests to check that updates occur
 # correctly when changes are made that should result in a change in the size
 # or position of the SVG.
 
 == dynamic--inline-css-height.xhtml             pass.svg
 == dynamic--inline-css-width.xhtml              pass.svg
 skip == dynamic--inline-resize-window-height.xhtml  pass.svg # XXX breaks the reftest run as the window height somehow is not restored
 skip == dynamic--inline-resize-window-width.xhtml    pass.svg # Fails way too much
-fails-if(!stylo) random-if(Android) == dynamic--object-svg-unloaded.xhtml     pass.svg
+fails-if(!styloVsGecko) random-if(Android) == dynamic--object-svg-unloaded.xhtml     pass.svg
 # == dynamic--object--auto-auto--pct-px.html 
 
--- a/layout/reftests/svg/smil/container/reftest.list
+++ b/layout/reftests/svg/smil/container/reftest.list
@@ -1,17 +1,17 @@
 # Tests related to SVG Animation (using SMIL), focusing on animation-sorting
 # to see which animation takes precedence (out of multiple animations on the
 # same attribute)
 
 random == enveloped-tree-1.xhtml enveloped-tree-1-ref.xhtml  # bug 470868
 fuzzy-if(cocoaWidget&&layersGPUAccelerated,1,3) fuzzy-if(skiaContent,1,810) == promoted-tree-1.xhtml promoted-tree-1-ref.xhtml
 random == moved-tree-1.xhtml moved-tree-1-ref.xhtml  # bug 470868
-random-if(cocoaWidget||d2d) fails-if(stylo) == deferred-anim-1.xhtml deferred-anim-1-ref.xhtml # bug 470868, bug 585484
-random-if(cocoaWidget&&layersGPUAccelerated) fails-if(stylo) == deferred-tree-1.xhtml deferred-tree-1-ref.xhtml # bug 470868
+random-if(cocoaWidget||d2d) fails-if(styloVsGecko) == deferred-anim-1.xhtml deferred-anim-1-ref.xhtml # bug 470868, bug 585484
+random-if(cocoaWidget&&layersGPUAccelerated) fails-if(styloVsGecko) == deferred-tree-1.xhtml deferred-tree-1-ref.xhtml # bug 470868
 random-if(cocoaWidget&&layersGPUAccelerated) fuzzy-if(skiaContent,1,530) == deferred-tree-2a.xhtml deferred-tree-2-ref.xhtml # bug 470868
 random-if(cocoaWidget&&layersGPUAccelerated) fuzzy-if(skiaContent,1,530) == deferred-tree-2b.xhtml deferred-tree-2-ref.xhtml # bug 470868
 fuzzy-if(cocoaWidget&&layersGPUAccelerated,1,16) fuzzy-if(skiaContent,1,410) == deferred-tree-3a.xhtml deferred-tree-3-ref.xhtml
 fuzzy-if(cocoaWidget&&layersGPUAccelerated,1,16) fuzzy-if(skiaContent,1,110) == deferred-tree-3b.xhtml deferred-tree-3-ref.xhtml
 fuzzy-if(cocoaWidget&&layersGPUAccelerated,1,16) fuzzy-if(skiaContent,1,110) == deferred-tree-3c.xhtml deferred-tree-3-ref.xhtml
 fuzzy-if(cocoaWidget&&layersGPUAccelerated,1,16) fuzzy-if(skiaContent,1,110) == deferred-tree-3d.xhtml deferred-tree-3-ref.xhtml
 # this will occasionally fail until we correctly clear animation effects from
 # no-longer-targeted elements
--- a/layout/reftests/svg/smil/event/reftest.list
+++ b/layout/reftests/svg/smil/event/reftest.list
@@ -1,32 +1,32 @@
 # Tests related to SVG Animation (using SMIL) that use event timing.
 
-fails-if(stylo) == event-begin-1.svg green-box-ref.svg
-fails-if(stylo) == event-begin-offset-1.svg green-box-ref.svg
-fails-if(stylo) == event-begin-offset-2.svg green-box-ref.svg
-fails-if(stylo) == event-begin-timeevent-1.svg green-box-ref.svg
-fails-if(stylo) == event-begin-timeevent-2.svg green-box-ref.svg
-random-if(Android) fails-if(stylo) == event-begin-timeevent-3.svg green-box-ref.svg
-fails-if(stylo) == event-begin-load-1.svg green-box-ref.svg
-fails-if(stylo) == event-bubble-1.svg green-box-ref.svg
-fails-if(stylo) == event-custom-1.svg green-box-ref.svg
+fails-if(styloVsGecko) == event-begin-1.svg green-box-ref.svg
+fails-if(styloVsGecko) == event-begin-offset-1.svg green-box-ref.svg
+fails-if(styloVsGecko) == event-begin-offset-2.svg green-box-ref.svg
+fails-if(styloVsGecko) == event-begin-timeevent-1.svg green-box-ref.svg
+fails-if(styloVsGecko) == event-begin-timeevent-2.svg green-box-ref.svg
+random-if(Android) fails-if(styloVsGecko) == event-begin-timeevent-3.svg green-box-ref.svg
+fails-if(styloVsGecko) == event-begin-load-1.svg green-box-ref.svg
+fails-if(styloVsGecko) == event-bubble-1.svg green-box-ref.svg
+fails-if(styloVsGecko) == event-custom-1.svg green-box-ref.svg
 == event-end-1.svg green-box-ref.svg
-fails-if(stylo) == event-end-2.svg green-box-ref.svg
-fails-if(stylo) == event-end-open-1.svg green-box-ref.svg
-fails-if(stylo) == event-end-trimmed-1.svg green-box-ref.svg
-fails-if(stylo) == event-preventDefault-1.svg green-box-ref.svg
-fails-if(stylo) == event-seek-1.svg green-box-ref.svg
-fails-if(stylo) == event-target-default-1.svg green-box-ref.svg
-fails-if(stylo) == event-target-default-2.svg green-box-ref.svg
-fails-if(stylo) == event-target-id-change-1.svg green-box-ref.svg
+fails-if(styloVsGecko) == event-end-2.svg green-box-ref.svg
+fails-if(styloVsGecko) == event-end-open-1.svg green-box-ref.svg
+fails-if(styloVsGecko) == event-end-trimmed-1.svg green-box-ref.svg
+fails-if(styloVsGecko) == event-preventDefault-1.svg green-box-ref.svg
+fails-if(styloVsGecko) == event-seek-1.svg green-box-ref.svg