| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Joseph Pecoraro | 2 * Copyright (C) 2009 Joseph Pecoraro |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 { | 75 { |
| 76 this._clearCurrentSearchResultHighlight(); | 76 this._clearCurrentSearchResultHighlight(); |
| 77 delete this._searchResults; | 77 delete this._searchResults; |
| 78 delete this._searchRegex; | 78 delete this._searchRegex; |
| 79 }, | 79 }, |
| 80 | 80 |
| 81 performSearch: function(query) | 81 performSearch: function(query) |
| 82 { | 82 { |
| 83 WebInspector.searchController.updateSearchMatchesCount(0, this); | 83 WebInspector.searchController.updateSearchMatchesCount(0, this); |
| 84 this.searchCanceled(); | 84 this.searchCanceled(); |
| 85 this._searchRegex = createSearchRegex(query, "g"); | 85 this._searchRegex = createSearchRegex(query, "gi"); |
| 86 | 86 |
| 87 this._searchResults = []; | 87 this._searchResults = []; |
| 88 var messages = WebInspector.consoleView.messages; | 88 var messages = WebInspector.consoleView.messages; |
| 89 for (var i = 0; i < messages.length; i++) { | 89 for (var i = 0; i < messages.length; i++) { |
| 90 if (messages[i].matchesRegex(this._searchRegex)) { | 90 if (messages[i].matchesRegex(this._searchRegex)) { |
| 91 this._searchResults.push(messages[i]); | 91 this._searchResults.push(messages[i]); |
| 92 this._searchRegex.lastIndex = 0; | 92 this._searchRegex.lastIndex = 0; |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 WebInspector.searchController.updateSearchMatchesCount(this._searchResul
ts.length, this); | 95 WebInspector.searchController.updateSearchMatchesCount(this._searchResul
ts.length, this); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 if (!this._searchResults) | 149 if (!this._searchResults) |
| 150 return; | 150 return; |
| 151 this._clearCurrentSearchResultHighlight(); | 151 this._clearCurrentSearchResultHighlight(); |
| 152 this._searchResults.length = 0; | 152 this._searchResults.length = 0; |
| 153 if (this.visible) | 153 if (this.visible) |
| 154 WebInspector.searchController.updateSearchMatchesCount(0, this); | 154 WebInspector.searchController.updateSearchMatchesCount(0, this); |
| 155 } | 155 } |
| 156 } | 156 } |
| 157 | 157 |
| 158 WebInspector.ConsolePanel.prototype.__proto__ = WebInspector.Panel.prototype; | 158 WebInspector.ConsolePanel.prototype.__proto__ = WebInspector.Panel.prototype; |
| OLD | NEW |