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

Unified Diff: Source/devtools/front_end/ui/UIUtils.js

Issue 676193002: Navigate between individual search matches in DevTools console (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/ui/UIUtils.js
diff --git a/Source/devtools/front_end/ui/UIUtils.js b/Source/devtools/front_end/ui/UIUtils.js
index bc5de73f4cbd958523cb4a20db3a3c83d1c88f6b..318e04059950d5275d741a0595ccb73988b266ec 100644
--- a/Source/devtools/front_end/ui/UIUtils.js
+++ b/Source/devtools/front_end/ui/UIUtils.js
@@ -784,11 +784,13 @@ WebInspector.highlightSearchResult = function(element, offset, length, domChange
* @param {!Element} element
* @param {!Array.<!WebInspector.SourceRange>} resultRanges
* @param {!Array.<!Object>=} changes
+ * @param {?Boolean=} isCurrent
robwu 2014/10/25 23:13:00 Booleans are primitive types, use a lowercase "boo
aknudsen 2014/10/26 11:22:40 I made it boolean= instead since the argument is i
* @return {!Array.<!Element>}
*/
-WebInspector.highlightSearchResults = function(element, resultRanges, changes)
+WebInspector.highlightSearchResults = function(element, resultRanges, changes, isCurrent)
{
- return WebInspector.highlightRangesWithStyleClass(element, resultRanges, "highlighted-search-result", changes);
+ var style = isCurrent ? "current-search-result" : "highlighted-search-result";
robwu 2014/10/25 23:13:00 Rename "style" to className.
aknudsen 2014/10/26 11:22:41 Done.
+ return WebInspector.highlightRangesWithStyleClass(element, resultRanges, style, changes);
}
/**

Powered by Google App Engine
This is Rietveld 408576698