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

Side by Side Diff: Source/devtools/front_end/timeline/TimelinePanel.js

Issue 658403002: DevTools: Support regex search and case sensitive search in sources panel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed tests 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 }, 858 },
859 859
860 jumpToPreviousSearchResult: function() 860 jumpToPreviousSearchResult: function()
861 { 861 {
862 if (!this._searchResults || !this._searchResults.length) 862 if (!this._searchResults || !this._searchResults.length)
863 return; 863 return;
864 var index = this._selectedSearchResult ? this._searchResults.indexOf(thi s._selectedSearchResult) : 0; 864 var index = this._selectedSearchResult ? this._searchResults.indexOf(thi s._selectedSearchResult) : 0;
865 this._jumpToSearchResult(index - 1); 865 this._jumpToSearchResult(index - 1);
866 }, 866 },
867 867
868 /**
869 * @return {boolean}
870 */
871 supportsCaseSensitiveSearch: function()
872 {
873 return false;
874 },
875
876 /**
877 * @return {boolean}
878 */
879 supportsRegexSearch: function()
880 {
881 return false;
882 },
883
868 _jumpToSearchResult: function(index) 884 _jumpToSearchResult: function(index)
869 { 885 {
870 this._selectSearchResult((index + this._searchResults.length) % this._se archResults.length); 886 this._selectSearchResult((index + this._searchResults.length) % this._se archResults.length);
871 this._currentViews[0].highlightSearchResult(this._selectedSearchResult, this._searchRegex, true); 887 this._currentViews[0].highlightSearchResult(this._selectedSearchResult, this._searchRegex, true);
872 }, 888 },
873 889
874 _selectSearchResult: function(index) 890 _selectSearchResult: function(index)
875 { 891 {
876 this._selectedSearchResult = this._searchResults[index]; 892 this._selectedSearchResult = this._searchResults[index];
877 this._searchableView.updateCurrentMatchIndex(index); 893 this._searchableView.updateCurrentMatchIndex(index);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 958
943 searchCanceled: function() 959 searchCanceled: function()
944 { 960 {
945 this._clearHighlight(); 961 this._clearHighlight();
946 delete this._searchResults; 962 delete this._searchResults;
947 delete this._selectedSearchResult; 963 delete this._selectedSearchResult;
948 delete this._searchRegex; 964 delete this._searchRegex;
949 }, 965 },
950 966
951 /** 967 /**
952 * @param {string} query 968 * @param {!WebInspector.SearchableView.SearchConfig} searchConfig
953 * @param {boolean} shouldJump 969 * @param {boolean} shouldJump
954 * @param {boolean=} jumpBackwards 970 * @param {boolean=} jumpBackwards
955 */ 971 */
956 performSearch: function(query, shouldJump, jumpBackwards) 972 performSearch: function(searchConfig, shouldJump, jumpBackwards)
957 { 973 {
974 var query = searchConfig.query;
958 this._searchRegex = createPlainTextSearchRegex(query, "i"); 975 this._searchRegex = createPlainTextSearchRegex(query, "i");
959 delete this._searchResults; 976 delete this._searchResults;
960 this._updateSearchHighlight(true, shouldJump, jumpBackwards); 977 this._updateSearchHighlight(true, shouldJump, jumpBackwards);
961 }, 978 },
962 979
963 _updateSelectionDetails: function() 980 _updateSelectionDetails: function()
964 { 981 {
965 if (!this._selection) { 982 if (!this._selection) {
966 this._updateSelectedRangeStats(); 983 this._updateSelectedRangeStats();
967 return; 984 return;
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 1478
1462 WebInspector.TimelinePanelFactory.prototype = { 1479 WebInspector.TimelinePanelFactory.prototype = {
1463 /** 1480 /**
1464 * @return {!WebInspector.Panel} 1481 * @return {!WebInspector.Panel}
1465 */ 1482 */
1466 createPanel: function() 1483 createPanel: function()
1467 { 1484 {
1468 return WebInspector.TimelinePanel._instance(); 1485 return WebInspector.TimelinePanel._instance();
1469 } 1486 }
1470 } 1487 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sources/SourcesView.js ('k') | Source/devtools/front_end/ui/StatusBarButton.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698