Bug 50813 - Web Inspector: creating conditional breakpoint doesn't work if breakpoint moves
Summary: Web Inspector: creating conditional breakpoint doesn't work if breakpoint moves
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: 2010-12-10 06:40 PST by Pavel Podivilov
Modified: 2010-12-20 08:45 PST (History)
10 users (show)

See Also:


Attachments
Patch. (10.53 KB, patch)
2010-12-10 06:41 PST, 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 2010-12-10 06:40:26 PST
1. Right click on a script line with comment.
2. Choose "Add Conditional Breakpoint".
3. Breakpoint is moved but condition popup doesn't, breakpoint is created without condition.
Comment 1 Pavel Podivilov 2010-12-10 06:41:12 PST
Created attachment 76188 [details]
Patch.
Comment 2 Yury Semikhatsky 2010-12-20 05:38:14 PST
Comment on attachment 76188 [details]
Patch.

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

> WebCore/inspector/front-end/SourceFrame.js:452
> +        lineNumber -= 1;

Why do you need this? It should be extracted into a method with descriptive name.
Comment 3 Pavel Podivilov 2010-12-20 08:44:27 PST
(In reply to comment #2)
> (From update of attachment 76188 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=76188&action=review
> 
> > WebCore/inspector/front-end/SourceFrame.js:452
> > +        lineNumber -= 1;
> 
> Why do you need this? It should be extracted into a method with descriptive name.

This is because we use zero-based line numbers in text viewer. We may add addDecoration/removeDecoration methods to SourceFrame and extract it there.
Comment 4 Pavel Podivilov 2010-12-20 08:45:09 PST
Committed r74350: <http://trac.webkit.org/changeset/74350>