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

Unified Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js

Issue 1899893003: [Devtools] JSONView implements Searchable interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
index d15768825935c0266e0b1b7b31efe628ec018919..66d037e64bc4df87e6505689c8593b2cd5eb3092 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
@@ -831,7 +831,7 @@ WebInspector.ConsoleView.prototype = {
*/
_commandEvaluated: function(event)
{
- var data = /** {{result: ?WebInspector.RemoteObject, wasThrown: boolean, text: string, commandMessage: !WebInspector.ConsoleMessage}} */ (event.data);
+ var data = /** @type {{result: ?WebInspector.RemoteObject, wasThrown: boolean, text: string, commandMessage: !WebInspector.ConsoleMessage}} */ (event.data);
this._prompt.pushHistoryItem(data.text);
this._consoleHistorySetting.set(this._prompt.historyData().slice(-WebInspector.ConsoleView.persistedHistorySize));
this._printResult(data.result, data.wasThrown, data.commandMessage, data.exceptionDetails);
@@ -995,13 +995,11 @@ WebInspector.ConsoleView.prototype = {
if (!this._regexMatchRanges.length)
return;
- var currentSearchResultClassName = "current-search-result";
-
var matchRange;
if (this._currentMatchRangeIndex >= 0) {
matchRange = this._regexMatchRanges[this._currentMatchRangeIndex];
var message = this._visibleViewMessages[matchRange.messageIndex];
- message.searchHighlightNode(matchRange.matchIndex).classList.remove(currentSearchResultClassName);
+ message.searchHighlightNode(matchRange.matchIndex).classList.remove(WebInspector.highlightedCurrentSearchResultClassName);
}
index = mod(index, this._regexMatchRanges.length);
@@ -1010,7 +1008,7 @@ WebInspector.ConsoleView.prototype = {
matchRange = this._regexMatchRanges[index];
var message = this._visibleViewMessages[matchRange.messageIndex];
var highlightNode = message.searchHighlightNode(matchRange.matchIndex);
- highlightNode.classList.add(currentSearchResultClassName);
+ highlightNode.classList.add(WebInspector.highlightedCurrentSearchResultClassName);
this._viewport.scrollItemIntoView(matchRange.messageIndex);
highlightNode.scrollIntoViewIfNeeded();
},

Powered by Google App Engine
This is Rietveld 408576698