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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 } | 656 } |
657 | 657 |
658 this._searchableView.updateCurrentMatchIndex(index); | 658 this._searchableView.updateCurrentMatchIndex(index); |
659 | 659 |
660 var treeElement = this._treeElementForNode(searchResult.node); | 660 var treeElement = this._treeElementForNode(searchResult.node); |
661 if (treeElement) { | 661 if (treeElement) { |
662 treeElement.highlightSearchResults(this._searchQuery); | 662 treeElement.highlightSearchResults(this._searchQuery); |
663 treeElement.reveal(); | 663 treeElement.reveal(); |
664 var matches = treeElement.listItemElement.getElementsByClassName(Web
Inspector.highlightedSearchResultClassName); | 664 var matches = treeElement.listItemElement.getElementsByClassName(Web
Inspector.highlightedSearchResultClassName); |
665 if (matches.length) | 665 if (matches.length) |
666 matches[0].scrollIntoViewIfNeeded(); | 666 matches[0].scrollIntoViewIfNeeded(false); |
667 } | 667 } |
668 }, | 668 }, |
669 | 669 |
670 _hideSearchHighlights: function() | 670 _hideSearchHighlights: function() |
671 { | 671 { |
672 if (!this._searchResults || !this._searchResults.length || this._current
SearchResultIndex < 0) | 672 if (!this._searchResults || !this._searchResults.length || this._current
SearchResultIndex < 0) |
673 return; | 673 return; |
674 var searchResult = this._searchResults[this._currentSearchResultIndex]; | 674 var searchResult = this._searchResults[this._currentSearchResultIndex]; |
675 if (!searchResult.node) | 675 if (!searchResult.node) |
676 return; | 676 return; |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1262 * @override | 1262 * @override |
1263 */ | 1263 */ |
1264 wasShown: function() | 1264 wasShown: function() |
1265 { | 1265 { |
1266 this._toolbarItem.setToggled(true); | 1266 this._toolbarItem.setToggled(true); |
1267 this._nodeChanged(); | 1267 this._nodeChanged(); |
1268 WebInspector.ThrottledWidget.prototype.wasShown.call(this); | 1268 WebInspector.ThrottledWidget.prototype.wasShown.call(this); |
1269 }, | 1269 }, |
1270 | 1270 |
1271 __proto__: WebInspector.ThrottledWidget.prototype | 1271 __proto__: WebInspector.ThrottledWidget.prototype |
1272 } | 1272 } |
OLD | NEW |