Title: [164921] trunk/Source/WebInspectorUI
- Revision
- 164921
- Author
- [email protected]
- Date
- 2014-03-01 10:48:35 -0800 (Sat, 01 Mar 2014)
Log Message
Make Start Timeline Recording in the Develop menu show the Timeline view again.
This also fixes a noticeable delay between showing the sidebar and the default Timeline
view when initially opening the Web Inspector to the Timeline.
https://bugs.webkit.org/show_bug.cgi?id=129545
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Call TimelineSidebarPanel.initialize to prime the content view.
This is needed so the view is ready in this run loop cycle, where it was delayed before.
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setTimelineProfilingEnabled): Call TimelineSidebarPanel.showTimelineOverview.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.initialize): Added.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (164920 => 164921)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-03-01 18:48:16 UTC (rev 164920)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-03-01 18:48:35 UTC (rev 164921)
@@ -1,5 +1,24 @@
2014-03-01 Timothy Hatcher <[email protected]>
+ Make Start Timeline Recording in the Develop menu show the Timeline view again.
+
+ This also fixes a noticeable delay between showing the sidebar and the default Timeline
+ view when initially opening the Web Inspector to the Timeline.
+
+ https://bugs.webkit.org/show_bug.cgi?id=129545
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Base/Main.js:
+ (WebInspector.contentLoaded): Call TimelineSidebarPanel.initialize to prime the content view.
+ This is needed so the view is ready in this run loop cycle, where it was delayed before.
+ * UserInterface/Protocol/InspectorFrontendAPI.js:
+ (InspectorFrontendAPI.setTimelineProfilingEnabled): Call TimelineSidebarPanel.showTimelineOverview.
+ * UserInterface/Views/TimelineSidebarPanel.js:
+ (WebInspector.TimelineSidebarPanel.prototype.initialize): Added.
+
+2014-03-01 Timothy Hatcher <[email protected]>
+
Select the Resource navigation sidebar by default when there is no cookie.
https://bugs.webkit.org/show_bug.cgi?id=129544
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (164920 => 164921)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2014-03-01 18:48:16 UTC (rev 164920)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2014-03-01 18:48:35 UTC (rev 164921)
@@ -258,6 +258,8 @@
this.timelineSidebarPanel = new WebInspector.TimelineSidebarPanel;
this.debuggerSidebarPanel = new WebInspector.DebuggerSidebarPanel;
+ this.timelineSidebarPanel.initialize();
+
this.navigationSidebar.addSidebarPanel(this.resourceSidebarPanel);
// FIXME: Enable timelines panel for _javascript_ inspection.
if (this.debuggableType !== WebInspector.DebuggableType._javascript_)
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js (164920 => 164921)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js 2014-03-01 18:48:16 UTC (rev 164920)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js 2014-03-01 18:48:35 UTC (rev 164921)
@@ -58,6 +58,7 @@
{
if (enabled) {
WebInspector.navigationSidebar.selectedSidebarPanel = WebInspector.timelineSidebarPanel;
+ WebInspector.timelineSidebarPanel.showTimelineOverview();
WebInspector.timelineManager.startRecording();
} else {
WebInspector.timelineManager.stopRecording();
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js (164920 => 164921)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js 2014-03-01 18:48:16 UTC (rev 164920)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js 2014-03-01 18:48:35 UTC (rev 164921)
@@ -92,15 +92,6 @@
WebInspector.contentBrowser.addEventListener(WebInspector.ContentBrowser.Event.CurrentContentViewDidChange, this._contentBrowserCurrentContentViewDidChange, this);
WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.RecordingStarted, this._recordingStarted, this);
WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.RecordingStopped, this._recordingStopped, this);
-
- function delayedWork()
- {
- // Prime the creation of the singleton TimelineContentCiew since it needs to listen for events.
- // It needs to be delayed since TimelineContentView depends on WebInspector.timelineSidebarPanel existing.
- this._timelineContentView = WebInspector.contentBrowser.contentViewForRepresentedObject(WebInspector.timelineManager.recording);
- }
-
- setTimeout(delayedWork.bind(this), 0);
};
WebInspector.TimelineSidebarPanel.StatusBarStyleClass = "status-bar";
@@ -130,6 +121,12 @@
// Public
+ initialize: function()
+ {
+ // Prime the creation of the singleton TimelineContentView since it needs to listen for events.
+ this._timelineContentView = WebInspector.contentBrowser.contentViewForRepresentedObject(WebInspector.timelineManager.recording);
+ },
+
showDefaultContentView: function()
{
WebInspector.contentBrowser.showContentView(this._timelineContentView);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes