Bug 195170 - Web Inspector: Debugger: DOM, URL, and Event breakpoints don't grey out when all breakpoints are disabled
Summary: Web Inspector: Debugger: DOM, URL, and Event breakpoints don't grey out when ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks: 195248
  Show dependency treegraph
 
Reported: 2019-02-28 10:08 PST by Devin Rousso
Modified: 2019-03-02 14:40 PST (History)
5 users (show)

See Also:


Attachments
Patch (27.33 KB, patch)
2019-02-28 11:29 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (28.04 KB, patch)
2019-03-02 12:25 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (32.33 KB, patch)
2019-03-02 13:08 PST, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2019-02-28 10:08:26 PST
# STEPS TO REPRODUCE
1. inspect any page
2. create an event breakpoint for any event
3. disable all breakpoints
 => the event breakpoint icon is still blue, when all "regular" breakpoints turn grey
Comment 1 Radar WebKit Bug Importer 2019-02-28 10:09:47 PST
<rdar://problem/48478193>
Comment 2 Devin Rousso 2019-02-28 11:29:38 PST
Created attachment 363240 [details]
Patch
Comment 3 Joseph Pecoraro 2019-03-02 01:23:50 PST
Comment on attachment 363240 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/Controllers/DOMDebuggerManager.js:63
> +                this.addDOMBreakpoint(WI.DOMBreakpoint.fromPayload(payload));

Typically we use `fromPayload` when something is coming from a protocol object. That isn't happening here.

This is the opposite of `breakpoint.serializableInfo` so how about calling these `FooBreakpoint.deserialize(...)` of `fromCookie` or `fromStorage`?

We have a similar naming convention (deserialize) for objects we serialize to/form Workers.
Comment 4 Devin Rousso 2019-03-02 12:24:16 PST
Comment on attachment 363240 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/Controllers/DOMDebuggerManager.js:63
>> +                this.addDOMBreakpoint(WI.DOMBreakpoint.fromPayload(payload));
> 
> Typically we use `fromPayload` when something is coming from a protocol object. That isn't happening here.
> 
> This is the opposite of `breakpoint.serializableInfo` so how about calling these `FooBreakpoint.deserialize(...)` of `fromCookie` or `fromStorage`?
> 
> We have a similar naming convention (deserialize) for objects we serialize to/form Workers.

Interesting.  I viewed the distinction as `serialize` was for worker-proxy data passing while `fromPayload` was for "construct this type from an object" (the model objects for audits/recordings use `fromPayload` to load from imports/cache, not just backend data).  Personally, I'd prefer to have a single channel that goes from an object to a constructor, as we can always provide customization in the form of additional parameters, but for the sake of consistency I'll change this to `deserialize`.
Comment 5 Devin Rousso 2019-03-02 12:25:05 PST
Created attachment 363427 [details]
Patch
Comment 6 Devin Rousso 2019-03-02 13:08:19 PST
Created attachment 363428 [details]
Patch
Comment 7 WebKit Commit Bot 2019-03-02 13:16:13 PST
The commit-queue encountered the following flaky tests while processing attachment 363427 [details]:

media/modern-media-controls/placard-support/placard-support-pip.html bug 195249 (author: graouts@apple.com)
The commit-queue is continuing to process your patch.
Comment 8 WebKit Commit Bot 2019-03-02 14:40:49 PST
Comment on attachment 363428 [details]
Patch

Clearing flags on attachment: 363428

Committed r242318: <https://trac.webkit.org/changeset/242318>
Comment 9 WebKit Commit Bot 2019-03-02 14:40:50 PST
All reviewed patches have been landed.  Closing bug.