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

Side by Side Diff: Source/devtools/front_end/sources/SourcesView.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
« no previous file with comments | « Source/devtools/front_end/source_frame/SourceFrame.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {WebInspector.TabbedEditorContainerDelegate} 7 * @implements {WebInspector.TabbedEditorContainerDelegate}
8 * @implements {WebInspector.Searchable} 8 * @implements {WebInspector.Searchable}
9 * @implements {WebInspector.Replaceable} 9 * @implements {WebInspector.Replaceable}
10 * @extends {WebInspector.VBox} 10 * @extends {WebInspector.VBox}
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 { 473 {
474 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data .currentFile); 474 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data .currentFile);
475 var shouldUseHistoryManager = uiSourceCode !== this._currentUISourceCode && event.data.userGesture; 475 var shouldUseHistoryManager = uiSourceCode !== this._currentUISourceCode && event.data.userGesture;
476 if (shouldUseHistoryManager) 476 if (shouldUseHistoryManager)
477 this._historyManager.updateCurrentState(); 477 this._historyManager.updateCurrentState();
478 var sourceFrame = this._showFile(uiSourceCode); 478 var sourceFrame = this._showFile(uiSourceCode);
479 if (shouldUseHistoryManager) 479 if (shouldUseHistoryManager)
480 this._historyManager.pushNewState(); 480 this._historyManager.pushNewState();
481 481
482 this._searchableView.setReplaceable(!!sourceFrame && sourceFrame.canEdit Source()); 482 this._searchableView.setReplaceable(!!sourceFrame && sourceFrame.canEdit Source());
483 this._searchableView.resetSearch(); 483 this._searchableView.refreshSearch();
484 484
485 this.dispatchEventToListeners(WebInspector.SourcesView.Events.EditorSele cted, uiSourceCode); 485 this.dispatchEventToListeners(WebInspector.SourcesView.Events.EditorSele cted, uiSourceCode);
486 }, 486 },
487 487
488 /** 488 /**
489 * @param {!WebInspector.UISourceCode} uiSourceCode 489 * @param {!WebInspector.UISourceCode} uiSourceCode
490 */ 490 */
491 sourceRenamed: function(uiSourceCode) 491 sourceRenamed: function(uiSourceCode)
492 { 492 {
493 this._recreateSourceFrameIfNeeded(uiSourceCode); 493 this._recreateSourceFrameIfNeeded(uiSourceCode);
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 var currentUISourceCode = sourcesView.currentUISourceCode(); 802 var currentUISourceCode = sourcesView.currentUISourceCode();
803 if (!currentUISourceCode) 803 if (!currentUISourceCode)
804 return true; 804 return true;
805 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate ._nextFile(currentUISourceCode); 805 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate ._nextFile(currentUISourceCode);
806 if (!nextUISourceCode) 806 if (!nextUISourceCode)
807 return true; 807 return true;
808 sourcesView.showSourceLocation(nextUISourceCode); 808 sourcesView.showSourceLocation(nextUISourceCode);
809 return true; 809 return true;
810 } 810 }
811 } 811 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/source_frame/SourceFrame.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698