Bug 1511138 - Fix lint and OSX-only test failure on a CLOSED TREE.
☠☠ backed out by 90189bd84466 ☠ ☠
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 06 Dec 2018 11:43:23 -0500
changeset 508764 65e99e6399b925b8ce7ce17b687096b94bf9f2e1
parent 508763 ab21d327592d969e876ee1c864e3da34f32b20a8
child 508765 90189bd84466d74e64d4eb2a33138152e84b241c
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1511138
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1511138 - Fix lint and OSX-only test failure on a CLOSED TREE.
layout/style/test/chrome/bug418986-2.js
toolkit/modules/LightweightThemeConsumer.jsm
--- a/layout/style/test/chrome/bug418986-2.js
+++ b/layout/style/test/chrome/bug418986-2.js
@@ -248,17 +248,19 @@ var testCSS = function (resisting) {
 };
 
 // __testOSXFontSmoothing(resisting)__.
 // When fingerprinting resistance is enabled, the `getComputedStyle`
 // should always return `undefined` for `MozOSXFontSmoothing`.
 var testOSXFontSmoothing = function (resisting) {
   let div = document.createElement("div");
   div.style.MozOsxFontSmoothing = "unset";
+  document.documentElement.appendChild(div);
   let readBack = window.getComputedStyle(div).MozOsxFontSmoothing;
+  div.remove();
   let smoothingPref = SpecialPowers.getBoolPref("layout.css.osx-font-smoothing.enabled", false);
   is(readBack, resisting ? "" : (smoothingPref ? "auto" : ""),
                "-moz-osx-font-smoothing");
 };
 
 // __sleep(timeoutMs)__.
 // Returns a promise that resolves after the given timeout.
 var sleep = function (timeoutMs) {
--- a/toolkit/modules/LightweightThemeConsumer.jsm
+++ b/toolkit/modules/LightweightThemeConsumer.jsm
@@ -214,17 +214,17 @@ LightweightThemeConsumer.prototype = {
   _setExperiment(active, experiment, properties) {
     const root = this._doc.documentElement;
     if (this._lastExperimentData) {
       const { stylesheet, usedVariables } = this._lastExperimentData;
       if (stylesheet) {
         stylesheet.remove();
       }
       if (usedVariables) {
-        for (const [variable, value] of usedVariables) {
+        for (const [variable] of usedVariables) {
           _setProperty(root, false, variable);
         }
       }
     }
 
     this._lastExperimentData = {};
 
     if (!active || !experiment) {
@@ -336,17 +336,17 @@ function _sanitizeCSSColor(doc, cssColor
   // Use !important so that the theme's stylesheets cannot override us.
   let div = doc.createElementNS(HTML_NS, "div");
   div.style.setProperty("color", "black", "important");
   div.style.setProperty("display", "none", "important");
   let span = doc.createElementNS(HTML_NS, "span");
   span.style.setProperty("color", cssColor, "important");
 
   // CSS variables are not allowed and should compute to black.
-  if (span.style.color.indexOf("var(") !== -1) {
+  if (span.style.color.includes("var(")) {
     span.style.color = "";
   }
 
   div.appendChild(span);
   doc.documentElement.appendChild(div);
   cssColor = doc.defaultView.getComputedStyle(span).color;
   div.remove();
   return cssColor;