Title: [195846] trunk/Source/WebInspectorUI
Revision
195846
Author
[email protected]
Date
2016-01-29 15:12:40 -0800 (Fri, 29 Jan 2016)

Log Message

Web Inspector: Provide a way to clear the network panel
https://bugs.webkit.org/show_bug.cgi?id=153632
<rdar://problem/23317773>

Patch by Devin Rousso <[email protected]> on 2016-01-29
Reviewed by Timothy Hatcher.

Added a navigation item to the Network tab that resets the network grid's content.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
(WebInspector.NetworkGridContentView.prototype.get navigationItems):
(WebInspector.NetworkGridContentView.prototype._clearNetworkItems):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (195845 => 195846)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-01-29 23:10:39 UTC (rev 195845)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-01-29 23:12:40 UTC (rev 195846)
@@ -1,3 +1,19 @@
+2016-01-29  Devin Rousso  <[email protected]>
+
+        Web Inspector: Provide a way to clear the network panel
+        https://bugs.webkit.org/show_bug.cgi?id=153632
+        <rdar://problem/23317773>
+
+        Reviewed by Timothy Hatcher.
+
+        Added a navigation item to the Network tab that resets the network grid's content.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        * UserInterface/Views/NetworkGridContentView.js:
+        (WebInspector.NetworkGridContentView):
+        (WebInspector.NetworkGridContentView.prototype.get navigationItems):
+        (WebInspector.NetworkGridContentView.prototype._clearNetworkItems):
+
 2016-01-29  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: WebInspector.Setting should not access localStorage if the value did not change

Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (195845 => 195846)


--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2016-01-29 23:10:39 UTC (rev 195845)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2016-01-29 23:12:40 UTC (rev 195846)
@@ -124,6 +124,7 @@
 localizedStrings["Clear"] = "Clear";
 localizedStrings["Clear Log"] = "Clear Log";
 localizedStrings["Clear Log on Navigation"] = "Clear Log on Navigation";
+localizedStrings["Clear Network Items"] = "Clear Network Items";
 localizedStrings["Clear Timeline"] = "Clear Timeline";
 localizedStrings["Clear log (%s or %s)"] = "Clear log (%s or %s)";
 localizedStrings["Clear samples"] = "Clear samples";

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js (195845 => 195846)


--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js	2016-01-29 23:10:39 UTC (rev 195845)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js	2016-01-29 23:12:40 UTC (rev 195846)
@@ -92,6 +92,9 @@
         networkTimeline.addEventListener(WebInspector.Timeline.Event.RecordAdded, this._networkTimelineRecordAdded, this);
         networkTimeline.addEventListener(WebInspector.Timeline.Event.Reset, this._networkTimelineReset, this);
 
+        this._clearNetworkItemsNavigationItem = new WebInspector.ButtonNavigationItem("clear-network-items", WebInspector.UIString("Clear Network Items"), "Images/NavigationItemTrash.svg", 15, 15);
+        this._clearNetworkItemsNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._clearNetworkItems, this);
+
         this._pendingRecords = [];
     }
 
@@ -117,6 +120,11 @@
         return WebInspector.timelineManager.persistentNetworkTimeline.startTime;
     }
 
+    get navigationItems()
+    {
+        return [this._clearNetworkItemsNavigationItem];
+    }
+
     shown()
     {
         super.shown();
@@ -222,4 +230,8 @@
     {
         this.dispatchEventToListeners(WebInspector.ContentView.Event.SelectionPathComponentsDidChange);
     }
+
+    _clearNetworkItems(event) {
+        this.reset();
+    }
 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to