Bug 1456779 - Computed view should refresh on reflows. r=pbro draft
authorGabriel Luong <gabriel.luong@gmail.com>
Mon, 18 Jun 2018 11:32:08 -0400
changeset 808158 34dc74cbc6d9319b38470191fcd1f13bfae20d9e
parent 808157 a9ead3b8d077094d9e58f8676133114bccdb5ec6
push id113292
push userbmo:gl@mozilla.com
push dateMon, 18 Jun 2018 15:32:47 +0000
reviewerspbro
bugs1456779
milestone62.0a1
Bug 1456779 - Computed view should refresh on reflows. r=pbro MozReview-Commit-ID: 7ICu1xgzCHe
devtools/client/inspector/computed/computed.js
--- a/devtools/client/inspector/computed/computed.js
+++ b/devtools/client/inspector/computed/computed.js
@@ -1473,19 +1473,22 @@ ComputedViewTool.prototype = {
     // navigation.
     if (!this.computedView) {
       return;
     }
 
     const isInactive = !this.isSidebarActive() &&
                      this.inspector.selection.nodeFront;
     if (isInactive) {
+      this.inspector.reflowTracker.untrackReflows(this, this.refresh);
       return;
     }
 
+    this.inspector.reflowTracker.trackReflows(this, this.refresh);
+
     this.computedView.setPageStyle(this.inspector.pageStyle);
 
     if (!this.inspector.selection.isConnected() ||
         !this.inspector.selection.isElementNode()) {
       this.computedView.selectElement(null);
       return;
     }