Changeset 186561 in webkit


Ignore:
Timestamp:
Jul 8, 2015, 6:14:03 PM (10 years ago)
Author:
timothy@apple.com
Message:

Web Inspector: Only record a timeline when the Timelines tab is showing
https://bugs.webkit.org/show_bug.cgi?id=146759

Reviewed by Joseph Pecoraro.

  • UserInterface/Controllers/TimelineManager.js:

(WebInspector.TimelineManager.prototype.get autoCaptureOnPageLoad):
(WebInspector.TimelineManager.prototype.set autoCaptureOnPageLoad):
(WebInspector.TimelineManager.prototype._startAutoCapturing):

  • UserInterface/Views/TimelineTabContentView.js:

(WebInspector.TimelineTabContentView.prototype.shown):
(WebInspector.TimelineTabContentView.prototype.hidden):

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r186540 r186561  
     12015-07-08  Timothy Hatcher  <timothy@apple.com>
     2
     3        Web Inspector: Only record a timeline when the Timelines tab is showing
     4        https://bugs.webkit.org/show_bug.cgi?id=146759
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        * UserInterface/Controllers/TimelineManager.js:
     9        (WebInspector.TimelineManager.prototype.get autoCaptureOnPageLoad):
     10        (WebInspector.TimelineManager.prototype.set autoCaptureOnPageLoad):
     11        (WebInspector.TimelineManager.prototype._startAutoCapturing):
     12        * UserInterface/Views/TimelineTabContentView.js:
     13        (WebInspector.TimelineTabContentView.prototype.shown):
     14        (WebInspector.TimelineTabContentView.prototype.hidden):
     15
    1162015-07-08  Timothy Hatcher  <timothy@apple.com>
    217
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js

    r186368 r186561  
    7575    }
    7676
     77    get autoCaptureOnPageLoad()
     78    {
     79        return this._autoCaptureOnPageLoad;
     80    }
     81
     82    set autoCaptureOnPageLoad(autoCapture)
     83    {
     84        this._autoCaptureOnPageLoad = autoCapture;
     85    }
     86
    7787    isCapturing()
    7888    {
     
    505515    _startAutoCapturing(event)
    506516    {
     517        if (!this._autoCaptureOnPageLoad)
     518            return false;
     519
    507520        if (!event.target.isMainFrame() || (this._isCapturing && !this._autoCapturingMainResource))
    508521            return false;
  • trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js

    r183764 r186561  
    4343    },
    4444
     45    shown: function()
     46    {
     47        WebInspector.ContentBrowserTabContentView.prototype.shown.call(this);
     48
     49        WebInspector.timelineManager.autoCaptureOnPageLoad = true;
     50    },
     51
     52    hidden: function()
     53    {
     54        WebInspector.ContentBrowserTabContentView.prototype.hidden.call(this);
     55
     56        WebInspector.timelineManager.autoCaptureOnPageLoad = false;
     57    },
     58
    4559    canShowRepresentedObject: function(representedObject)
    4660    {
Note: See TracChangeset for help on using the changeset viewer.