Title: [93041] trunk/Source/WebCore
Revision
93041
Author
[email protected]
Date
2011-08-15 07:26:24 -0700 (Mon, 15 Aug 2011)

Log Message

Web Inspector: Network panel: display the current search match index in the toolbar.
https://bugs.webkit.org/show_bug.cgi?id=66051

Reviewed by Pavel Feldman.

* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._highlightNthMatchedResource):
(WebInspector.NetworkLogView.prototype.performSearch):
(WebInspector.NetworkPanel):
(WebInspector.NetworkPanel.prototype._onSearchCountUpdated):
(WebInspector.NetworkPanel.prototype._onSearchIndexUpdated):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (93040 => 93041)


--- trunk/Source/WebCore/ChangeLog	2011-08-15 13:43:29 UTC (rev 93040)
+++ trunk/Source/WebCore/ChangeLog	2011-08-15 14:26:24 UTC (rev 93041)
@@ -1,3 +1,17 @@
+2011-08-15  Vsevolod Vlasov  <[email protected]>
+
+        Web Inspector: Network panel: display the current search match index in the toolbar.
+        https://bugs.webkit.org/show_bug.cgi?id=66051
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/front-end/NetworkPanel.js:
+        (WebInspector.NetworkLogView.prototype._highlightNthMatchedResource):
+        (WebInspector.NetworkLogView.prototype.performSearch):
+        (WebInspector.NetworkPanel):
+        (WebInspector.NetworkPanel.prototype._onSearchCountUpdated):
+        (WebInspector.NetworkPanel.prototype._onSearchIndexUpdated):
+
 2011-08-10  Adam Roben  <[email protected]>
 
         Clear up scale factor terminology

Modified: trunk/Source/WebCore/inspector/front-end/NetworkPanel.js (93040 => 93041)


--- trunk/Source/WebCore/inspector/front-end/NetworkPanel.js	2011-08-15 13:43:29 UTC (rev 93040)
+++ trunk/Source/WebCore/inspector/front-end/NetworkPanel.js	2011-08-15 14:26:24 UTC (rev 93041)
@@ -1187,6 +1187,7 @@
                 node.reveal();
             this._currentMatchedResourceIndex = matchedResourceIndex;
         }
+        this.dispatchEventToListeners(WebInspector.NetworkLogView.EventTypes.SearchIndexUpdated, this._currentMatchedResourceIndex + 1);
     },
 
     performSearch: function(searchQuery, sortOrFilterApplied)
@@ -1213,8 +1214,8 @@
                 newMatchedResourceIndex = this._matchedResources.length - 1;
         }
 
+        this.dispatchEventToListeners(WebInspector.NetworkLogView.EventTypes.SearchCountUpdated, this._matchedResources.length);
         this._highlightNthMatchedResource(newMatchedResourceIndex, !sortOrFilterApplied);
-        this.dispatchEventToListeners(WebInspector.NetworkLogView.EventTypes.SearchCountUpdated, this._matchedResources.length);
     },
 
     jumpToPreviousSearchResult: function()
@@ -1244,7 +1245,8 @@
     ViewCleared: "ViewCleared",
     RowSizeChanged: "RowSizeChanged",
     ResourceSelected: "ResourceSelected",
-    SearchCountUpdated: "SearchCountUpdated"
+    SearchCountUpdated: "SearchCountUpdated",
+    SearchIndexUpdated: "SearchIndexUpdated"
 };
 
 WebInspector.NetworkPanel = function()
@@ -1266,6 +1268,7 @@
     this._networkLogView.addEventListener(WebInspector.NetworkLogView.EventTypes.RowSizeChanged, this._onRowSizeChanged, this);
     this._networkLogView.addEventListener(WebInspector.NetworkLogView.EventTypes.ResourceSelected, this._onResourceSelected, this);
     this._networkLogView.addEventListener(WebInspector.NetworkLogView.EventTypes.SearchCountUpdated, this._onSearchCountUpdated, this);
+    this._networkLogView.addEventListener(WebInspector.NetworkLogView.EventTypes.SearchIndexUpdated, this._onSearchIndexUpdated, this);
 
     this._closeButtonElement = document.createElement("button");
     this._closeButtonElement.id = "network-close-button";
@@ -1386,6 +1389,11 @@
         WebInspector.searchController.updateSearchMatchesCount(event.data, this);
     },
 
+    _onSearchIndexUpdated: function(event)
+    {
+        WebInspector.searchController.updateCurrentMatchIndex(event.data, this);
+    },
+
     _onResourceSelected: function(event)
     {
         this._showResource(event.data);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to