Perform Inspector searches on search event to clear results when
        clicking the cross to empty it. Delete the lastQuery when the field
        is emptied in order to perform the search if exactly the same query
        is entered next.

        https://bugs.webkit.org/show_bug.cgi?id=20462

        Reviewed by Tim Hatcher.

        * page/inspector/inspector.js:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2fc1db3..263c688 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2008-08-21  Anthony Ricaud  <rik24d@gmail.com>
+
+        Perform Inspector searches on search event to clear results when
+        clicking the cross to empty it. Delete the lastQuery when the field
+        is emptied in order to perform the search if exactly the same query
+        is entered next.
+
+        https://bugs.webkit.org/show_bug.cgi?id=20462
+
+        Reviewed by Tim Hatcher.
+
+        * page/inspector/inspector.js:
+
 2008-08-21  Marco Barisione  <marco.barisione@collabora.co.uk>
 
         Reviewed by Mark Rowe.
diff --git a/WebCore/page/inspector/inspector.js b/WebCore/page/inspector/inspector.js
index 9027a38..c8db6a8 100644
--- a/WebCore/page/inspector/inspector.js
+++ b/WebCore/page/inspector/inspector.js
@@ -344,6 +344,7 @@
     document.getElementById("search-toolbar-label").textContent = WebInspector.UIString("Search");
     var searchField = document.getElementById("search");
     searchField.addEventListener("keyup", this.performSearch.bind(this), false);
+    searchField.addEventListener("search", this.performSearch.bind(this), false); // when the search is emptied
 
     document.getElementById("toolbar").addEventListener("mousedown", this.toolbarDragStart, true);
     document.getElementById("close-button").addEventListener("click", this.close, true);
@@ -1021,6 +1022,7 @@
     var query = event.target.value;
 
     if (!query || !query.length) {
+        delete this.lastQuery;
         this.showingSearchResults = false;
         return;
     }