Bug 169702 - Web Inspector: Refactoring: create parallel Breakpoint/BreakpointTreeElement class hierarchies
Summary: Web Inspector: Refactoring: create parallel Breakpoint/BreakpointTreeElement ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Matt Baker
URL:
Keywords:
Depends on: 169697
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-15 15:27 PDT by Matt Baker
Modified: 2017-03-15 15:28 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Baker 2017-03-15 15:27:13 PDT
Due to the recent proliferation of breakpoint types (Script, DOM, XHR) and associated tree elements, it makes sense to refactor these class hierarchies to reduce code duplication. This will also make it easier to reason about breakpoints in the UI.

Breakpoint, DOMBreakpoint, and XHRBreakpoint should inherit from a common base, providing common enabled/resolved behavior. We have two options for naming the new base class:

1) GenericBreakpoint
2) Breakpoint (the existing Breakpoint class would become ScriptBreakpoint)

The second options feels more correct, since "breakpoint" is now a concept shared by multiple entities. However, it would require lots of renaming so we might want to stick with the first option.

BreakpointTreeElement, DOMTreeElement, and XHRBreakpointTreeElement should inherit from a common base, providing styles ("breakpoint", "breakpoint-generic-line-icon", etc) and common DOM/behavior such as the status button. The base class name should match the breakpoint class hierarchy.