Bug 142607 - Web Inspector: Debugger sidebar should group global breakpoints together
Summary: Web Inspector: Debugger sidebar should group global breakpoints together
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Jonathan Wells
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-03-11 19:06 PDT by Jonathan Wells
Modified: 2015-03-12 13:59 PDT (History)
7 users (show)

See Also:


Attachments
Patch (9.50 KB, patch)
2015-03-11 19:19 PDT, Jonathan Wells
no flags Details | Formatted Diff | Diff
Patch (10.04 KB, patch)
2015-03-12 12:17 PDT, Jonathan Wells
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Wells 2015-03-11 19:06:14 PDT
Global breakpoints such as "All Exceptions" and "All Uncaught Exceptions" should go together in a container at the top of the debugger sidebar.
Comment 1 Radar WebKit Bug Importer 2015-03-11 19:06:34 PDT
<rdar://problem/20131488>
Comment 2 Jonathan Wells 2015-03-11 19:19:42 PDT
Created attachment 248478 [details]
Patch
Comment 3 Timothy Hatcher 2015-03-12 08:24:10 PDT
Comment on attachment 248478 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Views/ContainerTreeElement.js:30
> +    WebInspector.FolderizedTreeElement.call(this, WebInspector.ContainerTreeElement.styleFromTypeMap.get(type), title, subtitle, null, hasChildren);

This should be FolderTreeElement not FolderizedTreeElement.

> Source/WebInspectorUI/UserInterface/Views/ContainerTreeElement.js:38
> +WebInspector.ContainerTreeElement.Type = {
> +    Global: "global"
> +};
> +
> +WebInspector.ContainerTreeElement.styleFromTypeMap = new Map();
> +WebInspector.ContainerTreeElement.styleFromTypeMap.set(WebInspector.ContainerTreeElement.Type.Global, "global-container");

You won't need these for FolderTreeElement.

> Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:152
> +WebInspector.DebuggerSidebarPanel.GlobalIconStyleClassName = "global-breakpoints-icon";

What icon is this? I don't see a CSS change to add this selector.
Comment 4 Jonathan Wells 2015-03-12 12:14:01 PDT
I decided to just get rid of ContainerTreeElement altogether. I think FolderTreeElement should be able to handle this fine, so I just adjusted it to take different classes. It would still benefit from a different icon maybe? Right now it is a folder. I also went ahead and expanded the folder.
Comment 5 Jonathan Wells 2015-03-12 12:17:17 PDT
Created attachment 248531 [details]
Patch
Comment 6 Timothy Hatcher 2015-03-12 13:09:25 PDT
Comment on attachment 248531 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Views/FolderTreeElement.js:28
> +    var classNames = (additionalClassNames && typeof additionalClassNames === "string" ? [additionalClassNames] : []);

Maybe additionalClassNames should be allowed to be an array too?
Comment 7 Jonathan Wells 2015-03-12 13:33:13 PDT
Committed r181452: <http://trac.webkit.org/changeset/181452>
Comment 8 Joseph Pecoraro 2015-03-12 13:59:25 PDT
Comment on attachment 248531 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:107
> +    this._globalBreakpointsFolderTreeElement = new WebInspector.FolderTreeElement(WebInspector.UIString("Global Breakpoints"), null, WebInspector.DebuggerSidebarPanel.GlobalIconStyleClassName);

If this folder is collapsed and a breakpoint inside it is enabled, should there be a UI indicating that?

I think it would be surprising if I paused because of an uncaught exception and couldn't find where to disable it.

(Fortunately if you Pause on a Breakpoint we should that breakpoint in the new pause reason section)