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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js

Issue 1461283004: DevTools: defer reveal in TreeOutline using rAF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698