Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: Source/devtools/front_end/source_frame/SourceFrame.js

Issue 669043002: DevTools: Fix the way search works when switching between editor tabs. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comments addressed Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js ('k') | Source/devtools/front_end/sources/SourcesView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698