2011-02-04 Pavel Podivilov <podivilov@chromium.org>
authorpodivilov@chromium.org <podivilov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Feb 2011 12:40:49 +0000 (12:40 +0000)
committerpodivilov@chromium.org <podivilov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Feb 2011 12:40:49 +0000 (12:40 +0000)
        Reviewed by Pavel Feldman.

        Web Inspector: scripts panel displays wrong file name after reload.
        https://bugs.webkit.org/show_bug.cgi?id=53761

        * inspector/front-end/ScriptsPanel.js:
        (WebInspector.ScriptsPanel.prototype._resourceLoadingFinished):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77618 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/ScriptsPanel.js

index ddd311dd8e2e72f71cff5bb245a537ce1024e604..19f2897706aaf5e37cd2f0414cf63e5147de436f 100644 (file)
@@ -1,3 +1,13 @@
+2011-02-04  Pavel Podivilov  <podivilov@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: scripts panel displays wrong file name after reload.
+        https://bugs.webkit.org/show_bug.cgi?id=53761
+
+        * inspector/front-end/ScriptsPanel.js:
+        (WebInspector.ScriptsPanel.prototype._resourceLoadingFinished):
+
 2011-02-03  Yury Semikhatsky  <yurys@chromium.org>
 
         Reviewed by Pavel Feldman.
index fceef641f5f23776b4504306f213ffd181d343fb..39ac02bbbdf65545e08932eacc8eeab499ac04b4 100644 (file)
@@ -299,17 +299,26 @@ WebInspector.ScriptsPanel.prototype = {
     _resourceLoadingFinished: function(e)
     {
         var resource = e.target;
+
+        var visible = false;
+        var select = this.filesSelectElement;
         for (var i = 0; i < resource._scriptsPendingResourceLoad.length; ++i) {
             // Bind script to resource.
             var script = resource._scriptsPendingResourceLoad[i];
             script.resource = resource;
 
+            if (select.options[select.selectedIndex] === script.filesSelectOption)
+                visible = true;
+
             // Remove script from the files list.
             script.filesSelectOption.parentElement.removeChild(script.filesSelectOption);
         }
         // Adding first script will add resource.
         this._addScriptToFilesMenu(resource._scriptsPendingResourceLoad[0]);
         delete resource._scriptsPendingResourceLoad;
+
+        if (visible)
+            this._showScriptOrResource(resource, { initialLoad: true });
     },
 
     addConsoleMessage: function(message)