Bug 191553 - Web Inspector: Canvas: don't start with auto-capture enabled
Summary: Web Inspector: Canvas: don't start with auto-capture enabled
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
Keywords: InRadar
Depends on: 190856
Blocks: WebInspectorCanvasRecording WebInspectorCanvasTab
  Show dependency treegraph
Reported: 2018-11-12 10:45 PST by Devin Rousso
Modified: 2018-12-05 21:32 PST (History)
5 users (show)

See Also:

Patch (1.78 KB, patch)
2018-11-12 10:48 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (4.18 KB, patch)
2018-11-14 03:23 PST, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
Comment 2 Matt Baker 2018-11-12 11:55:35 PST
Comment on attachment 354569 [details]

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


> 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]
Comment 4 WebKit Commit Bot 2018-11-14 04:01:39 PST
Comment on attachment 354791 [details]

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