Title: [244577] trunk/Source/WebInspectorUI
- Revision
- 244577
- Author
- [email protected]
- Date
- 2019-04-23 18:28:49 -0700 (Tue, 23 Apr 2019)
Log 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.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (244576 => 244577)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-04-24 01:20:32 UTC (rev 244576)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-04-24 01:28:49 UTC (rev 244577)
@@ -1,5 +1,23 @@
2019-04-23 Devin Rousso <[email protected]>
+ 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.
+
+2019-04-23 Devin Rousso <[email protected]>
+
Web Inspector: Network: support drag/drop for importing
https://bugs.webkit.org/show_bug.cgi?id=197221
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js (244576 => 244577)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js 2019-04-24 01:20:32 UTC (rev 244576)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js 2019-04-24 01:28:49 UTC (rev 244577)
@@ -306,12 +306,7 @@
reset()
{
this._runForMainCollection((collection) => {
- collection.entries = [];
- collection.filteredEntries = [];
- collection.pendingInsertions = [];
- collection.pendingUpdates = [];
- collection.waterfallStartTime = NaN;
- collection.waterfallEndTime = NaN;
+ this._resetCollection(collection);
});
for (let detailView of this._detailViewMap.values())
@@ -526,20 +521,22 @@
_addCollection()
{
- let collection = {
- entries: [],
- filteredEntries: [],
- pendingInsertions: [],
- pendingUpdates: [],
- waterfallStartTime: NaN,
- waterfallEndTime: NaN,
- };
-
+ let collection = {};
+ this._resetCollection(collection);
this._collections.push(collection);
-
return collection;
}
+ _resetCollection(collection)
+ {
+ collection.entries = [];
+ collection.filteredEntries = [];
+ collection.pendingInsertions = [];
+ collection.pendingUpdates = [];
+ collection.waterfallStartTime = NaN;
+ collection.waterfallEndTime = NaN;
+ }
+
_setActiveCollection(collection)
{
console.assert(this._collections.includes(collection));
@@ -586,7 +583,7 @@
let isMain = collection === this._mainCollection;
this._checkboxesNavigationItemGroup.hidden = !isMain;
- this._groupByDOMNodeNavigationItem.hidden = !isMain;
+ this._groupMediaRequestsByDOMNodeNavigationItem.hidden = !isMain;
this._clearNetworkItemsNavigationItem.enabled = isMain;
this._collectionsPathNavigationItem.components = [this._pathComponentsMap.get(collection)];
@@ -1588,13 +1585,11 @@
_mainResourceDidChange(event)
{
- let frame = event.target;
- if (!frame.isMainFrame() || !WI.settings.clearNetworkOnNavigate.value)
- return;
+ this._runForMainCollection((collection) => {
+ let frame = event.target;
+ if (frame.isMainFrame() && WI.settings.clearNetworkOnNavigate.value)
+ this._resetCollection(collection);
- this.reset();
-
- this._runForMainCollection((collection) => {
if (this._transitioningPageTarget) {
this._transitioningPageTarget = false;
this._needsInitialPopulate = true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes