⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 244577 in webkit


Ignore:
Timestamp:
Apr 23, 2019, 6:28:49 PM (7 years ago)
Author:
Devin Rousso
Message:

Web Inspector: REGRESSION(r238168): Network: preserve log doesn't show main frame main resource changes
https://bugs.webkit.org/show_bug.cgi?id=197220
<rdar://problem/49960464>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype.reset):
(WI.NetworkTableContentView.prototype._addCollection):
(WI.NetworkTableContentView.prototype._resetCollection): Added.
(WI.NetworkTableContentView.prototype._changeCollection):
(WI.NetworkTableContentView.prototype._mainResourceDidChange):
We want to add the frame's main resource in the case that it's the main frame, but we also
want to clear the main collection of data (e.g. if viewing an imported HAR).
Drive-by: _groupByDOMNodeNavigationItem was renamed in a previous patch.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r244576 r244577  
     12019-04-23  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: REGRESSION(r238168): Network: preserve log doesn't show main frame main resource changes
     4        https://bugs.webkit.org/show_bug.cgi?id=197220
     5        <rdar://problem/49960464>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        * UserInterface/Views/NetworkTableContentView.js:
     10        (WI.NetworkTableContentView.prototype.reset):
     11        (WI.NetworkTableContentView.prototype._addCollection):
     12        (WI.NetworkTableContentView.prototype._resetCollection): Added.
     13        (WI.NetworkTableContentView.prototype._changeCollection):
     14        (WI.NetworkTableContentView.prototype._mainResourceDidChange):
     15        We want to add the frame's main resource in the case that it's the main frame, but we also
     16        want to clear the main collection of data (e.g. if viewing an imported HAR).
     17        Drive-by: `_groupByDOMNodeNavigationItem` was renamed in a previous patch.
     18
    1192019-04-23  Devin Rousso  <drousso@apple.com>
    220
  • trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js

    r244576 r244577  
    307307    {
    308308        this._runForMainCollection((collection) => {
    309             collection.entries = [];
    310             collection.filteredEntries = [];
    311             collection.pendingInsertions = [];
    312             collection.pendingUpdates = [];
    313             collection.waterfallStartTime = NaN;
    314             collection.waterfallEndTime = NaN;
     309            this._resetCollection(collection);
    315310        });
    316311
     
    527522    _addCollection()
    528523    {
    529         let collection = {
    530             entries: [],
    531             filteredEntries: [],
    532             pendingInsertions: [],
    533             pendingUpdates: [],
    534             waterfallStartTime: NaN,
    535             waterfallEndTime: NaN,
    536         };
    537 
     524        let collection = {};
     525        this._resetCollection(collection);
    538526        this._collections.push(collection);
    539 
    540527        return collection;
     528    }
     529
     530    _resetCollection(collection)
     531    {
     532        collection.entries = [];
     533        collection.filteredEntries = [];
     534        collection.pendingInsertions = [];
     535        collection.pendingUpdates = [];
     536        collection.waterfallStartTime = NaN;
     537        collection.waterfallEndTime = NaN;
    541538    }
    542539
     
    587584        let isMain = collection === this._mainCollection;
    588585        this._checkboxesNavigationItemGroup.hidden = !isMain;
    589         this._groupByDOMNodeNavigationItem.hidden = !isMain;
     586        this._groupMediaRequestsByDOMNodeNavigationItem.hidden = !isMain;
    590587        this._clearNetworkItemsNavigationItem.enabled = isMain;
    591588        this._collectionsPathNavigationItem.components = [this._pathComponentsMap.get(collection)];
     
    15891586    _mainResourceDidChange(event)
    15901587    {
    1591         let frame = event.target;
    1592         if (!frame.isMainFrame() || !WI.settings.clearNetworkOnNavigate.value)
    1593             return;
    1594 
    1595         this.reset();
    1596 
    15971588        this._runForMainCollection((collection) => {
     1589            let frame = event.target;
     1590            if (frame.isMainFrame() && WI.settings.clearNetworkOnNavigate.value)
     1591                this._resetCollection(collection);
     1592
    15981593            if (this._transitioningPageTarget) {
    15991594                this._transitioningPageTarget = false;
Note: See TracChangeset for help on using the changeset viewer.