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

Side by Side Diff: Source/WebCore/inspector/front-end/ResourcesPanel.js

Issue 7648029: Merge 92835 - Web Inspector: [REGRESSION] Resources panel search fails when search result is foun... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 function callback(error, result) 719 function callback(error, result)
720 { 720 {
721 if (!error) { 721 if (!error) {
722 for (var i = 0; i < result.length; i++) { 722 for (var i = 0; i < result.length; i++) {
723 var searchResult = result[i]; 723 var searchResult = result[i];
724 var frameTreeElement = this._treeElementForFrameId[searchRes ult.frameId]; 724 var frameTreeElement = this._treeElementForFrameId[searchRes ult.frameId];
725 if (!frameTreeElement) 725 if (!frameTreeElement)
726 continue; 726 continue;
727 var resource = frameTreeElement.resourceByURL(searchResult.u rl); 727 var resource = frameTreeElement.resourceByURL(searchResult.u rl);
728 728
729 // FIXME: When the same script is used in several frames and this script contains at least
730 // one search result then some search results can not be mat ched with a resource on panel.
731 // https://bugs.webkit.org/show_bug.cgi?id=66005
732 if (!resource)
733 continue;
734
729 if (resource.history.length > 0) 735 if (resource.history.length > 0)
730 continue; // Skip edited resources. 736 continue; // Skip edited resources.
731 this._findTreeElementForResource(resource).searchMatchesFoun d(searchResult.matchesCount); 737 this._findTreeElementForResource(resource).searchMatchesFoun d(searchResult.matchesCount);
732 totalMatchesCount += searchResult.matchesCount; 738 totalMatchesCount += searchResult.matchesCount;
733 } 739 }
734 } 740 }
735 741
736 WebInspector.searchController.updateSearchMatchesCount(totalMatchesC ount, this); 742 WebInspector.searchController.updateSearchMatchesCount(totalMatchesC ount, this);
737 this._searchController = new WebInspector.ResourcesSearchController( this.resourcesListTreeElement); 743 this._searchController = new WebInspector.ResourcesSearchController( this.resourcesListTreeElement);
738 744
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 } 1129 }
1124 var resourceTreeElement = new WebInspector.FrameResourceTreeElement(this ._storagePanel, resource); 1130 var resourceTreeElement = new WebInspector.FrameResourceTreeElement(this ._storagePanel, resource);
1125 this._insertInPresentationOrder(categoryElement, resourceTreeElement); 1131 this._insertInPresentationOrder(categoryElement, resourceTreeElement);
1126 resourceTreeElement._populateRevisions(); 1132 resourceTreeElement._populateRevisions();
1127 1133
1128 this._treeElementForResource[resource.url] = resourceTreeElement; 1134 this._treeElementForResource[resource.url] = resourceTreeElement;
1129 }, 1135 },
1130 1136
1131 resourceByURL: function(url) 1137 resourceByURL: function(url)
1132 { 1138 {
1133 return this._treeElementForResource[url].representedObject; 1139 var treeElement = this._treeElementForResource[url];
1140 return treeElement ? treeElement.representedObject : null;
1134 }, 1141 },
1135 1142
1136 appendChild: function(treeElement) 1143 appendChild: function(treeElement)
1137 { 1144 {
1138 this._insertInPresentationOrder(this, treeElement); 1145 this._insertInPresentationOrder(this, treeElement);
1139 }, 1146 },
1140 1147
1141 _insertInPresentationOrder: function(parentTreeElement, childTreeElement) 1148 _insertInPresentationOrder: function(parentTreeElement, childTreeElement)
1142 { 1149 {
1143 // Insert in the alphabetical order, first frames, then resources. Docum ent resource goes last. 1150 // Insert in the alphabetical order, first frames, then resources. Docum ent resource goes last.
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 1727
1721 _lastTreeElement: function() 1728 _lastTreeElement: function()
1722 { 1729 {
1723 var treeElement = this._root; 1730 var treeElement = this._root;
1724 var nextTreeElement; 1731 var nextTreeElement;
1725 while (nextTreeElement = this._traverseNext(treeElement)) 1732 while (nextTreeElement = this._traverseNext(treeElement))
1726 treeElement = nextTreeElement; 1733 treeElement = nextTreeElement;
1727 return treeElement; 1734 return treeElement;
1728 } 1735 }
1729 } 1736 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698