Bug 47542 - Web Inspector: need a breakpoint for the timer events.
Summary: Web Inspector: need a breakpoint for the timer events.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-12 05:48 PDT by Ilya Tikhonovsky
Modified: 2010-10-18 05:11 PDT (History)
11 users (show)

See Also:


Attachments
Patch. (9.85 KB, patch)
2010-10-13 05:16 PDT, Pavel Podivilov
pfeldman: review-
Details | Formatted Diff | Diff
[IMAGE] Unified breakpoints design mock. (103.17 KB, image/png)
2010-10-13 07:18 PDT, Pavel Feldman
no flags Details
Comments addressed. (13.09 KB, patch)
2010-10-14 02:48 PDT, Pavel Podivilov
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.