Title: [186561] trunk/Source/WebInspectorUI
Revision
186561
Author
timo...@apple.com
Date
2015-07-08 18:14:03 -0700 (Wed, 08 Jul 2015)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186560 => 186561)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 01:03:55 UTC (rev 186560)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 01:14:03 UTC (rev 186561)
@@ -1,5 +1,20 @@
 2015-07-08  Timothy Hatcher  <timo...@apple.com>
 
+        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):
+
+2015-07-08  Timothy Hatcher  <timo...@apple.com>
+
         Web Inspector: Details sidebar doesn't activate on first selected resource in Network tab
         https://bugs.webkit.org/show_bug.cgi?id=146691
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (186560 => 186561)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js	2015-07-09 01:03:55 UTC (rev 186560)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js	2015-07-09 01:14:03 UTC (rev 186561)
@@ -74,6 +74,16 @@
         return this._recordings.slice();
     }
 
+    get autoCaptureOnPageLoad()
+    {
+        return this._autoCaptureOnPageLoad;
+    }
+
+    set autoCaptureOnPageLoad(autoCapture)
+    {
+        this._autoCaptureOnPageLoad = autoCapture;
+    }
+
     isCapturing()
     {
         return this._isCapturing;
@@ -504,6 +514,9 @@
 
     _startAutoCapturing(event)
     {
+        if (!this._autoCaptureOnPageLoad)
+            return false;
+
         if (!event.target.isMainFrame() || (this._isCapturing && !this._autoCapturingMainResource))
             return false;
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js (186560 => 186561)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js	2015-07-09 01:03:55 UTC (rev 186560)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js	2015-07-09 01:14:03 UTC (rev 186561)
@@ -42,6 +42,20 @@
         return WebInspector.TimelineTabContentView.Type;
     },
 
+    shown: function()
+    {
+        WebInspector.ContentBrowserTabContentView.prototype.shown.call(this);
+
+        WebInspector.timelineManager.autoCaptureOnPageLoad = true;
+    },
+
+    hidden: function()
+    {
+        WebInspector.ContentBrowserTabContentView.prototype.hidden.call(this);
+
+        WebInspector.timelineManager.autoCaptureOnPageLoad = false;
+    },
+
     canShowRepresentedObject: function(representedObject)
     {
         if (representedObject instanceof WebInspector.TimelineRecording)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to