Bug 50813

Summary: Web Inspector: creating conditional breakpoint doesn't work if breakpoint moves
Product: WebKit Reporter: Pavel Podivilov <podivilov>
Component: Web Inspector (Deprecated)Assignee: Pavel Podivilov <podivilov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch. yurys: review+

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>