Bug 1507733 - Multiple flex-badges can appear active, even though just a single highlighter is visible on page r=pbro
authorMichael Ratcliffe <mratcliffe@mozilla.com>
Wed, 21 Nov 2018 17:19:36 +0000
changeset 503937 9555c7aee866a1e8a66ab82c8373d48272ca228b
parent 503936 d71137840bd8ccc0a656ab8719289a29e5449d61
child 503938 a615ca514a068ad4f4340b167358dcdeffbb26f1
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbro
bugs1507733
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 1507733 - Multiple flex-badges can appear active, even though just a single highlighter is visible on page r=pbro Differential Revision: https://phabricator.services.mozilla.com/D12566
devtools/server/actors/highlighters/flexbox.js
--- a/devtools/server/actors/highlighters/flexbox.js
+++ b/devtools/server/actors/highlighters/flexbox.js
@@ -303,21 +303,21 @@ class FlexboxHighlighter extends AutoRef
 
     if (!this.computedStyle) {
       this.computedStyle = getComputedStyle(this.currentNode);
     }
 
     const flex = this.currentNode.getAsFlexContainer();
 
     const oldCrossAxisDirection = this.crossAxisDirection;
-    this.crossAxisDirection = flex.crossAxisDirection;
+    this.crossAxisDirection = flex ? flex.crossAxisDirection : null;
     const newCrossAxisDirection = this.crossAxisDirection;
 
     const oldMainAxisDirection = this.mainAxisDirection;
-    this.mainAxisDirection = flex.mainAxisDirection;
+    this.mainAxisDirection = flex ? flex.mainAxisDirection : null;
     const newMainAxisDirection = this.mainAxisDirection;
 
     // Concatenate the axes to simplify conditionals.
     this.axes = `${this.mainAxisDirection} ${this.crossAxisDirection}`;
 
     const oldFlexData = this.flexData;
     this.flexData = getFlexData(this.currentNode);
     const hasFlexDataChanged = compareFlexData(oldFlexData, this.flexData);