OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 }, | 483 }, |
484 | 484 |
485 searchCanceled: function() | 485 searchCanceled: function() |
486 { | 486 { |
487 var range = this._currentSearchResultIndex !== -1 ? this._searchResults[
this._currentSearchResultIndex] : null; | 487 var range = this._currentSearchResultIndex !== -1 ? this._searchResults[
this._currentSearchResultIndex] : null; |
488 this._resetSearch(); | 488 this._resetSearch(); |
489 if (!this.loaded) | 489 if (!this.loaded) |
490 return; | 490 return; |
491 this._textEditor.cancelSearchResultsHighlight(); | 491 this._textEditor.cancelSearchResultsHighlight(); |
492 if (range) | 492 if (range) |
493 this._textEditor.setSelection(range); | 493 this.setSelection(range); |
494 }, | 494 }, |
495 | 495 |
496 /** | 496 /** |
497 * @return {boolean} | 497 * @return {boolean} |
498 */ | 498 */ |
499 hasSearchResults: function() | 499 hasSearchResults: function() |
500 { | 500 { |
501 return this._searchResults.length > 0; | 501 return this._searchResults.length > 0; |
502 }, | 502 }, |
503 | 503 |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 | 1035 |
1036 /** | 1036 /** |
1037 * @param {?WebInspector.TextRange} from | 1037 * @param {?WebInspector.TextRange} from |
1038 * @param {?WebInspector.TextRange} to | 1038 * @param {?WebInspector.TextRange} to |
1039 */ | 1039 */ |
1040 onJumpToPosition: function(from, to) | 1040 onJumpToPosition: function(from, to) |
1041 { | 1041 { |
1042 this._sourceFrame.onJumpToPosition(from, to); | 1042 this._sourceFrame.onJumpToPosition(from, to); |
1043 } | 1043 } |
1044 } | 1044 } |
OLD | NEW |