Chromium Code Reviews| 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._clearSearch(); | |
|
lushnikov
2014/10/22 11:12:37
these three lines are "resetSearch()" essentially
| |
| 373 this._updateReplaceVisibility(); | |
| 374 this._matchesElement.textContent = ""; | |
| 375 this._performSearch(false, false); | |
| 376 }, | |
| 377 | |
| 368 /** | 378 /** |
| 369 * @return {boolean} | 379 * @return {boolean} |
| 370 */ | 380 */ |
| 371 handleFindNextShortcut: function() | 381 handleFindNextShortcut: function() |
| 372 { | 382 { |
| 373 if (!this._searchIsVisible) | 383 if (!this._searchIsVisible) |
| 374 return false; | 384 return false; |
| 375 this._searchProvider.jumpToNextSearchResult(); | 385 this._searchProvider.jumpToNextSearchResult(); |
| 376 return true; | 386 return true; |
| 377 }, | 387 }, |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 692 * @param {string} query | 702 * @param {string} query |
| 693 * @param {boolean} caseSensitive | 703 * @param {boolean} caseSensitive |
| 694 * @param {boolean} isRegex | 704 * @param {boolean} isRegex |
| 695 */ | 705 */ |
| 696 WebInspector.SearchableView.SearchConfig = function(query, caseSensitive, isRege x) | 706 WebInspector.SearchableView.SearchConfig = function(query, caseSensitive, isRege x) |
| 697 { | 707 { |
| 698 this.query = query; | 708 this.query = query; |
| 699 this.caseSensitive = caseSensitive; | 709 this.caseSensitive = caseSensitive; |
| 700 this.isRegex = isRegex; | 710 this.isRegex = isRegex; |
| 701 } | 711 } |
| OLD | NEW |