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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 410 _onSearchFieldManualFocus: function(event) | 410 _onSearchFieldManualFocus: function(event) |
| 411 { | 411 { |
| 412 WebInspector.setCurrentFocusElement(/** @type {?Node} */ (event.target)) ; | 412 WebInspector.setCurrentFocusElement(/** @type {?Node} */ (event.target)) ; |
| 413 }, | 413 }, |
| 414 | 414 |
| 415 /** | 415 /** |
| 416 * @param {!Event} event | 416 * @param {!Event} event |
| 417 */ | 417 */ |
| 418 _onSearchKeyDown: function(event) | 418 _onSearchKeyDown: function(event) |
| 419 { | 419 { |
| 420 if (isEscKey(event)) { | |
|
lushnikov
2016/05/24 22:44:13
How does this work in other places? E.g. while sea
| |
| 421 this.closeSearch(); | |
| 422 event.stopPropagation(); | |
| 423 return; | |
| 424 } | |
| 420 if (!isEnterKey(event)) | 425 if (!isEnterKey(event)) |
| 421 return; | 426 return; |
| 422 | 427 |
| 423 if (!this._currentQuery) | 428 if (!this._currentQuery) |
| 424 this._performSearch(true, true, event.shiftKey); | 429 this._performSearch(true, true, event.shiftKey); |
| 425 else | 430 else |
| 426 this._jumpToNextSearchResult(event.shiftKey); | 431 this._jumpToNextSearchResult(event.shiftKey); |
| 427 }, | 432 }, |
| 428 | 433 |
| 429 /** | 434 /** |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 665 // Silent catch. | 670 // Silent catch. |
| 666 } | 671 } |
| 667 | 672 |
| 668 // Otherwise just do a plain text search. | 673 // Otherwise just do a plain text search. |
| 669 if (!regex) | 674 if (!regex) |
| 670 regex = createPlainTextSearchRegex(query, modifiers); | 675 regex = createPlainTextSearchRegex(query, modifiers); |
| 671 | 676 |
| 672 return regex; | 677 return regex; |
| 673 } | 678 } |
| 674 } | 679 } |
| OLD | NEW |