Changeset 217379 in webkit


Ignore:
Timestamp:
May 24, 2017 11:53:46 AM (7 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Don't load the active recording until a Timeline view needs to be shown
https://bugs.webkit.org/show_bug.cgi?id=172467

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/TimelineTabContentView.js:

(WebInspector.TimelineTabContentView):
(WebInspector.TimelineTabContentView.prototype.restoreFromCookie):
(WebInspector.TimelineTabContentView.prototype._showTimelineViewForType):
Move the call to _recordingLoaded to when a timeline view needs to be shown and only if
_displayedRecording isn't already set. This delays the creation of the content view for
the recording to right before it needs to be displayed.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r217317 r217379  
     12017-05-24  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Don't load the active recording until a Timeline view needs to be shown
     4        https://bugs.webkit.org/show_bug.cgi?id=172467
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        * UserInterface/Views/TimelineTabContentView.js:
     9        (WebInspector.TimelineTabContentView):
     10        (WebInspector.TimelineTabContentView.prototype.restoreFromCookie):
     11        (WebInspector.TimelineTabContentView.prototype._showTimelineViewForType):
     12        Move the call to `_recordingLoaded` to when a timeline view needs to be shown and only if
     13        `_displayedRecording` isn't already set. This delays the creation of the content view for
     14        the recording to right before it needs to be displayed.
     15
     16
    1172017-05-23  Matt Baker  <mattbaker@apple.com>
    218
  • trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js

    r216546 r217379  
    8585
    8686        this._recordingCountChanged();
    87 
    88         if (WebInspector.timelineManager.activeRecording)
    89             this._recordingLoaded();
    9087
    9188        // Explicitly update the path for the navigation bar to prevent it from showing up as blank.
     
    315312    {
    316313        console.assert(cookie);
    317         console.assert(this._displayedContentView);
    318314
    319315        this._restoredShowingTimelineRecordingContentView = cookie[WebInspector.TimelineTabContentView.ShowingTimelineRecordingContentViewCookieKey];
    320316        if (!this._restoredShowingTimelineRecordingContentView) {
    321             if (!this.contentBrowser.currentContentView)
     317            if (!this.contentBrowser.currentContentView) {
     318                // If this is the first time opening the tab, render the currently active recording.
     319                if (!this._displayedRecording && WebInspector.timelineManager.activeRecording)
     320                    this._recordingLoaded();
     321
    322322                this._showTimelineViewForType(WebInspector.TimelineTabContentView.OverviewTimelineIdentifierCookieValue);
     323            }
    323324            return;
    324325        }
     
    538539    _showTimelineViewForType(timelineType)
    539540    {
     541        console.assert(this._displayedRecording);
     542        console.assert(this._displayedContentView);
     543
    540544        let timeline = timelineType ? this._displayedRecording.timelines.get(timelineType) : null;
    541545        if (timeline)
Note: See TracChangeset for help on using the changeset viewer.