Bug 985597 - Don't highlight hidden nodes; r=miker

This commit is contained in:
Patrick Brosset 2014-11-06 13:04:44 +01:00
parent 23e9947c95
commit ffc117236f

View File

@ -999,11 +999,16 @@ BoxModelHighlighter.prototype = Heritage.extend(AutoRefreshHighlighter.prototype
},
_nodeNeedsHighlighting: function() {
let hasNoQuads = !this.currentQuads.margin &&
!this.currentQuads.border &&
!this.currentQuads.padding &&
!this.currentQuads.content;
if (!this.currentNode ||
Cu.isDeadWrapper(this.currentNode) ||
this.currentNode.nodeType !== Ci.nsIDOMNode.ELEMENT_NODE ||
!this.currentNode.ownerDocument ||
!this.currentNode.ownerDocument.defaultView) {
!this.currentNode.ownerDocument.defaultView ||
hasNoQuads) {
return false;
}