Changeset 35632 in webkit
- Timestamp:
- Aug 7, 2008 8:55:53 PM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r35629 r35632 1 2008-08-07 Anthony Ricaud <rik24d@gmail.com> 2 3 The search is only performed if the field contains more than 3 4 letters or if Enter is pressed. 5 6 Search is now performed through a keyup event. 7 8 Added a WebInspector.lastQuery to remember the last query and not 9 perform it again (eg. the user hits a modifier key). 10 11 https://bugs.webkit.org/show_bug.cgi?id=18548 12 13 Reviewed by Timothy Hatcher. 14 15 * page/inspector/inspector.html: Removed the onsearch and incremental 16 attributes 17 * page/inspector/inspector.js: 18 1 19 2008-08-07 Steve Falkenburg <sfalken@apple.com> 2 20 -
trunk/WebCore/page/inspector/inspector.html
r34631 r35632 74 74 <div id="toolbar"> 75 75 <div class="toolbar-item flexable-space"></div> 76 <div class="toolbar-item"><input id="search" type="search" results="20" incremental="incremental" onsearch="WebInspector.performSearch(this.value)"><div id="search-toolbar-label" class="toolbar-label"></div></div>76 <div class="toolbar-item"><input id="search" type="search" results="20"><div id="search-toolbar-label" class="toolbar-label"></div></div> 77 77 </div> 78 78 <div id="main"> -
trunk/WebCore/page/inspector/inspector.js
r35616 r35632 341 341 342 342 document.getElementById("search-toolbar-label").textContent = WebInspector.UIString("Search"); 343 var searchField = document.getElementById("search"); 344 searchField.addEventListener("keyup", this.performSearch.bind(this), false); 343 345 344 346 if (platform === "mac-leopard") … … 975 977 } 976 978 977 WebInspector.performSearch = function(query) 978 { 979 WebInspector.performSearch = function(event) 980 { 981 var query = event.target.value; 982 979 983 if (!query || !query.length) { 980 984 this.showingSearchResults = false; 981 985 return; 982 986 } 987 988 var forceSearch = event.keyIdentifier === "Enter"; 989 if(!forceSearch && query.length < 3) 990 return; 991 992 if (!forceSearch && this.lastQuery && this.lastQuery === query) 993 return; 994 this.lastQuery = query; 983 995 984 996 var resultsContainer = document.getElementById("searchResults");
Note: See TracChangeset
for help on using the changeset viewer.