2011-04-08 Pavel Podivilov <podivilov@chromium.org>

        Reviewed by Pavel Feldman.

        Web Inspector: fix scripts concatenation in scripts panel.
        https://bugs.webkit.org/show_bug.cgi?id=58138

        When there is just one script starting at 0:0 it should not be surrounded by <script> framing.

        * inspector/front-end/SourceFile.js:
        (WebInspector.SourceFile.prototype._loadResourceContent):
        (WebInspector.SourceFile.prototype._loadAndConcatenateScriptsContent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 63d1254e
2011-04-08 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: fix scripts concatenation in scripts panel.
https://bugs.webkit.org/show_bug.cgi?id=58138
When there is just one script starting at 0:0 it should not be surrounded by <script> framing.
* inspector/front-end/SourceFile.js:
(WebInspector.SourceFile.prototype._loadResourceContent):
(WebInspector.SourceFile.prototype._loadAndConcatenateScriptsContent):
2011-04-08 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
......@@ -126,6 +126,11 @@ WebInspector.SourceFile.prototype = {
{
function didRequestContent(text)
{
if (!text) {
this._loadAndConcatenateScriptsContent();
return;
}
if (resource.type === WebInspector.Resource.Type.Script)
this._didRequestContent("text/javascript", text);
else {
......@@ -150,7 +155,11 @@ WebInspector.SourceFile.prototype = {
function didRequestSource(source)
{
sources.push(source);
if (sources.length === scripts.length)
if (sources.length < scripts.length)
return;
if (scripts.length === 1 && !scripts[0].lineOffset && !scripts[0].columnOffset)
this._didRequestContent("text/javascript", source);
else
this._concatenateScriptsContent(scripts, sources);
}
for (var i = 0; i < scripts.length; ++i)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment