| 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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 searchResult.target.domModel.searchResult(searchResult.index, search
Callback.bind(this)); | 564 searchResult.target.domModel.searchResult(searchResult.index, search
Callback.bind(this)); |
| 565 return; | 565 return; |
| 566 } | 566 } |
| 567 | 567 |
| 568 this._searchableView.updateCurrentMatchIndex(index); | 568 this._searchableView.updateCurrentMatchIndex(index); |
| 569 | 569 |
| 570 var treeElement = this._treeElementForNode(searchResult.node); | 570 var treeElement = this._treeElementForNode(searchResult.node); |
| 571 if (treeElement) { | 571 if (treeElement) { |
| 572 treeElement.highlightSearchResults(this._searchQuery); | 572 treeElement.highlightSearchResults(this._searchQuery); |
| 573 treeElement.reveal(); | 573 treeElement.reveal(); |
| 574 var matches = treeElement.listItemElement.getElementsByClassName("hi
ghlighted-search-result"); | 574 var matches = treeElement.listItemElement.getElementsByClassName(Web
Inspector.highlightedSearchResultClassName); |
| 575 if (matches.length) | 575 if (matches.length) |
| 576 matches[0].scrollIntoViewIfNeeded(); | 576 matches[0].scrollIntoViewIfNeeded(); |
| 577 } | 577 } |
| 578 }, | 578 }, |
| 579 | 579 |
| 580 _hideSearchHighlights: function() | 580 _hideSearchHighlights: function() |
| 581 { | 581 { |
| 582 if (!this._searchResults || !this._searchResults.length || this._current
SearchResultIndex < 0) | 582 if (!this._searchResults || !this._searchResults.length || this._current
SearchResultIndex < 0) |
| 583 return; | 583 return; |
| 584 var searchResult = this._searchResults[this._currentSearchResultIndex]; | 584 var searchResult = this._searchResults[this._currentSearchResultIndex]; |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1075 WebInspector.ElementsPanelFactory.prototype = { | 1075 WebInspector.ElementsPanelFactory.prototype = { |
| 1076 /** | 1076 /** |
| 1077 * @override | 1077 * @override |
| 1078 * @return {!WebInspector.Panel} | 1078 * @return {!WebInspector.Panel} |
| 1079 */ | 1079 */ |
| 1080 createPanel: function() | 1080 createPanel: function() |
| 1081 { | 1081 { |
| 1082 return WebInspector.ElementsPanel.instance(); | 1082 return WebInspector.ElementsPanel.instance(); |
| 1083 } | 1083 } |
| 1084 } | 1084 } |
| OLD | NEW |