OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
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 | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 30 matching lines...) Expand all Loading... | |
41 | 41 |
42 this._searchableView = new WebInspector.SearchableView(this); | 42 this._searchableView = new WebInspector.SearchableView(this); |
43 this._searchableView.setMinimalSearchQuerySize(0); | 43 this._searchableView.setMinimalSearchQuerySize(0); |
44 this._searchableView.show(this.element); | 44 this._searchableView.show(this.element); |
45 | 45 |
46 this._contentsElement = this._searchableView.element; | 46 this._contentsElement = this._searchableView.element; |
47 this._contentsElement.classList.add("console-view"); | 47 this._contentsElement.classList.add("console-view"); |
48 this._visibleViewMessages = []; | 48 this._visibleViewMessages = []; |
49 this._urlToMessageCount = {}; | 49 this._urlToMessageCount = {}; |
50 this._hiddenByFilterCount = 0; | 50 this._hiddenByFilterCount = 0; |
51 this._regexMatchRanges = []; | |
lushnikov
2014/11/07 16:27:16
please annotate this with the type of elemens in t
aknudsen
2014/11/08 11:49:50
Acknowledged.
aknudsen
2014/11/09 00:02:12
Done.
| |
52 | |
51 | 53 |
52 this._clearConsoleButton = new WebInspector.StatusBarButton(WebInspector.UIS tring("Clear console log."), "clear-status-bar-item"); | 54 this._clearConsoleButton = new WebInspector.StatusBarButton(WebInspector.UIS tring("Clear console log."), "clear-status-bar-item"); |
53 this._clearConsoleButton.addEventListener("click", this._requestClearMessage s, this); | 55 this._clearConsoleButton.addEventListener("click", this._requestClearMessage s, this); |
54 | 56 |
55 this._executionContextSelector = new WebInspector.StatusBarComboBox(this._ex ecutionContextChanged.bind(this), "console-context"); | 57 this._executionContextSelector = new WebInspector.StatusBarComboBox(this._ex ecutionContextChanged.bind(this), "console-context"); |
56 | 58 |
57 /** | 59 /** |
58 * @type {!Map.<!WebInspector.ExecutionContext, !Element>} | 60 * @type {!Map.<!WebInspector.ExecutionContext, !Element>} |
59 */ | 61 */ |
60 this._optionByExecutionContext = new Map(); | 62 this._optionByExecutionContext = new Map(); |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
567 this._currentGroup = this._currentGroup.parentGroup(); | 569 this._currentGroup = this._currentGroup.parentGroup(); |
568 return; | 570 return; |
569 } | 571 } |
570 if (!this._currentGroup.messagesHidden()) { | 572 if (!this._currentGroup.messagesHidden()) { |
571 var originatingMessage = viewMessage.consoleMessage().originatingMes sage(); | 573 var originatingMessage = viewMessage.consoleMessage().originatingMes sage(); |
572 if (lastMessage && originatingMessage && lastMessage.consoleMessage( ) === originatingMessage) | 574 if (lastMessage && originatingMessage && lastMessage.consoleMessage( ) === originatingMessage) |
573 lastMessage.toMessageElement().classList.add("console-adjacent-u ser-command-result"); | 575 lastMessage.toMessageElement().classList.add("console-adjacent-u ser-command-result"); |
574 | 576 |
575 this._visibleViewMessages.push(viewMessage); | 577 this._visibleViewMessages.push(viewMessage); |
576 | 578 |
577 if (this._searchRegex && viewMessage.matchesRegex(this._searchRegex) ) { | 579 if (this._searchRegex && this._searchMessage(this._visibleViewMessag es.length - 1)) |
578 this._searchResults.push(viewMessage); | 580 this._searchableView.updateSearchMatchesCount(this._regexMatchRa nges.length); |
579 this._searchableView.updateSearchMatchesCount(this._searchResult s.length); | |
580 } | |
581 } | 581 } |
582 | 582 |
583 if (viewMessage.consoleMessage().isGroupStartMessage()) | 583 if (viewMessage.consoleMessage().isGroupStartMessage()) |
584 this._currentGroup = new WebInspector.ConsoleGroup(this._currentGrou p, viewMessage); | 584 this._currentGroup = new WebInspector.ConsoleGroup(this._currentGrou p, viewMessage); |
585 }, | 585 }, |
586 | 586 |
587 /** | 587 /** |
588 * @param {!WebInspector.ConsoleMessage} message | 588 * @param {!WebInspector.ConsoleMessage} message |
589 * @return {!WebInspector.ConsoleViewMessage} | 589 * @return {!WebInspector.ConsoleViewMessage} |
590 */ | 590 */ |
591 _createViewMessage: function(message) | 591 _createViewMessage: function(message) |
592 { | 592 { |
593 var nestingLevel = this._currentGroup.nestingLevel(); | 593 var nestingLevel = this._currentGroup.nestingLevel(); |
594 switch (message.type) { | 594 switch (message.type) { |
595 case WebInspector.ConsoleMessage.MessageType.Command: | 595 case WebInspector.ConsoleMessage.MessageType.Command: |
596 return new WebInspector.ConsoleCommand(message, this._linkifier, nes tingLevel); | 596 return new WebInspector.ConsoleCommand(message, this._linkifier, nes tingLevel); |
597 case WebInspector.ConsoleMessage.MessageType.Result: | 597 case WebInspector.ConsoleMessage.MessageType.Result: |
598 return new WebInspector.ConsoleCommandResult(message, this._linkifie r, nestingLevel); | 598 return new WebInspector.ConsoleCommandResult(message, this._linkifie r, nestingLevel); |
599 case WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed: | 599 case WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed: |
600 case WebInspector.ConsoleMessage.MessageType.StartGroup: | 600 case WebInspector.ConsoleMessage.MessageType.StartGroup: |
601 return new WebInspector.ConsoleGroupViewMessage(message, this._linki fier, nestingLevel); | 601 return new WebInspector.ConsoleGroupViewMessage(message, this._linki fier, nestingLevel); |
602 default: | 602 default: |
603 return new WebInspector.ConsoleViewMessage(message, this._linkifier, nestingLevel); | 603 return new WebInspector.ConsoleViewMessage(message, this._linkifier, nestingLevel); |
604 } | 604 } |
605 }, | 605 }, |
606 | 606 |
607 _consoleCleared: function() | 607 _consoleCleared: function() |
608 { | 608 { |
609 this._clearCurrentSearchResultHighlight(); | 609 this._clearSearchResultHighlights(); |
610 this._consoleMessages = []; | 610 this._consoleMessages = []; |
611 this._updateMessageList(); | 611 this._updateMessageList(); |
612 | 612 |
613 if (this._searchRegex) | 613 if (this._searchRegex) |
614 this._searchableView.updateSearchMatchesCount(0); | 614 this._searchableView.updateSearchMatchesCount(0); |
615 | 615 |
616 this._linkifier.reset(); | 616 this._linkifier.reset(); |
617 }, | 617 }, |
618 | 618 |
619 _handleContextMenuEvent: function(event) | 619 _handleContextMenuEvent: function(event) |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
677 return true; | 677 return true; |
678 } | 678 } |
679 | 679 |
680 return false; | 680 return false; |
681 }, | 681 }, |
682 | 682 |
683 _updateMessageList: function() | 683 _updateMessageList: function() |
684 { | 684 { |
685 this._topGroup = WebInspector.ConsoleGroup.createTopGroup(); | 685 this._topGroup = WebInspector.ConsoleGroup.createTopGroup(); |
686 this._currentGroup = this._topGroup; | 686 this._currentGroup = this._topGroup; |
687 this._searchResults = []; | 687 this._regexMatchRanges = []; |
688 this._hiddenByFilterCount = 0; | 688 this._hiddenByFilterCount = 0; |
689 for (var i = 0; i < this._visibleViewMessages.length; ++i) { | 689 for (var i = 0; i < this._visibleViewMessages.length; ++i) { |
690 this._visibleViewMessages[i].resetCloseGroupDecorationCount(); | 690 this._visibleViewMessages[i].resetCloseGroupDecorationCount(); |
691 this._visibleViewMessages[i].resetIncrementRepeatCount(); | 691 this._visibleViewMessages[i].resetIncrementRepeatCount(); |
692 } | 692 } |
693 this._visibleViewMessages = []; | 693 this._visibleViewMessages = []; |
694 for (var i = 0; i < this._consoleMessages.length; ++i) | 694 for (var i = 0; i < this._consoleMessages.length; ++i) |
695 this._appendMessageToEnd(this._consoleMessages[i]); | 695 this._appendMessageToEnd(this._consoleMessages[i]); |
696 this._updateFilterStatus(); | 696 this._updateFilterStatus(); |
697 this._viewport.invalidate(); | 697 this._viewport.invalidate(); |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
891 /** | 891 /** |
892 * @return {!Array.<!Element>} | 892 * @return {!Array.<!Element>} |
893 */ | 893 */ |
894 elementsToRestoreScrollPositionsFor: function() | 894 elementsToRestoreScrollPositionsFor: function() |
895 { | 895 { |
896 return [this._messagesElement]; | 896 return [this._messagesElement]; |
897 }, | 897 }, |
898 | 898 |
899 searchCanceled: function() | 899 searchCanceled: function() |
900 { | 900 { |
901 this._clearCurrentSearchResultHighlight(); | 901 this._clearSearchResultHighlights(); |
902 delete this._searchResults; | 902 this._regexMatchRanges = []; |
903 delete this._searchRegex; | 903 delete this._searchRegex; |
904 this._viewport.refresh(); | 904 this._viewport.refresh(); |
905 }, | 905 }, |
906 | 906 |
907 /** | 907 /** |
908 * @param {!WebInspector.SearchableView.SearchConfig} searchConfig | 908 * @param {!WebInspector.SearchableView.SearchConfig} searchConfig |
909 * @param {boolean} shouldJump | 909 * @param {boolean} shouldJump |
910 * @param {boolean=} jumpBackwards | 910 * @param {boolean=} jumpBackwards |
911 */ | 911 */ |
912 performSearch: function(searchConfig, shouldJump, jumpBackwards) | 912 performSearch: function(searchConfig, shouldJump, jumpBackwards) |
913 { | 913 { |
914 var query = searchConfig.query; | 914 var query = searchConfig.query; |
915 this.searchCanceled(); | 915 this.searchCanceled(); |
916 this._searchableView.updateSearchMatchesCount(0); | 916 this._searchableView.updateSearchMatchesCount(0); |
917 this._searchRegex = createPlainTextSearchRegex(query, "gi"); | 917 this._searchRegex = createPlainTextSearchRegex(query, "gi"); |
918 | 918 |
919 /** @type {!Array.<number>} */ | 919 this._regexMatchRanges = []; |
920 this._searchResults = []; | 920 this._currentMatchRangeIndex = -1; |
921 for (var i = 0; i < this._visibleViewMessages.length; i++) { | 921 for (var i = 0; i < this._visibleViewMessages.length; i++) |
922 if (this._visibleViewMessages[i].matchesRegex(this._searchRegex)) | 922 this._searchMessage(i); |
923 this._searchResults.push(i); | 923 this._searchableView.updateSearchMatchesCount(this._regexMatchRanges.len gth); |
924 } | 924 if (shouldJump) |
925 this._searchableView.updateSearchMatchesCount(this._searchResults.length ); | 925 this._jumpToMatch(jumpBackwards ? -1 : 0); |
926 this._currentSearchResultIndex = -1; | |
927 if (shouldJump && this._searchResults.length) | |
928 this._jumpToSearchResult(jumpBackwards ? -1 : 0); | |
929 this._viewport.refresh(); | 926 this._viewport.refresh(); |
930 }, | 927 }, |
931 | 928 |
932 jumpToNextSearchResult: function() | 929 jumpToNextSearchResult: function() |
933 { | 930 { |
934 if (!this._searchResults || !this._searchResults.length) | 931 this._jumpToMatch(this._currentMatchRangeIndex + 1); |
935 return; | |
936 this._jumpToSearchResult(this._currentSearchResultIndex + 1); | |
937 }, | 932 }, |
938 | 933 |
939 jumpToPreviousSearchResult: function() | 934 jumpToPreviousSearchResult: function() |
940 { | 935 { |
941 if (!this._searchResults || !this._searchResults.length) | 936 this._jumpToMatch(this._currentMatchRangeIndex - 1); |
942 return; | |
943 this._jumpToSearchResult(this._currentSearchResultIndex - 1); | |
944 }, | 937 }, |
945 | 938 |
946 /** | 939 /** |
947 * @return {boolean} | 940 * @return {boolean} |
948 */ | 941 */ |
949 supportsCaseSensitiveSearch: function() | 942 supportsCaseSensitiveSearch: function() |
950 { | 943 { |
951 return false; | 944 return false; |
952 }, | 945 }, |
953 | 946 |
954 /** | 947 /** |
955 * @return {boolean} | 948 * @return {boolean} |
956 */ | 949 */ |
957 supportsRegexSearch: function() | 950 supportsRegexSearch: function() |
958 { | 951 { |
959 return false; | 952 return false; |
960 }, | 953 }, |
961 | 954 |
962 _clearCurrentSearchResultHighlight: function() | 955 _clearSearchResultHighlights: function() |
963 { | 956 { |
964 if (!this._searchResults) | 957 for (var i = 0; i < this._regexMatchRanges.length; ++i) { |
958 var matchRange = this._regexMatchRanges[i]; | |
959 var message = this._visibleViewMessages[ | |
lushnikov
2014/11/07 16:27:17
please no wrapping in the code
aknudsen
2014/11/08 11:49:50
Acknowledged.
Out of curiousity though, how do yo
aknudsen
2014/11/09 00:02:12
Done.
lushnikov
2014/11/19 06:55:47
It depends, one enables line-wrapping, one gets la
| |
960 matchRange.messageIndex]; | |
961 if (message) | |
962 message.clearHighlights(); | |
963 } | |
964 this._currentMatchRangeIndex = -1; | |
965 }, | |
966 | |
967 _jumpToMatch: function(index) | |
lushnikov
2014/11/07 16:27:16
annotate
aknudsen
2014/11/08 11:49:51
Acknowledged.
aknudsen
2014/11/09 00:02:13
Done.
| |
968 { | |
969 if (!this._regexMatchRanges.length) | |
965 return; | 970 return; |
966 | 971 |
967 var highlightedViewMessage = this._visibleViewMessages[this._searchResul ts[this._currentSearchResultIndex]]; | 972 index = mod(index, this._regexMatchRanges.length); |
lushnikov
2014/11/07 16:27:17
this line could be moved after the "if"
aknudsen
2014/11/08 11:49:51
Acknowledged.
aknudsen
2014/11/09 00:02:13
Done.
| |
968 if (highlightedViewMessage) | 973 var matchRange; |
969 highlightedViewMessage.clearHighlight(); | 974 if (this._currentMatchRangeIndex >= 0) { |
970 this._currentSearchResultIndex = -1; | 975 // Convert current match highlight to regular match highlight |
lushnikov
2014/11/07 16:27:17
remove comment
aknudsen
2014/11/08 11:49:50
Acknowledged.
aknudsen
2014/11/09 00:02:13
Done.
| |
976 matchRange = this._regexMatchRanges[this._currentMatchRangeIndex]; | |
977 matchRange.highlightNode.classList.remove(WebInspector.currentHighli ghtedSearchResultClassName); | |
978 matchRange.highlightNode.classList.add(WebInspector.highlightedSearc hResultClassName); | |
lushnikov
2014/11/07 16:27:16
We can make this simpler. This line could be delet
aknudsen
2014/11/08 11:49:50
Acknowledged.
aknudsen
2014/11/09 00:02:13
Done.
| |
979 } | |
980 | |
981 this._currentMatchRangeIndex = index; | |
982 this._searchableView.updateCurrentMatchIndex(index); | |
983 matchRange = this._regexMatchRanges[index]; | |
984 matchRange.highlightNode.classList.remove(WebInspector.highlightedSearch ResultClassName); | |
lushnikov
2014/11/07 16:27:16
this is not needed as per previous comment
aknudsen
2014/11/08 11:49:50
Acknowledged.
aknudsen
2014/11/09 00:02:13
Done.
| |
985 matchRange.highlightNode.classList.add(WebInspector.currentHighlightedSe archResultClassName); | |
986 // Scroll the message itself into view | |
lushnikov
2014/11/07 16:27:17
lets remove these comments regarding scroll and ad
aknudsen
2014/11/08 11:49:51
Why are the comments problematic though? I had no
lushnikov
2014/11/19 06:55:47
In this case, the comment doesn't add any new info
| |
987 this._viewport.scrollItemIntoView(matchRange.messageIndex); | |
988 // In case the highlight node is in a tree element, it must be scrolled into view, | |
989 // the message itself must first be scrolled into view though | |
990 matchRange.highlightNode.scrollIntoViewIfNeeded(); | |
971 }, | 991 }, |
972 | 992 |
973 _jumpToSearchResult: function(index) | 993 _searchMessage: function(index) |
lushnikov
2014/11/07 16:27:16
please annotate
also, please move it closer to the
aknudsen
2014/11/08 11:49:50
Acknowledged.
aknudsen
2014/11/09 00:02:13
Done.
| |
974 { | 994 { |
975 index = mod(index, this._searchResults.length); | 995 // Reset regex wrt. global search |
lushnikov
2014/11/07 16:27:16
please finish the comment with a period
aknudsen
2014/11/08 11:49:51
Acknowledged.
Is this a common style guideline?
aknudsen
2014/11/09 00:02:12
Done.
lushnikov
2014/11/19 06:55:47
Yes, http://www.chromium.org/blink/coding-style#TO
| |
976 this._clearCurrentSearchResultHighlight(); | 996 this._searchRegex.lastIndex = 0; |
977 this._currentSearchResultIndex = index; | 997 |
978 this._searchableView.updateCurrentMatchIndex(this._currentSearchResultIn dex); | 998 var message = this._visibleViewMessages[index]; |
979 var currentViewMessageIndex = this._searchResults[index]; | 999 var text = message.getText(); |
980 this._viewport.scrollItemIntoView(currentViewMessageIndex); | 1000 var match; |
981 this._visibleViewMessages[currentViewMessageIndex].highlightSearchResult s(this._searchRegex); | 1001 var matchRange; |
1002 while ((match = this._searchRegex.exec(text)) && match[0]) { | |
1003 matchRange = { | |
1004 messageIndex: index, | |
1005 start: match.index, | |
1006 end: match.index + match[0].length - 1, | |
lushnikov
2014/11/07 16:27:16
you compute "end" here, and afterward couple of la
aknudsen
2014/11/08 11:49:50
Acknowledged.
aknudsen
2014/11/09 00:02:13
I simplified, by sending an array of SourceRanges
| |
1007 }; | |
1008 matchRange.highlightNode = message.highlightMatch(matchRange.start, matchRange.end)[0]; | |
lushnikov
2014/11/07 16:27:16
Bad news: this calls WebInspector.highlightSearchR
aknudsen
2014/11/08 11:49:50
Acknowledged. Thanks.
aknudsen
2014/11/09 00:02:12
Done.
| |
1009 this._regexMatchRanges.push(matchRange); | |
1010 } | |
1011 | |
1012 return !!matchRange; | |
982 }, | 1013 }, |
983 | 1014 |
984 __proto__: WebInspector.VBox.prototype | 1015 __proto__: WebInspector.VBox.prototype |
985 } | 1016 } |
986 | 1017 |
987 /** | 1018 /** |
988 * @constructor | 1019 * @constructor |
989 * @extends {WebInspector.Object} | 1020 * @extends {WebInspector.Object} |
990 * @param {!WebInspector.ConsoleView} view | 1021 * @param {!WebInspector.ConsoleView} view |
991 */ | 1022 */ |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1125 * @param {!WebInspector.ConsoleMessage} message | 1156 * @param {!WebInspector.ConsoleMessage} message |
1126 * @param {!WebInspector.Linkifier} linkifier | 1157 * @param {!WebInspector.Linkifier} linkifier |
1127 * @param {number} nestingLevel | 1158 * @param {number} nestingLevel |
1128 */ | 1159 */ |
1129 WebInspector.ConsoleCommand = function(message, linkifier, nestingLevel) | 1160 WebInspector.ConsoleCommand = function(message, linkifier, nestingLevel) |
1130 { | 1161 { |
1131 WebInspector.ConsoleViewMessage.call(this, message, linkifier, nestingLevel) ; | 1162 WebInspector.ConsoleViewMessage.call(this, message, linkifier, nestingLevel) ; |
1132 } | 1163 } |
1133 | 1164 |
1134 WebInspector.ConsoleCommand.prototype = { | 1165 WebInspector.ConsoleCommand.prototype = { |
1135 clearHighlight: function() | 1166 clearHighlights: function() |
1136 { | 1167 { |
1137 var highlightedMessage = this._formattedCommand; | 1168 var highlightedMessage = this._formattedCommand; |
1138 delete this._formattedCommand; | 1169 delete this._formattedCommand; |
1139 this._formatCommand(); | 1170 this._formatCommand(); |
1140 this._element.replaceChild(this._formattedCommand, highlightedMessage); | 1171 this._element.replaceChild(this._formattedCommand, highlightedMessage); |
1141 }, | 1172 }, |
1142 | 1173 |
1174 // XXX: Can we remove this? | |
lushnikov
2014/11/07 16:27:17
Yes!
aknudsen
2014/11/08 11:49:51
Acknowledged. :)
aknudsen
2014/11/09 00:02:13
Done.
| |
1143 /** | 1175 /** |
1144 * @param {!RegExp} regexObject | 1176 * @param {!RegExp} regexObject |
1145 */ | 1177 */ |
1146 highlightSearchResults: function(regexObject) | 1178 highlightSearchResults: function(regexObject) |
1147 { | 1179 { |
1148 regexObject.lastIndex = 0; | 1180 regexObject.lastIndex = 0; |
1149 var match = regexObject.exec(this.text); | 1181 var match = regexObject.exec(this.text); |
1150 var matchRanges = []; | 1182 var matchRanges = []; |
1151 while (match) { | 1183 while (match) { |
1152 matchRanges.push(new WebInspector.SourceRange(match.index, match[0]. length)); | 1184 matchRanges.push(new WebInspector.SourceRange(match.index, match[0]. length)); |
(...skipping 27 matching lines...) Expand all Loading... | |
1180 } | 1212 } |
1181 return this._element; | 1213 return this._element; |
1182 }, | 1214 }, |
1183 | 1215 |
1184 _formatCommand: function() | 1216 _formatCommand: function() |
1185 { | 1217 { |
1186 this._formattedCommand = createElementWithClass("span", "console-message -text source-code"); | 1218 this._formattedCommand = createElementWithClass("span", "console-message -text source-code"); |
1187 this._formattedCommand.textContent = this.text; | 1219 this._formattedCommand.textContent = this.text; |
1188 }, | 1220 }, |
1189 | 1221 |
1222 /** | |
1223 * @return {!string} | |
lushnikov
2014/11/07 16:27:16
wrong indent for comments (asterisks should form a
apavlov
2014/11/07 16:30:07
Non-object types should not have ! in front of the
aknudsen
2014/11/08 11:49:50
Acknowledged.
aknudsen
2014/11/08 11:49:51
Acknowledged.
aknudsen
2014/11/09 00:02:12
Done.
aknudsen
2014/11/09 00:02:13
Done.
| |
1224 */ | |
1225 getText: function() | |
1226 { | |
1227 return this.text; | |
1228 }, | |
1229 | |
1230 /** | |
1231 * @return {!Array.<!Element>} | |
1232 */ | |
1233 highlightMatch: function(start, end) | |
lushnikov
2014/11/07 16:27:17
arguments should be annotated as well
aknudsen
2014/11/08 11:49:51
Acknowledged.
aknudsen
2014/11/09 00:02:13
Done.
| |
1234 { | |
1235 var highlightNodes = []; | |
1236 if (this._formattedCommand) { | |
1237 highlightNodes = WebInspector.highlightSearchResults(this._formatted Command, | |
lushnikov
2014/11/07 16:27:16
please no wrap
aknudsen
2014/11/08 11:49:50
Acknowledged.
aknudsen
2014/11/09 00:02:13
Done.
| |
1238 [new WebInspector.SourceRange(start, end - start + 1)]); | |
1239 this._element.scrollIntoViewIfNeeded(); | |
lushnikov
2014/11/07 16:27:17
Why do you need this call? It should not be needed
aknudsen
2014/11/09 00:02:12
Done.
| |
1240 } | |
1241 return highlightNodes; | |
1242 }, | |
1243 | |
1190 __proto__: WebInspector.ConsoleViewMessage.prototype | 1244 __proto__: WebInspector.ConsoleViewMessage.prototype |
1191 } | 1245 } |
1192 | 1246 |
1193 /** | 1247 /** |
1194 * @constructor | 1248 * @constructor |
1195 * @extends {WebInspector.ConsoleViewMessage} | 1249 * @extends {WebInspector.ConsoleViewMessage} |
1196 * @param {!WebInspector.ConsoleMessage} message | 1250 * @param {!WebInspector.ConsoleMessage} message |
1197 * @param {!WebInspector.Linkifier} linkifier | 1251 * @param {!WebInspector.Linkifier} linkifier |
1198 * @param {number} nestingLevel | 1252 * @param {number} nestingLevel |
1199 */ | 1253 */ |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1284 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = { | 1338 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = { |
1285 /** | 1339 /** |
1286 * @return {boolean} | 1340 * @return {boolean} |
1287 */ | 1341 */ |
1288 handleAction: function() | 1342 handleAction: function() |
1289 { | 1343 { |
1290 WebInspector.console.show(); | 1344 WebInspector.console.show(); |
1291 return true; | 1345 return true; |
1292 } | 1346 } |
1293 } | 1347 } |
OLD | NEW |