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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
418 doFindSearchMatches.call(this, query); | 418 doFindSearchMatches.call(this, query); |
419 else | 419 else |
420 this._delayedFindSearchMatches = doFindSearchMatches.bind(this, quer y); | 420 this._delayedFindSearchMatches = doFindSearchMatches.bind(this, quer y); |
421 | 421 |
422 this._ensureContentLoaded(); | 422 this._ensureContentLoaded(); |
423 }, | 423 }, |
424 | 424 |
425 _editorFocused: function() | 425 _editorFocused: function() |
426 { | 426 { |
427 this._resetCurrentSearchResultIndex(); | 427 this._resetCurrentSearchResultIndex(); |
428 WebInspector.context.setFlavor(WebInspector.SourceFrame, this); | |
pfeldman
2014/04/17 10:40:25
I think this should be done on the level of Source
apavlov
2014/04/17 12:42:22
If Ctrl+H were our "Search&Replace in source code"
| |
429 }, | |
430 | |
431 _editorBlurred: function() | |
432 { | |
433 WebInspector.context.setFlavor(WebInspector.SourceFrame, null); | |
428 }, | 434 }, |
429 | 435 |
430 _resetCurrentSearchResultIndex: function() | 436 _resetCurrentSearchResultIndex: function() |
431 { | 437 { |
432 if (!this._searchResults.length) | 438 if (!this._searchResults.length) |
433 return; | 439 return; |
434 this._currentSearchResultIndex = -1; | 440 this._currentSearchResultIndex = -1; |
435 if (this._currentSearchMatchChangedCallback) | 441 if (this._currentSearchMatchChangedCallback) |
436 this._currentSearchMatchChangedCallback(this._currentSearchResultInd ex); | 442 this._currentSearchMatchChangedCallback(this._currentSearchResultInd ex); |
437 this._textEditor.highlightSearchResults(this._searchRegex, null); | 443 this._textEditor.highlightSearchResults(this._searchRegex, null); |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
832 scrollChanged: function(lineNumber) | 838 scrollChanged: function(lineNumber) |
833 { | 839 { |
834 this._sourceFrame.scrollChanged(lineNumber); | 840 this._sourceFrame.scrollChanged(lineNumber); |
835 }, | 841 }, |
836 | 842 |
837 editorFocused: function() | 843 editorFocused: function() |
838 { | 844 { |
839 this._sourceFrame._editorFocused(); | 845 this._sourceFrame._editorFocused(); |
840 }, | 846 }, |
841 | 847 |
848 editorBlurred: function() | |
849 { | |
850 this._sourceFrame._editorBlurred(); | |
851 }, | |
852 | |
842 populateLineGutterContextMenu: function(contextMenu, lineNumber) | 853 populateLineGutterContextMenu: function(contextMenu, lineNumber) |
843 { | 854 { |
844 this._sourceFrame.populateLineGutterContextMenu(contextMenu, lineNumber) ; | 855 this._sourceFrame.populateLineGutterContextMenu(contextMenu, lineNumber) ; |
845 }, | 856 }, |
846 | 857 |
847 populateTextAreaContextMenu: function(contextMenu, lineNumber) | 858 populateTextAreaContextMenu: function(contextMenu, lineNumber) |
848 { | 859 { |
849 this._sourceFrame.populateTextAreaContextMenu(contextMenu, lineNumber); | 860 this._sourceFrame.populateTextAreaContextMenu(contextMenu, lineNumber); |
850 }, | 861 }, |
851 | 862 |
(...skipping 10 matching lines...) Expand all Loading... | |
862 | 873 |
863 /** | 874 /** |
864 * @param {?WebInspector.TextRange} from | 875 * @param {?WebInspector.TextRange} from |
865 * @param {?WebInspector.TextRange} to | 876 * @param {?WebInspector.TextRange} to |
866 */ | 877 */ |
867 onJumpToPosition: function(from, to) | 878 onJumpToPosition: function(from, to) |
868 { | 879 { |
869 this._sourceFrame.onJumpToPosition(from, to); | 880 this._sourceFrame.onJumpToPosition(from, to); |
870 } | 881 } |
871 } | 882 } |
OLD | NEW |