Bug 47542

Summary: Web Inspector: need a breakpoint for the timer events.
Product: WebKit Reporter: Ilya Tikhonovsky <loislo>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, podivilov, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch.
pfeldman: review-
[IMAGE] Unified breakpoints design mock.
none
Comments addressed. pfeldman: review+

Description Ilya Tikhonovsky 2010-10-12 05:48:30 PDT
%subj%
Comment 1 Pavel Podivilov 2010-10-13 05:16:31 PDT
Created attachment 70600 [details]
Patch.
Comment 2 Pavel Feldman 2010-10-13 05:47:02 PDT
Comment on attachment 70600 [details]
Patch.

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

> WebCore/inspector/InspectorInstrumentation.cpp:46
> +static const char* const timeoutEventName = "extended.timeout";

"timeout" is a bad name for the event. timerFire (localized "Timer fire" in UI) sounds more user-friendly.
Also, encoding extended event names using dot-separated strings is fragile: there is no guarantee event will not have similar name. So you should either create a pair here or be more creative about encoding the event names.

> WebCore/inspector/front-end/BreakpointManager.js:508
> +        if (this._eventName.search(prefix) !== 0)

Nit: use indexOf instead of regex search.

> WebCore/inspector/front-end/BreakpointsSidebarPane.js:251
> +            "HTML frame/object": ["load", "error", "resize", "scroll", "extended.timeout"]

I think you are adding confusion here: timeout is not a real event. I think we should we have a separate category for it. It might have all timer-related breaks such as setTimeout, clearTimeout and timerFire event.
Comment 3 Ilya Tikhonovsky 2010-10-13 06:13:20 PDT
> > WebCore/inspector/front-end/BreakpointsSidebarPane.js:251
> > +            "HTML frame/object": ["load", "error", "resize", "scroll", "extended.timeout"]
> 
> I think you are adding confusion here: timeout is not a real event. I think we should we have a separate category for it. It might have all timer-related breaks such as setTimeout, clearTimeout and timerFire event.

+1
Comment 4 Pavel Feldman 2010-10-13 07:18:41 PDT
Created attachment 70609 [details]
[IMAGE] Unified breakpoints design mock.
Comment 5 Ilya Tikhonovsky 2010-10-13 07:26:54 PDT
it'd be interesting to have separate checkboxes for tracking send request/receive response for xhr
The same idea for DOM modifications. Just have separate checkboxes for add/modify/delete.
Comment 6 Pavel Podivilov 2010-10-14 02:48:37 PDT
Created attachment 70721 [details]
Comments addressed.
Comment 7 Pavel Feldman 2010-10-14 03:09:52 PDT
Comment on attachment 70721 [details]
Comments addressed.

Please do not forget to land localizedStrings.
Comment 8 Pavel Podivilov 2010-10-18 05:11:15 PDT
Commited in http://trac.webkit.org/changeset/69760.