WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 54544
Web Inspector: show all inlined scripts from single document in the same source frame
https://bugs.webkit.org/show_bug.cgi?id=54544
Summary
Web Inspector: show all inlined scripts from single document in the same sour...
Pavel Podivilov
Reported
2011-02-16 03:47:59 PST
Web Inspector: show all inlined scripts from single document in the same source frame. Currently when debugging synchronously executed inlined scripts each script is shown in it's own source frame ("example.html:24"). We should show such scripts in the same source frame "example.html" with <script></script> framing.
Attachments
Patch.
(16.26 KB, patch)
2011-02-16 03:49 PST
,
Pavel Podivilov
yurys
: review-
Details
Formatted Diff
Diff
Patch.
(26.46 KB, patch)
2011-02-16 07:32 PST
,
Pavel Podivilov
no flags
Details
Formatted Diff
Diff
Patch.
(26.47 KB, patch)
2011-02-16 07:47 PST
,
Pavel Podivilov
yurys
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Podivilov
Comment 1
2011-02-16 03:49:58 PST
Created
attachment 82611
[details]
Patch.
Yury Semikhatsky
Comment 2
2011-02-16 04:37:33 PST
Comment on
attachment 82611
[details]
Patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=82611&action=review
> Source/WebCore/inspector/front-end/ScriptsPanel.js:264 > + var sourceName = script.sourceURL || script.sourceID;
You are passing sourceID while _recreateSourceFrame uses it for lookup in _urlToSource... These two types of ids shouldn't be mixed.
> Source/WebCore/inspector/front-end/ScriptsPanel.js:531 > + var isScript = !script.lineOffset && !script.columnOffset;
Will this code work correctly with JSC when columnOffset is always 0 and lineOffset may well be 0 for inline script.
> Source/WebCore/inspector/front-end/ScriptsPanel.js:1080 > + var lineNumber = 0, columnNumber = 0;
Each statement should go on a separate line.
Pavel Podivilov
Comment 3
2011-02-16 07:32:47 PST
Created
attachment 82634
[details]
Patch.
Pavel Podivilov
Comment 4
2011-02-16 07:41:25 PST
(In reply to
comment #2
)
> (From update of
attachment 82611
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=82611&action=review
> > > Source/WebCore/inspector/front-end/ScriptsPanel.js:264 > > + var sourceName = script.sourceURL || script.sourceID; > > You are passing sourceID while _recreateSourceFrame uses it for lookup in _urlToSource... These two types of ids shouldn't be mixed. >
sourceID is used as source name for scripts without sourceURL. This is private implementation detail of ScriptsPanel, and it considerably simplifies source frames management. Renamed _urlToSourceFrame to _sourceNameToSourceFrame to avoid confusion.
> > Source/WebCore/inspector/front-end/ScriptsPanel.js:531 > > + var isScript = !script.lineOffset && !script.columnOffset; > > Will this code work correctly with JSC when columnOffset is always 0 and lineOffset may well be 0 for inline script.
JSC provides correct columnOffset, as ensured by inspector/debugger/debugger-scripts.html test.
> > > Source/WebCore/inspector/front-end/ScriptsPanel.js:1080 > > + var lineNumber = 0, columnNumber = 0; > > Each statement should go on a separate line.
Could you please clarify? The idea was to build source frame content with script tags at the same locations as in actual resource. Please check debug-inlined-scripts test expectations for example.
Pavel Podivilov
Comment 5
2011-02-16 07:47:29 PST
Created
attachment 82635
[details]
Patch.
Pavel Podivilov
Comment 6
2011-02-16 07:47:57 PST
> Each statement should go on a separate line.
Done.
Ilya Tikhonovsky
Comment 7
2011-02-16 09:50:00 PST
View in context:
https://bugs.webkit.org/attachment.cgi?id=82635&action=review
> Source/WebCore/inspector/front-end/ScriptsPanel.js:429 > + this._sourceNameToFilesSelectOption = {};
Why you create another mapping from sourceName to something instead of a single map with complex objects.
Pavel Podivilov
Comment 8
2011-02-16 11:08:48 PST
(In reply to
comment #7
)
> View in context:
https://bugs.webkit.org/attachment.cgi?id=82635&action=review
> > > Source/WebCore/inspector/front-end/ScriptsPanel.js:429 > > + this._sourceNameToFilesSelectOption = {}; > > Why you create another mapping from sourceName to something instead of a single map with complex objects.
I don't see any benefits in merging these mappings together. They are never modified together, so the code is cleaner when mappings are separated.
Pavel Podivilov
Comment 9
2011-02-17 04:08:46 PST
Committed
r78808
: <
http://trac.webkit.org/changeset/78808
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug