Title: [151573] trunk/Source/WebInspectorUI
- Revision
- 151573
- Author
- [email protected]
- Date
- 2013-06-13 16:33:08 -0700 (Thu, 13 Jun 2013)
Log Message
<http://webkit.org/b/117612> Web Inspector: "Search Resource Content" should cancel when I remove all text search text
Patch by Joseph Pecoraro <[email protected]> on 2013-06-13
Reviewed by Timothy Hatcher.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype._searchFieldInput):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (151572 => 151573)
--- trunk/Source/WebInspectorUI/ChangeLog 2013-06-13 22:47:26 UTC (rev 151572)
+++ trunk/Source/WebInspectorUI/ChangeLog 2013-06-13 23:33:08 UTC (rev 151573)
@@ -1 +1,11 @@
+2013-06-13 Joseph Pecoraro <[email protected]>
+
+ <http://webkit.org/b/117612> Web Inspector: "Search Resource Content" should cancel when I remove all text search text
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/ResourceSidebarPanel.js:
+ (WebInspector.ResourceSidebarPanel):
+ (WebInspector.ResourceSidebarPanel.prototype._searchFieldInput):
+
== Rolled over to ChangeLog-2013-06-11 ==
Modified: trunk/Source/WebInspectorUI/UserInterface/ResourceSidebarPanel.js (151572 => 151573)
--- trunk/Source/WebInspectorUI/UserInterface/ResourceSidebarPanel.js 2013-06-13 22:47:26 UTC (rev 151572)
+++ trunk/Source/WebInspectorUI/UserInterface/ResourceSidebarPanel.js 2013-06-13 23:33:08 UTC (rev 151573)
@@ -34,7 +34,8 @@
this._inputElement.type = "search";
this._inputElement.required = true;
this._inputElement.spellcheck = false;
- this._inputElement.addEventListener("search", this._searchFieldChanged.bind(this), false);
+ this._inputElement.addEventListener("search", this._searchFieldChanged.bind(this));
+ this._inputElement.addEventListener("input", this._searchFieldInput.bind(this));
this._inputElement.setAttribute("results", 5);
this._inputElement.setAttribute("autosave", "inspector-search");
this._inputElement.setAttribute("placeholder", WebInspector.UIString("Search Resource Content"));
@@ -559,6 +560,13 @@
this.performSearch(event.target.value);
},
+ _searchFieldInput: function(event)
+ {
+ // If the search field is cleared, immediately clear the search results tree outline.
+ if (!event.target.value.length && this.contentTreeOutline === this._searchContentTreeOutline)
+ this.performSearch("");
+ },
+
_searchTreeElementForResource: function(resource)
{
// FIXME: This should take a frame ID (if one is available) - so we can differentiate between multiple resources
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes