2010-09-08 Pavel Podivilov <podivilov@chromium.org>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Sep 2010 16:11:12 +0000 (16:11 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Sep 2010 16:11:12 +0000 (16:11 +0000)
        Reviewed by Yury Semikhatsky.

        Web Inspector: add breakpoints to source frame after content is loaded.
        https://bugs.webkit.org/show_bug.cgi?id=43056

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

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

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

index b7c590a..c34e146 100644 (file)
@@ -1,3 +1,16 @@
+2010-09-08  Pavel Podivilov  <podivilov@chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: add breakpoints to source frame after content is loaded.
+        https://bugs.webkit.org/show_bug.cgi?id=43056
+
+        * inspector/front-end/ScriptsPanel.js:
+        (WebInspector.ScriptsPanel.prototype._resourceLoadingFinished):
+        (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
+        * inspector/front-end/SourceView.js:
+        (WebInspector.SourceView.prototype._contentLoaded):
+
 2010-09-08  Andreas Kling  <andreas.kling@nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
index 75fd6f7..c5267f7 100644 (file)
@@ -276,14 +276,6 @@ WebInspector.ScriptsPanel.prototype = {
 
             // Remove script from the files list.
             script.filesSelectOption.parentElement.removeChild(script.filesSelectOption);
-
-            // Move breakpoints to the resource's frame.
-            if (script._scriptView) {
-                var sourceFrame = script._scriptView.sourceFrame;
-                var resourceFrame = this._sourceFrameForScriptOrResource(resource);
-                for (var j = 0; j < sourceFrame.breakpoints; ++j)
-                    resourceFrame.addBreakpoint(sourceFrame.breakpoints[j]);
-            }
         }
         // Adding first script will add resource.
         this._addScriptToFilesMenu(resource._scriptsPendingResourceLoad[0]);
@@ -599,10 +591,6 @@ WebInspector.ScriptsPanel.prototype = {
                 return null;
             view = WebInspector.panels.resources.resourceViewForResource(scriptOrResource);
             view.headersVisible = false;
-            var sourceFrame = this._sourceFrameForScriptOrResource(scriptOrResource);
-            var breakpoints = WebInspector.breakpointManager.breakpointsForURL(scriptOrResource.url);
-            for (var i = 0; i < breakpoints.length; ++i)
-                sourceFrame.addBreakpoint(breakpoints[i]);
         } else if (scriptOrResource instanceof WebInspector.Script)
             view = this.scriptViewForScript(scriptOrResource);
 
index 240dca1..3f762cc 100644 (file)
@@ -99,6 +99,9 @@ WebInspector.SourceView.prototype = {
         var mimeType = this._canonicalMimeType(this.resource);
         this.sourceFrame.setContent(mimeType, content, this.resource.url);
         this._sourceFrameSetupFinished();
+        var breakpoints = WebInspector.breakpointManager.breakpointsForURL(this.resource.url);
+        for (var i = 0; i < breakpoints.length; ++i)
+            this.sourceFrame.addBreakpoint(breakpoints[i]);
     },
 
     _canonicalMimeType: function(resource)