Bug 191553

Summary: Web Inspector: Canvas: don't start with auto-capture enabled
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hi, inspector-bugzilla-changes, mattbaker, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on: 190856    
Bug Blocks: 173807, 175485    
Attachments:
Description Flags
Patch
none
Patch none

Description Devin Rousso 2018-11-12 10:45:53 PST
If the user has previously turned off auto-capture but still had a non-zero frame count, opening the Canvas tab shouldn't re-enable auto-capture.
Comment 1 Devin Rousso 2018-11-12 10:48:27 PST
Created attachment 354569 [details]
Patch
Comment 2 Matt Baker 2018-11-12 11:55:35 PST
Comment on attachment 354569 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js:226
>              this._recordingAutoCaptureFrameCountInputElement.style.setProperty("width", (textMetrics.width + 8) + "px");

Out of curiosity, where does the 8px come from? It looks like it comes from canvasOverviewContentView.css:184:

.navigation-bar > .item.canvas-recording-auto-capture > label > input {
    width: 1.5em;
    min-width: 1.5em;
    margin: 0 4px;
    text-align: center;
}

If so this should be a const, with a comment warning to keep it in sync with the stylesheet. I know this is off topic for this patch, but I noticed it while reading the file for context.
Comment 3 Devin Rousso 2018-11-14 03:23:13 PST
Created attachment 354791 [details]
Patch
Comment 4 WebKit Commit Bot 2018-11-14 04:01:39 PST
Comment on attachment 354791 [details]
Patch

Clearing flags on attachment: 354791

Committed r238169: <https://trac.webkit.org/changeset/238169>
Comment 5 WebKit Commit Bot 2018-11-14 04:01:40 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-11-14 04:02:37 PST
<rdar://problem/46059298>