Title: [197832] trunk/Source/WebInspectorUI
Revision
197832
Author
[email protected]
Date
2016-03-08 21:02:15 -0800 (Tue, 08 Mar 2016)

Log Message

Web Inspector: Timelines keeps switching to overview instead of keeping the selected timeline
https://bugs.webkit.org/show_bug.cgi?id=155212
<rdar://problem/25052504>

Patch by Joseph Pecoraro <[email protected]> on 2016-03-08
Reviewed by Timothy Hatcher.

* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.saveStateToCookie):
The sidebar was using out of date information in its tree outline causing it to
switch to the wrong sidebar. Use the up to date information from the recording view.

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype._recordingSelected):
Fix typo not getting the right timeline type.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (197831 => 197832)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-03-09 04:39:49 UTC (rev 197831)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-03-09 05:02:15 UTC (rev 197832)
@@ -1,5 +1,22 @@
 2016-03-08  Joseph Pecoraro  <[email protected]>
 
+        Web Inspector: Timelines keeps switching to overview instead of keeping the selected timeline
+        https://bugs.webkit.org/show_bug.cgi?id=155212
+        <rdar://problem/25052504>
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/TimelineSidebarPanel.js:
+        (WebInspector.TimelineSidebarPanel.prototype.saveStateToCookie):
+        The sidebar was using out of date information in its tree outline causing it to
+        switch to the wrong sidebar. Use the up to date information from the recording view.
+
+        * UserInterface/Views/TimelineTabContentView.js:
+        (WebInspector.TimelineTabContentView.prototype._recordingSelected):
+        Fix typo not getting the right timeline type.
+
+2016-03-08  Joseph Pecoraro  <[email protected]>
+
         Web Inspector: Memory Timeline should show MemoryPressure events
         https://bugs.webkit.org/show_bug.cgi?id=155158
         <rdar://problem/25026610>

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js (197831 => 197832)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js	2016-03-09 04:39:49 UTC (rev 197831)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js	2016-03-09 05:02:15 UTC (rev 197832)
@@ -474,9 +474,9 @@
         if (this._viewMode === WebInspector.TimelineOverview.ViewMode.RenderingFrames)
             cookie[WebInspector.TimelineSidebarPanel.SelectedTimelineViewIdentifierCookieKey] = WebInspector.TimelineRecord.Type.RenderingFrame;
         else {
-            var selectedTreeElement = this._timelinesTreeOutline.selectedTreeElement;
-            if (selectedTreeElement)
-                cookie[WebInspector.TimelineSidebarPanel.SelectedTimelineViewIdentifierCookieKey] = selectedTreeElement.representedObject.type;
+            var currentTimelineView = this._displayedContentView ? this._displayedContentView.currentTimelineView : null;
+            if (currentTimelineView && currentTimelineView.representedObject instanceof WebInspector.Timeline)
+                cookie[WebInspector.TimelineSidebarPanel.SelectedTimelineViewIdentifierCookieKey] = currentTimelineView.representedObject.type;
             else
                 cookie[WebInspector.TimelineSidebarPanel.SelectedTimelineViewIdentifierCookieKey] = WebInspector.TimelineSidebarPanel.OverviewTimelineIdentifierCookieValue;    
         }

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js (197831 => 197832)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js	2016-03-09 04:39:49 UTC (rev 197831)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js	2016-03-09 05:02:15 UTC (rev 197832)
@@ -450,7 +450,7 @@
 
             // Show the timeline that was being shown to update the sidebar tree state.
             let currentTimelineView = this._displayedContentView.currentTimelineView;
-            let timelineType = currentTimelineView && currentTimelineView.representedObject instanceof WebInspector.Timeline ? currentTimelineView.type : null;
+            let timelineType = currentTimelineView && currentTimelineView.representedObject instanceof WebInspector.Timeline ? currentTimelineView.representedObject.type : null;
             this._showTimelineViewForType(timelineType);
 
             return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to