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

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: Synchronize with origin Created 5 years, 11 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
« no previous file with comments | « Source/devtools/front_end/elements/ElementsPanel.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1e3b746ff35d0e5d0ebab4ab9aa52617e9c4b45e..0fa85bd3204751144073ae6d895a1a1be254c249 100644
--- a/Source/devtools/front_end/ui/UIUtils.js
+++ b/Source/devtools/front_end/ui/UIUtils.js
@@ -29,6 +29,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+WebInspector.highlightedSearchResultClassName = "highlighted-search-result";
+
/**
* @param {!Element} element
* @param {?function(!MouseEvent): boolean} elementDragStart
@@ -800,15 +802,16 @@ WebInspector.highlightSearchResult = function(element, offset, length, domChange
*/
WebInspector.highlightSearchResults = function(element, resultRanges, changes)
{
- return WebInspector.highlightRangesWithStyleClass(element, resultRanges, "highlighted-search-result", changes);
+ return WebInspector.highlightRangesWithStyleClass(element, resultRanges, WebInspector.highlightedSearchResultClassName, changes);
}
/**
* @param {!Element} element
+ * @param {string} styleClass
*/
-WebInspector.removeSearchResultsHighlight = function(element)
+WebInspector.removeSearchResultsHighlight = function(element, styleClass)
{
- var highlightBits = element.querySelectorAll(".highlighted-search-result");
+ var highlightBits = element.querySelectorAll("." + styleClass);
for (var i = 0; i < highlightBits.length; ++i) {
var span = highlightBits[i];
span.parentElement.replaceChild(createTextNode(span.textContent), span);
« no previous file with comments | « Source/devtools/front_end/elements/ElementsPanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698