Bug 225060

Summary: Web Inspector: CSS Grid - measure usage of grid overlay options
Product: WebKit Reporter: Razvan Caliman <rcaliman>
Component: Web InspectorAssignee: Razvan Caliman <rcaliman>
Severity: Normal CC: bburg, ews-watchlist, hi, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 233298    
Description Flags
Patch none

Description Razvan Caliman 2021-04-26 10:35:47 PDT
Comment 1 Razvan Caliman 2021-04-26 11:45:16 PDT
Created attachment 427072 [details]
Comment 2 BJ Burg 2021-04-27 13:57:05 PDT
Comment on attachment 427072 [details]

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

r=me, nice work!

> Source/WebInspectorUI/UserInterface/Controllers/GridOverlayConfigurationDiagnosticEventRecorder.js:50
> +        window.addEventListener("focus", this, options);

Eventually we should consolidate our various places in the code that listen for user interaction and have a class manage it. For now, it is fine to continue in this direction until we encounter perf / user input lag.

> Source/WebInspectorUI/UserInterface/Controllers/GridOverlayConfigurationDiagnosticEventRecorder.js:118
> +        if (this._eventSamplingTimerIdentifier) {

Nit: call _stopEventSamplingTimer() rather than duplicating.

> Source/WebInspectorUI/UserInterface/Controllers/GridOverlayConfigurationDiagnosticEventRecorder.js:123
> +        this._eventSamplingTimerIdentifier = setTimeout(this._sampleCurrentOverlayConfiguration.bind(this), GridOverlayConfigurationDiagnosticEventRecorder.eventSamplingInterval);

Nit: WI.GridOverlayConfigurationDiagnosticEventRecorder

> Source/WebInspectorUI/UserInterface/Controllers/GridOverlayConfigurationDiagnosticEventRecorder.js:126
> +    _stopEventSamplingTimer()

Nit: _stopEventSamplingTimerIfNeeded

> Source/WebInspectorUI/UserInterface/Controllers/GridOverlayConfigurationDiagnosticEventRecorder.js:142
> +            if (WI.settings.debugAutoLogDiagnosticEvents.valueRespectingDebugUIAvailability)


> Source/WebInspectorUI/UserInterface/Controllers/GridOverlayConfigurationDiagnosticEventRecorder.js:155
> +        // Encode the configuration of overaly options as a sum of increasing powers of 10 for each overlay option that is enabled (zero if disabled), convert to string and pad with zero if necessary.

Nit: overlay
Comment 3 Razvan Caliman 2021-04-28 06:43:09 PDT
Created attachment 427256 [details]

Carry over R+; Address code review comments
Comment 4 EWS 2021-04-28 08:36:22 PDT
Committed r276714 (237118@main): <https://commits.webkit.org/237118@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 427256 [details].