Bug 1016047 - Stop box model highlighter causing toolbox jumping on small screen. r=bgrins, a=lmandel
authorMichael Ratcliffe <mratcliffe@mozilla.com>
Wed, 11 Jun 2014 16:05:22 +0100
changeset 208613 cdc3b72c1e38072bbf3eec03f62ed0c960de84ab
parent 208612 ebff751502d33d4e5d80aaa5d0a7e039cc65498b
child 208614 cc0ab48cb26439dc3e433d05a525535eab8651b9
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins, lmandel
bugs1016047
milestone32.0a2
Bug 1016047 - Stop box model highlighter causing toolbox jumping on small screen. r=bgrins, a=lmandel
toolkit/devtools/server/actors/highlighter.js
--- a/toolkit/devtools/server/actors/highlighter.js
+++ b/toolkit/devtools/server/actors/highlighter.js
@@ -336,16 +336,20 @@ BoxModelHighlighter.prototype = {
   _initMarkup: function() {
     let stack = this.browser.parentNode;
 
     this._highlighterContainer = this.chromeDoc.createElement("stack");
     this._highlighterContainer.className = "highlighter-container";
 
     this._svgRoot = this._createSVGNode("root", "svg", this._highlighterContainer);
 
+    // Set the SVG canvas height to 0 to stop content jumping around on small
+    // screens.
+    this._svgRoot.setAttribute("height", "0");
+
     this._boxModelContainer = this._createSVGNode("container", "g", this._svgRoot);
 
     this._boxModelNodes = {
       margin: this._createSVGNode("margin", "polygon", this._boxModelContainer),
       border: this._createSVGNode("border", "polygon", this._boxModelContainer),
       padding: this._createSVGNode("padding", "polygon", this._boxModelContainer),
       content: this._createSVGNode("content", "polygon", this._boxModelContainer)
     };