Title: [92835] trunk/Source/WebCore
Revision
92835
Author
[email protected]
Date
2011-08-11 02:34:16 -0700 (Thu, 11 Aug 2011)

Log Message

Web Inspector: [REGRESSION] Resources panel search fails when search result is found in a resource used in several frames.
https://bugs.webkit.org/show_bug.cgi?id=66007

Reviewed by Pavel Feldman.

* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.performSearch.callback):
(WebInspector.ResourcesPanel.prototype.performSearch):
(WebInspector.FrameTreeElement.prototype.resourceByURL):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (92834 => 92835)


--- trunk/Source/WebCore/ChangeLog	2011-08-11 09:24:06 UTC (rev 92834)
+++ trunk/Source/WebCore/ChangeLog	2011-08-11 09:34:16 UTC (rev 92835)
@@ -1,3 +1,15 @@
+2011-08-11  Vsevolod Vlasov  <[email protected]>
+
+        Web Inspector: [REGRESSION] Resources panel search fails when search result is found in a resource used in several frames.
+        https://bugs.webkit.org/show_bug.cgi?id=66007
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/front-end/ResourcesPanel.js:
+        (WebInspector.ResourcesPanel.prototype.performSearch.callback):
+        (WebInspector.ResourcesPanel.prototype.performSearch):
+        (WebInspector.FrameTreeElement.prototype.resourceByURL):
+
 2011-08-11  Andras Becsi  <[email protected]>
 
         [GTK] Fix the build after r92792.

Modified: trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js (92834 => 92835)


--- trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js	2011-08-11 09:24:06 UTC (rev 92834)
+++ trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js	2011-08-11 09:34:16 UTC (rev 92835)
@@ -713,6 +713,12 @@
                         continue;
                     var resource = frameTreeElement.resourceByURL(searchResult.url);
 
+                    // FIXME: When the same script is used in several frames and this script contains at least 
+                    // one search result then some search results can not be matched with a resource on panel.
+                    // https://bugs.webkit.org/show_bug.cgi?id=66005 
+                    if (!resource)
+                        continue;
+                    
                     if (resource.history.length > 0)
                         continue; // Skip edited resources.
                     this._findTreeElementForResource(resource).searchMatchesFound(searchResult.matchesCount);
@@ -1117,7 +1123,8 @@
 
     resourceByURL: function(url)
     {
-        return this._treeElementForResource[url].representedObject;
+        var treeElement = this._treeElementForResource[url];
+        return treeElement ? treeElement.representedObject : null;
     },
 
     appendChild: function(treeElement)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to