Bug 198299

Summary: Web Inspector: Timelines: spacing around pie chart is different between CPU and Memory
Product: WebKit Reporter: Devin Rousso <drousso>
Component: Web InspectorAssignee: Devin Rousso <drousso>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, drousso, inspector-bugzilla-changes, mattbaker, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[Image] Screenshot of Issue (CPU)
none
[Image] Screenshot of Issue (Memory)
none
Patch
none
Patch none

Description Devin Rousso 2019-05-28 10:04:36 PDT
See atta
Comment 1 Devin Rousso 2019-05-28 10:05:15 PDT
Created attachment 370755 [details]
[Image] Screenshot of Issue (CPU)
Comment 2 Devin Rousso 2019-05-28 10:05:37 PDT
Created attachment 370756 [details]
[Image] Screenshot of Issue (Memory)
Comment 3 Devin Rousso 2019-05-28 10:41:24 PDT
Created attachment 370764 [details]
Patch
Comment 4 Matt Baker 2019-05-28 16:03:49 PDT
Comment on attachment 370764 [details]
Patch

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

r=me with nits

> Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.css:97
> +

Unnecessary churn. Was this moved on purpose?

> Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js:57
> +        case CPUTimelineView.SampleType.JavaScript:

Missing namespace prefix `WI`.

> Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js:214
> +        this._breakdownLegendScriptElement = appendLegendRow(this._breakdownLegendElement, CPUTimelineView.SampleType.JavaScript);

Missing namespace prefix `WI`.

> Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.css:67
> +    border-bottom: 1px solid var(--border-color);

More churn.
Comment 5 Devin Rousso 2019-05-28 16:14:05 PDT
Comment on attachment 370764 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.css:97
>> +
> 
> Unnecessary churn. Was this moved on purpose?

I mention the reason for this in the ChangeLog.  Although it's "unnecessary", I found it to be an annoyance when first investigating this issue as I had to search around through the file to find the right rule, as it wasn't where I'd expected it to be.

>> Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js:57
>> +        case CPUTimelineView.SampleType.JavaScript:
> 
> Missing namespace prefix `WI`.

Joe and I have started doing this, but we each have different reasons for it.  Either way, the `WI` is not necessary in these cases since they're used within the class object, and the "enum" is defined on that same class object.

Joe's reason is to provide "testing" for this "somewhat obscure" part of JSC.

My reason is that if we ever decide to move to using modules, this would reduce code churn, as we'd likely drop (or change) the `WI` namespace, as it's probably not as useful with modules.
Comment 6 WebKit Commit Bot 2019-05-28 16:15:02 PDT Comment hidden (obsolete)
Comment 7 Devin Rousso 2019-05-28 16:33:52 PDT
Created attachment 370803 [details]
Patch
Comment 8 Matt Baker 2019-05-28 17:09:27 PDT
Comment on attachment 370764 [details]
Patch

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

>>> Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js:57
>>> +        case CPUTimelineView.SampleType.JavaScript:
>> 
>> Missing namespace prefix `WI`.
> 
> Joe and I have started doing this, but we each have different reasons for it.  Either way, the `WI` is not necessary in these cases since they're used within the class object, and the "enum" is defined on that same class object.
> 
> Joe's reason is to provide "testing" for this "somewhat obscure" part of JSC.
> 
> My reason is that if we ever decide to move to using modules, this would reduce code churn, as we'd likely drop (or change) the `WI` namespace, as it's probably not as useful with modules.

Cool, both are good reasons.
Comment 9 WebKit Commit Bot 2019-05-28 17:14:41 PDT
Comment on attachment 370803 [details]
Patch

Clearing flags on attachment: 370803

Committed r245833: <https://trac.webkit.org/changeset/245833>
Comment 10 WebKit Commit Bot 2019-05-28 17:14:42 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2019-05-28 17:15:35 PDT
<rdar://problem/51202216>