Title: [198550] trunk/Source/WebInspectorUI
Revision
198550
Author
[email protected]
Date
2016-03-22 14:15:37 -0700 (Tue, 22 Mar 2016)

Log Message

Web Inspector: Switching Away and Back to Timelines Tab may select a different Timeline
https://bugs.webkit.org/show_bug.cgi?id=155742
<rdar://problem/25284330>

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

When switching to the Timeline tab, or switching recordings within the
the Timeline tab, the TimelineTabContentView does work to correctly
save/restore its view state.

When switching to the Timeline tab, the TimelineTabContentView correctly
restores the state of the tab, but when showing the RecordingContentView
the RecordingContentView restores its state from a stale cookie.

Since TimelineTabContentView already seems to handle correctly restoring
RecordingContentViews on its own. Removing the RecordingContentView's
implementation of save/restore made everything work as expected.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.saveToCookie): Deleted.
(WebInspector.TimelineRecordingContentView.prototype.restoreFromCookie): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (198549 => 198550)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-03-22 20:56:38 UTC (rev 198549)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-03-22 21:15:37 UTC (rev 198550)
@@ -1,3 +1,27 @@
+2016-03-22  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Switching Away and Back to Timelines Tab may select a different Timeline
+        https://bugs.webkit.org/show_bug.cgi?id=155742
+        <rdar://problem/25284330>
+
+        Reviewed by Timothy Hatcher.
+
+        When switching to the Timeline tab, or switching recordings within the
+        the Timeline tab, the TimelineTabContentView does work to correctly
+        save/restore its view state.
+
+        When switching to the Timeline tab, the TimelineTabContentView correctly
+        restores the state of the tab, but when showing the RecordingContentView
+        the RecordingContentView restores its state from a stale cookie.
+
+        Since TimelineTabContentView already seems to handle correctly restoring
+        RecordingContentViews on its own. Removing the RecordingContentView's
+        implementation of save/restore made everything work as expected.
+
+        * UserInterface/Views/TimelineRecordingContentView.js:
+        (WebInspector.TimelineRecordingContentView.prototype.saveToCookie): Deleted.
+        (WebInspector.TimelineRecordingContentView.prototype.restoreFromCookie): Deleted.
+
 2016-03-22  Matt Baker  <[email protected]>
 
         Web Inspector: remove the remaining TimelineSidebarPanel references

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js (198549 => 198550)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js	2016-03-22 20:56:38 UTC (rev 198549)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js	2016-03-22 21:15:37 UTC (rev 198550)
@@ -214,26 +214,6 @@
         this._timelineContentBrowser.goForward();
     }
 
-    saveToCookie(cookie)
-    {
-        cookie.type = WebInspector.ContentViewCookieType.Timelines;
-
-        let currentContentView = this._timelineContentBrowser.currentContentView;
-        if (!currentContentView || currentContentView === this._overviewTimelineView)
-            cookie[WebInspector.TimelineRecordingContentView.SelectedTimelineTypeCookieKey] = WebInspector.TimelineRecordingContentView.OverviewTimelineViewCookieValue;
-        else if (currentContentView.representedObject instanceof WebInspector.Timeline)
-            cookie[WebInspector.TimelineRecordingContentView.SelectedTimelineTypeCookieKey] = this.currentTimelineView.representedObject.type;
-    }
-
-    restoreFromCookie(cookie)
-    {
-        var timelineType = cookie[WebInspector.TimelineRecordingContentView.SelectedTimelineTypeCookieKey];
-        if (timelineType === WebInspector.TimelineRecordingContentView.OverviewTimelineViewCookieValue)
-            this.showOverviewTimelineView();
-        else
-            this.showTimelineViewForTimeline(this.representedObject.timelines.get(timelineType));
-    }
-
     filterDidChange()
     {
         if (!this.currentTimelineView)
@@ -830,6 +810,3 @@
         this._updateTimelineOverviewHeight();
     }
 };
-
-WebInspector.TimelineRecordingContentView.SelectedTimelineTypeCookieKey = "timeline-recording-content-view-selected-timeline-type";
-WebInspector.TimelineRecordingContentView.OverviewTimelineViewCookieValue = "timeline-recording-content-view-overview-timeline-view";
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to