Bug 55823

Summary: Web Inspector: re-implement breakpoints sidebar pane based on debugger presentation model.
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.
pfeldman: review-
Patch.
pfeldman: review-
Patch. pfeldman: review+

Description Pavel Podivilov 2011-03-05 06:46:32 PST
Web Inspector: re-implement breakpoints sidebar pane as a simple ui component.

The code would be cleaner if scripts panel is the only debugger model's client.
Comment 1 Pavel Podivilov 2011-03-05 06:47:21 PST
Created attachment 84863 [details]
Patch.
Comment 2 Pavel Feldman 2011-03-06 10:50:26 PST
Comment on attachment 84863 [details]
Patch.

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

> Source/WebCore/inspector/front-end/ScriptsPanel.js:1056
> +    _javaScriptBreakpointsSidebarPaneBreakpointClicked: function(event)

I think the code would be much cleaner if you had a Breakpoint class with corresponding methods on it. Did you consider this option? It would also result it way less changes.
Comment 3 Pavel Podivilov 2011-03-09 04:42:23 PST
Created attachment 85159 [details]
Patch.
Comment 4 Pavel Podivilov 2011-03-09 04:56:53 PST
(In reply to comment #2)
> (From update of attachment 84863 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=84863&action=review
> 
> > Source/WebCore/inspector/front-end/ScriptsPanel.js:1056
> > +    _javaScriptBreakpointsSidebarPaneBreakpointClicked: function(event)
> 
> I think the code would be much cleaner if you had a Breakpoint class with corresponding methods on it. Did you consider this option? It would also result it way less changes.

Moved event handlers back to JavaScriptBreakpointsSidebarPane class.
I don't think Breakpoint class would make the code any cleaner, it just shadows the dependencies.
Comment 5 Pavel Feldman 2011-03-09 05:12:13 PST
Comment on attachment 85159 [details]
Patch.

Could you please explain why are you doing this refactoring? Bug title says: "re-implement breakpoints sidebar pane as a simple ui component", but I see this._model being introduced in the sidebar section class. I.e. the opposite is happening. I am fine with having model in the sidebar, but I am confused wrt what exactly is happening and why.
Comment 6 Pavel Podivilov 2011-03-09 06:25:29 PST
Created attachment 85169 [details]
Patch.
Comment 7 Pavel Podivilov 2011-03-09 06:26:06 PST
(In reply to comment #5)
> (From update of attachment 85159 [details])
> Could you please explain why are you doing this refactoring? Bug title says: "re-implement breakpoints sidebar pane as a simple ui component", but I see this._model being introduced in the sidebar section class. I.e. the opposite is happening. I am fine with having model in the sidebar, but I am confused wrt what exactly is happening and why.

Sorry about that, forgot to update the title.
Comment 8 Pavel Podivilov 2011-03-09 06:27:14 PST
*** Bug 55822 has been marked as a duplicate of this bug. ***
Comment 9 Pavel Podivilov 2011-03-10 04:26:55 PST
Committed r80705: <http://trac.webkit.org/changeset/80705>