Bug 910085 - The netmonitor sidepane resize should redraw the waterfalls, r=vporof
authorAndre Miranda <andreldm1989@gmail.com>
Wed, 28 Aug 2013 00:55:48 -0300
changeset 159120 5b664dac677c05dcd2a0ccb080c3792cfee3f4f6
parent 159119 bbddba8cc6e61b6a7a2f04308697b4ce481ddf77
child 159121 f583bcbb5e82affa7895b0b65d2a0794c47b6cfa
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvporof
bugs910085
milestone26.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 910085 - The netmonitor sidepane resize should redraw the waterfalls, r=vporof
browser/devtools/netmonitor/netmonitor-view.js
browser/devtools/netmonitor/netmonitor.xul
--- a/browser/devtools/netmonitor/netmonitor-view.js
+++ b/browser/devtools/netmonitor/netmonitor-view.js
@@ -255,33 +255,36 @@ function RequestsMenuView() {
 RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
   /**
    * Initialization function, called when the network monitor is started.
    */
   initialize: function() {
     dumpn("Initializing the RequestsMenuView");
 
     this.widget = new SideMenuWidget($("#requests-menu-contents"), false);
+    this._splitter = $('#splitter');
     this._summary = $("#request-menu-network-summary");
 
     this.allowFocusOnRightClick = true;
     this.widget.maintainSelectionVisible = false;
     this.widget.autoscrollWithAppendedItems = true;
 
     this.widget.addEventListener("select", this._onSelect, false);
+    this._splitter.addEventListener("mousemove", this._onResize, false);
     window.addEventListener("resize", this._onResize, false);
   },
 
   /**
    * Destruction function, called when the network monitor is closed.
    */
   destroy: function() {
     dumpn("Destroying the SourcesView");
 
     this.widget.removeEventListener("select", this._onSelect, false);
+    this._splitter.removeEventListener("mousemove", this._onResize, false);
     window.removeEventListener("resize", this._onResize, false);
   },
 
   /**
    * Resets this container (removes all the networking information).
    */
   reset: function() {
     this.empty();
@@ -1307,16 +1310,17 @@ RequestsMenuView.prototype = Heritage.ex
         this._cachedWaterfallWidth = containerBounds.width - waterfallBounds.left;
       } else {
         this._cachedWaterfallWidth = waterfallBounds.right;
       }
     }
     return this._cachedWaterfallWidth;
   },
 
+  _splitter: null,
   _summary: null,
   _canvas: null,
   _ctx: null,
   _cachedWaterfallWidth: 0,
   _cachedWaterfallBackground: "",
   _firstRequestStartedMillis: -1,
   _lastRequestEndedMillis: -1,
   _updateQueue: [],
--- a/browser/devtools/netmonitor/netmonitor.xul
+++ b/browser/devtools/netmonitor/netmonitor.xul
@@ -205,17 +205,17 @@
                 flex="100"/>
         <label id="request-menu-network-summary"
                class="plain requests-menu-footer-label"
                flex="1"
                crop="end"/>
       </hbox>
     </vbox>
 
-    <splitter class="devtools-side-splitter"/>
+    <splitter id="splitter" class="devtools-side-splitter"/>
 
     <deck id="details-pane"
           hidden="true">
       <vbox id="custom-pane"
             class="tabpanel-content">
         <hbox align="baseline">
           <label value="&netmonitorUI.custom.newRequest;"
                  class="plain tabpanel-summary-label