| Summary: | Web Inspector: Move the Popover code out of the Breakpoint model object | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Timothy Hatcher <timothy> | ||||||||
| Component: | Web Inspector | Assignee: | Matt Baker <mattbaker> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | commit-queue, joepeck, mattbaker, timothy, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Timothy Hatcher
2014-01-20 18:42:56 PST
The context menu code should move too. Created attachment 260275 [details]
[Patch] Proposed Fix
Comment on attachment 260275 [details] [Patch] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=260275&action=review Better, but I think this needs to be a controller that owns the Popover. > Source/WebInspectorUI/UserInterface/Views/BreakpointPopoverView.js:117 > + let popover = new WebInspector.Popover(); > + let popoverView = new WebInspector.BreakpointPopoverView(breakpoint, popover); > + popover.delegate = popoverView; > + popover.content = popoverView.element; It is a bit odd that BreakpointPopoverView takes the popover and then popover.content and popover.delegate end up pointing to popoverView. That makes BreakpointPopoverView more of a controller. That would likely let you internalize this. > Source/WebInspectorUI/UserInterface/Views/BreakpointPopoverView.js:297 > +WebInspector.BreakpointPopoverView.PopoverClassName = "edit-breakpoint-popover-content"; Any single use class names we have just been inlining them as strings. (In reply to comment #4) > Comment on attachment 260275 [details] > [Patch] Proposed Fix > > View in context: > https://bugs.webkit.org/attachment.cgi?id=260275&action=review > > Better, but I think this needs to be a controller that owns the Popover. > > > Source/WebInspectorUI/UserInterface/Views/BreakpointPopoverView.js:117 > > + let popover = new WebInspector.Popover(); > > + let popoverView = new WebInspector.BreakpointPopoverView(breakpoint, popover); > > + popover.delegate = popoverView; > > + popover.content = popoverView.element; > > It is a bit odd that BreakpointPopoverView takes the popover and then > popover.content and popover.delegate end up pointing to popoverView. > > That makes BreakpointPopoverView more of a controller. That would likely let > you internalize this. Yeah this is pretty awkward. A controller class is better suited to this. Created attachment 260317 [details]
[Patch] Proposed Fix
Comment on attachment 260317 [details] [Patch] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=260317&action=review Nice! > Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js:50 > + this._breakpointPopoverController = new WebInspector.BreakpointPopoverController(); Drop the (). Created attachment 260322 [details]
[Patch] Proposed Fix
Comment on attachment 260322 [details] [Patch] Proposed Fix Clearing flags on attachment: 260322 Committed r189189: <http://trac.webkit.org/changeset/189189> All reviewed patches have been landed. Closing bug. |