Bug 1174821 - 2 - Show only 1 box-model region on hover; r=janx
authorPatrick Brosset <pbrosset@mozilla.com>
Tue, 16 Jun 2015 17:01:21 +0200
changeset 279953 95869bbbeaba495e6c60c7ad394689ec1a3c8d05
parent 279952 0a83b62ea755489978df6ecf6a9b37835373aed3
child 279954 588059d28c7036d95098a6f7de77bd0f96c236ad
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanx
bugs1174821
milestone41.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 1174821 - 2 - Show only 1 box-model region on hover; r=janx
browser/devtools/layoutview/view.js
--- a/browser/devtools/layoutview/view.js
+++ b/browser/devtools/layoutview/view.js
@@ -536,22 +536,26 @@ LayoutView.prototype = {
     }
   }
 };
 
 let elts;
 
 let onmouseover = function(e) {
   let region = e.target.getAttribute("data-box");
+  if (!region) {
+    return false;
+  }
+
   this.layoutview.showBoxModel({region});
 
   return false;
 }.bind(window);
 
-let onmouseout = function(e) {
+let onmouseout = function() {
   this.layoutview.hideBoxModel();
   return false;
 }.bind(window);
 
 window.setPanel = function(panel) {
   this.layoutview = new LayoutView(panel, window);
 
   // Box model highlighter mechanism