Backed out changeset 5b110e44f7a6 (bug 1279703) for failing browser_styleinspector_tooltip-longhand-fontfamily.js. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Mon, 11 Jul 2016 13:37:21 +0200
changeset 304432 8f80e6e64a015c1b112765bd39a208c962f46824
parent 304431 89c3e4ca17f5c9d01638d49834a81789499e72ce
child 304433 b9b5cbd80ef44db336798ff42ef4e71541697115
child 304451 f9cae1b84fe26ada12aaa1ef08173948a6b54e83
push id19940
push userarchaeopteryx@coole-files.de
push dateMon, 11 Jul 2016 11:37:35 +0000
treeherderfx-team@8f80e6e64a01 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1279703
milestone50.0a1
backs out5b110e44f7a649a7b98d202ae36750a37efd95e1
Backed out changeset 5b110e44f7a6 (bug 1279703) for failing browser_styleinspector_tooltip-longhand-fontfamily.js. r=backout
devtools/client/inspector/shared/style-inspector-overlays.js
--- a/devtools/client/inspector/shared/style-inspector-overlays.js
+++ b/devtools/client/inspector/shared/style-inspector-overlays.js
@@ -7,17 +7,17 @@
 "use strict";
 
 // The style-inspector overlays are:
 // - tooltips that appear when hovering over property values
 // - editor tooltips that appear when clicking color swatches, etc.
 // - in-content highlighters that appear when hovering over property values
 // - etc.
 
-const {getColor} = require("devtools/client/shared/theme");
+const {getTheme} = require("devtools/client/shared/theme");
 const {HTMLTooltip} = require("devtools/client/shared/widgets/HTMLTooltip");
 const {
   getImageDimensions,
   setImageTooltip,
   setBrokenImageTooltip,
 } = require("devtools/client/shared/widgets/tooltip/ImageTooltipHelper");
 const {
   SwatchColorPickerTooltip,
@@ -467,17 +467,17 @@ TooltipsOverlay.prototype = {
     if (!font || !nodeFront || typeof nodeFront.getFontFamilyDataURL !== "function") {
       throw new Error("Unable to create font preview tooltip content.");
     }
 
     font = font.replace(/"/g, "'");
     font = font.replace("!important", "");
     font = font.trim();
 
-    let fillStyle = getColor("body-color");
+    let fillStyle = getTheme() === "light" ? "black" : "white";
     let {data, size: maxDim} = yield nodeFront.getFontFamilyDataURL(font, fillStyle);
 
     let imageUrl = yield data.string();
     let doc = this.view.inspector.panelDoc;
     let {naturalWidth, naturalHeight} = yield getImageDimensions(doc, imageUrl);
 
     yield setImageTooltip(this.previewTooltip, doc, imageUrl,
       {hideDimensionLabel: true, maxDim, naturalWidth, naturalHeight});