Bug 127258 - Web Inspector: Generate better display names for timer and event Timeline records
Summary: Web Inspector: Generate better display names for timer and event Timeline rec...
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: Timothy Hatcher
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-01-19 14:48 PST by Timothy Hatcher
Modified: 2014-01-20 19:05 PST (History)
4 users (show)

See Also:


Attachments
Patch (26.88 KB, patch)
2014-01-19 14:56 PST, Timothy Hatcher
joepeck: review+
timothy: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2014-01-19 14:48:53 PST
The event record should say what event it was. And the timer record should optionally say what the timer identifier was.
Comment 1 Radar WebKit Bug Importer 2014-01-19 14:49:02 PST
<rdar://problem/15855340>
Comment 2 Timothy Hatcher 2014-01-19 14:56:41 PST
Created attachment 221597 [details]
Patch
Comment 3 Joseph Pecoraro 2014-01-20 13:09:27 PST
Comment on attachment 221597 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/ScriptTimelineRecord.js:61
> +    if (details && !WebInspector.ScriptTimelineRecord._eventDisplayNames) {
> +        // These display names are not localized because they closely represent
> +        // the real API name, just with word spaces and Title Case.
> +
> +        var nameMap = new Map;
> +        nameMap.set("DOMActivate", "DOM Activate");
> +        nameMap.set("DOMCharacterDataModified", "DOM Character Data Modified");
> +        nameMap.set("DOMContentLoaded", "DOM Content Loaded");
> +        nameMap.set("DOMFocusIn", "DOM Focus In");
> +        nameMap.set("DOMFocusOut", "DOM Focus Out");

I wonder if a static object literal would be faster, or if this is negligible.

I think I'm actually in favor of seeing the actual event name. For example if I want to filter for a "beforecopy" event, I'll type that; not "Before Copy". So I could end up errantly not finding a record?

> Source/WebInspectorUI/UserInterface/ScriptTimelineRecord.js:178
> +        nameMap.set("webkitcurrentplaybacktargetiswirelesschanged", "Current Playback Target Is Wireless Changed");

My claim to fame.

> Source/WebInspectorUI/UserInterface/ScriptTimelineView.js:-46
> -    columns.details.title = WebInspector.UIString("Details");
> -    columns.details.width = "15%";
> -

Should we prefer this 15% be spread out to the others in some way? Give more to location?
Comment 4 Timothy Hatcher 2014-01-20 19:05:33 PST
https://trac.webkit.org/changeset/162420