 Chromium Code Reviews
 Chromium Code Reviews Issue 676193002:
  Navigate between individual search matches in DevTools console  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink@master
    
  
    Issue 676193002:
  Navigate between individual search matches in DevTools console  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink@master| 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) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro | 
| 5 * | 5 * | 
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without | 
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions | 
| 8 * are met: | 8 * are met: | 
| 9 * | 9 * | 
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright | 
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 605 searchResult.target.domModel.searchResult(searchResult.index, search Callback.bind(this)); | 605 searchResult.target.domModel.searchResult(searchResult.index, search Callback.bind(this)); | 
| 606 return; | 606 return; | 
| 607 } | 607 } | 
| 608 | 608 | 
| 609 this._searchableView.updateCurrentMatchIndex(index); | 609 this._searchableView.updateCurrentMatchIndex(index); | 
| 610 | 610 | 
| 611 var treeElement = this._treeElementForNode(searchResult.node); | 611 var treeElement = this._treeElementForNode(searchResult.node); | 
| 612 if (treeElement) { | 612 if (treeElement) { | 
| 613 treeElement.highlightSearchResults(this._searchQuery); | 613 treeElement.highlightSearchResults(this._searchQuery); | 
| 614 treeElement.reveal(); | 614 treeElement.reveal(); | 
| 615 var matches = treeElement.listItemElement.getElementsByClassName("hi ghlighted-search-result"); | 615 var matches = treeElement.listItemElement.getElementsByClassName( | 
| 
lushnikov
2014/11/07 16:27:19
Please do not wrap.
 
aknudsen
2014/11/08 12:00:52
Acknowledged.
 
aknudsen
2014/11/09 00:02:14
Done.
 | |
| 616 WebInspector.highlightedSearchResultClassName); | |
| 616 if (matches.length) | 617 if (matches.length) | 
| 617 matches[0].scrollIntoViewIfNeeded(); | 618 matches[0].scrollIntoViewIfNeeded(); | 
| 618 } | 619 } | 
| 619 }, | 620 }, | 
| 620 | 621 | 
| 621 _hideSearchHighlights: function() | 622 _hideSearchHighlights: function() | 
| 622 { | 623 { | 
| 623 if (!this._searchResults || !this._searchResults.length || this._current SearchResultIndex < 0) | 624 if (!this._searchResults || !this._searchResults.length || this._current SearchResultIndex < 0) | 
| 624 return; | 625 return; | 
| 625 var searchResult = this._searchResults[this._currentSearchResultIndex]; | 626 var searchResult = this._searchResults[this._currentSearchResultIndex]; | 
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1099 | 1100 | 
| 1100 WebInspector.ElementsPanelFactory.prototype = { | 1101 WebInspector.ElementsPanelFactory.prototype = { | 
| 1101 /** | 1102 /** | 
| 1102 * @return {!WebInspector.Panel} | 1103 * @return {!WebInspector.Panel} | 
| 1103 */ | 1104 */ | 
| 1104 createPanel: function() | 1105 createPanel: function() | 
| 1105 { | 1106 { | 
| 1106 return WebInspector.ElementsPanel.instance(); | 1107 return WebInspector.ElementsPanel.instance(); | 
| 1107 } | 1108 } | 
| 1108 } | 1109 } | 
| OLD | NEW |