OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
5 * Copyright (C) 2011 Google Inc. All rights reserved. | 5 * Copyright (C) 2011 Google Inc. All rights reserved. |
6 * | 6 * |
7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
9 * are met: | 9 * are met: |
10 * | 10 * |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 if (WebInspector.isMac()) | 200 if (WebInspector.isMac()) |
201 WebInspector.SearchableView._findPreviousShortcuts.push(WebInspector.Key
boardShortcut.makeDescriptor("g", WebInspector.KeyboardShortcut.Modifiers.Meta |
WebInspector.KeyboardShortcut.Modifiers.Shift)); | 201 WebInspector.SearchableView._findPreviousShortcuts.push(WebInspector.Key
boardShortcut.makeDescriptor("g", WebInspector.KeyboardShortcut.Modifiers.Meta |
WebInspector.KeyboardShortcut.Modifiers.Shift)); |
202 return WebInspector.SearchableView._findPreviousShortcuts; | 202 return WebInspector.SearchableView._findPreviousShortcuts; |
203 } | 203 } |
204 | 204 |
205 WebInspector.SearchableView.prototype = { | 205 WebInspector.SearchableView.prototype = { |
206 _toggleCaseSensitiveSearch: function() | 206 _toggleCaseSensitiveSearch: function() |
207 { | 207 { |
208 this._caseSensitiveButton.toggled = !this._caseSensitiveButton.toggled; | 208 this._caseSensitiveButton.toggled = !this._caseSensitiveButton.toggled; |
209 this._saveSetting(); | 209 this._saveSetting(); |
210 this._performSearch(true, true); | 210 this._performSearch(false, true); |
211 }, | 211 }, |
212 | 212 |
213 _toggleRegexSearch: function() | 213 _toggleRegexSearch: function() |
214 { | 214 { |
215 this._regexButton.toggled = !this._regexButton.toggled; | 215 this._regexButton.toggled = !this._regexButton.toggled; |
216 this._saveSetting(); | 216 this._saveSetting(); |
217 this._performSearch(true, true); | 217 this._performSearch(false, true); |
218 }, | 218 }, |
219 | 219 |
220 /** | 220 /** |
221 * @return {?WebInspector.Setting} | 221 * @return {?WebInspector.Setting} |
222 */ | 222 */ |
223 _setting: function() | 223 _setting: function() |
224 { | 224 { |
225 if (!this._settingName) | 225 if (!this._settingName) |
226 return null; | 226 return null; |
227 if (!WebInspector.settings[this._settingName]) | 227 if (!WebInspector.settings[this._settingName]) |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 this._toggleSearchBar(false); | 358 this._toggleSearchBar(false); |
359 }, | 359 }, |
360 | 360 |
361 resetSearch: function() | 361 resetSearch: function() |
362 { | 362 { |
363 this._clearSearch(); | 363 this._clearSearch(); |
364 this._updateReplaceVisibility(); | 364 this._updateReplaceVisibility(); |
365 this._matchesElement.textContent = ""; | 365 this._matchesElement.textContent = ""; |
366 }, | 366 }, |
367 | 367 |
| 368 refreshSearch: function() |
| 369 { |
| 370 if (!this._searchIsVisible) |
| 371 return; |
| 372 this.resetSearch(); |
| 373 this._performSearch(false, false); |
| 374 }, |
| 375 |
368 /** | 376 /** |
369 * @return {boolean} | 377 * @return {boolean} |
370 */ | 378 */ |
371 handleFindNextShortcut: function() | 379 handleFindNextShortcut: function() |
372 { | 380 { |
373 if (!this._searchIsVisible) | 381 if (!this._searchIsVisible) |
374 return false; | 382 return false; |
375 this._searchProvider.jumpToNextSearchResult(); | 383 this._searchProvider.jumpToNextSearchResult(); |
376 return true; | 384 return true; |
377 }, | 385 }, |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 * @param {string} query | 700 * @param {string} query |
693 * @param {boolean} caseSensitive | 701 * @param {boolean} caseSensitive |
694 * @param {boolean} isRegex | 702 * @param {boolean} isRegex |
695 */ | 703 */ |
696 WebInspector.SearchableView.SearchConfig = function(query, caseSensitive, isRege
x) | 704 WebInspector.SearchableView.SearchConfig = function(query, caseSensitive, isRege
x) |
697 { | 705 { |
698 this.query = query; | 706 this.query = query; |
699 this.caseSensitive = caseSensitive; | 707 this.caseSensitive = caseSensitive; |
700 this.isRegex = isRegex; | 708 this.isRegex = isRegex; |
701 } | 709 } |
OLD | NEW |