Bug 62282 - Web Inspector: script links are displayed with original line number in pretty-print mode.
Summary: Web Inspector: script links are displayed with original line number in pretty...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Podivilov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-08 07:59 PDT by Pavel Podivilov
Modified: 2011-06-16 02:54 PDT (History)
10 users (show)

See Also:


Attachments
Patch. (10.23 KB, patch)
2011-06-08 08:00 PDT, Pavel Podivilov
no flags Details | Formatted Diff | Diff
Patch. (10.98 KB, patch)
2011-06-09 02:04 PDT, Pavel Podivilov
eric: review-
Details | Formatted Diff | Diff
Added test. (13.83 KB, patch)
2011-06-15 03:32 PDT, Pavel Podivilov
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Podivilov 2011-06-08 07:59:06 PDT
Web Inspector: script links are displayed with original line number in pretty-print mode.
Comment 1 Pavel Podivilov 2011-06-08 08:00:25 PDT
Created attachment 96422 [details]
Patch.
Comment 2 Yury Semikhatsky 2011-06-08 08:31:01 PDT
Comment on attachment 96422 [details]
Patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=96422&action=review

> Source/WebCore/inspector/front-end/Panel.js:394
> +        linkText += ":" + (lineNumber + 1);

Common panel code shouldn't contain lineNumber arithmetic.

> Source/WebCore/inspector/front-end/inspector.js:1280
> +    var node = this.panels[preferredPanel].createAnchor(url, lineNumber - 1, classes, tooltipText);

This method shouldn't modify lineNumber.
Comment 3 Yury Semikhatsky 2011-06-08 08:34:07 PDT
Comment on attachment 96422 [details]
Patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=96422&action=review

> Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:106
> +    {

Anchors may be removed so there should be corresponding method that would remove them from _anchors here.
Comment 4 Pavel Podivilov 2011-06-09 02:04:15 PDT
(In reply to comment #2)
> (From update of attachment 96422 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=96422&action=review
> 
> > Source/WebCore/inspector/front-end/Panel.js:394
> > +        linkText += ":" + (lineNumber + 1);
> 
> Common panel code shouldn't contain lineNumber arithmetic.
> 
> > Source/WebCore/inspector/front-end/inspector.js:1280
> > +    var node = this.panels[preferredPanel].createAnchor(url, lineNumber - 1, classes, tooltipText);
> 
> This method shouldn't modify lineNumber.

Added fixme to make console call frame line/column numbers zero-based just like in debugger call frames.

> Anchors may be removed so there should be corresponding method that would remove them from _anchors here.

Anchors are cleared on navigation, so we may keep removed anchors in the list.
Comment 5 Pavel Podivilov 2011-06-09 02:04:30 PDT
Created attachment 96564 [details]
Patch.
Comment 6 Eric Seidel (no email) 2011-06-13 15:27:34 PDT
Comment on attachment 96564 [details]
Patch.

How do we test this?
Comment 7 Pavel Podivilov 2011-06-15 03:32:47 PDT
Created attachment 97268 [details]
Added test.
Comment 8 Yury Semikhatsky 2011-06-15 03:59:29 PDT
Comment on attachment 97268 [details]
Added test.

View in context: https://bugs.webkit.org/attachment.cgi?id=97268&action=review

> Source/WebCore/inspector/front-end/inspector.js:1281
> +    // FIXME: stack trace line/column numbers are one-based.

Please file a bug on this.
Comment 9 Pavel Podivilov 2011-06-15 07:31:48 PDT
Committed r88927: <http://trac.webkit.org/changeset/88927>
Comment 10 Pavel Podivilov 2011-06-16 02:54:14 PDT
(In reply to comment #8)
> (From update of attachment 97268 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=97268&action=review
> 
> > Source/WebCore/inspector/front-end/inspector.js:1281
> > +    // FIXME: stack trace line/column numbers are one-based.
> 
> Please file a bug on this.

https://bugs.webkit.org/show_bug.cgi?id=62725.