Bug 201670 - Web Inspector: Canvas: checkerboard has too much contrast in dark mode
Summary: Web Inspector: Canvas: checkerboard has too much contrast in dark mode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-10 18:14 PDT by Devin Rousso
Modified: 2019-09-11 19:32 PDT (History)
5 users (show)

See Also:


Attachments
[Image] Screenshot of Issue (599.47 KB, image/png)
2019-09-10 18:14 PDT, Devin Rousso
no flags Details
Patch (1.49 KB, patch)
2019-09-10 18:18 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
[Image] Screenshot of Issue (702.99 KB, image/png)
2019-09-10 18:19 PDT, Devin Rousso
no flags Details
[Image] After Patch is applied (702.58 KB, image/png)
2019-09-10 18:19 PDT, Devin Rousso
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2019-09-10 18:14:06 PDT
Created attachment 378522 [details]
[Image] Screenshot of Issue

.
Comment 1 Devin Rousso 2019-09-10 18:18:58 PDT
Created attachment 378525 [details]
Patch
Comment 2 Devin Rousso 2019-09-10 18:19:27 PDT
Created attachment 378526 [details]
[Image] Screenshot of Issue
Comment 3 Devin Rousso 2019-09-10 18:19:52 PDT
Created attachment 378527 [details]
[Image] After Patch is applied
Comment 4 Timothy Hatcher 2019-09-11 07:22:25 PDT
Comment on attachment 378525 [details]
Patch

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

> Source/WebInspectorUI/ChangeLog:10
> +        Don't force a `background-color: white;` in dark mode.

I think the right fix for this might be to keep forcing white and correct the checker color to be light, like in light mode. Most of the transparent content will be light mode content and might not look good over a dark mode checkerboard. We might need a dark mode toggle for the checkerboard.
Comment 5 Devin Rousso 2019-09-11 18:47:32 PDT
Comment on attachment 378525 [details]
Patch

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

>> Source/WebInspectorUI/ChangeLog:10
>> +        Don't force a `background-color: white;` in dark mode.
> 
> I think the right fix for this might be to keep forcing white and correct the checker color to be light, like in light mode. Most of the transparent content will be light mode content and might not look good over a dark mode checkerboard. We might need a dark mode toggle for the checkerboard.

In addition to "highlighting" transparency, the checkerboard also provides a rough idea of what the content would look like when contrasted with a light/dark background.  I don't think we want to show a light checkerboard in dark mode, as that may make it harder for developers to see the content of the canvas, especially if it was drawn for a darker background (e.g. the content is a white blob, which would contrast just fine against the page's darker background, but wouldn't be visible against a white checkerboard).

Also, it's really annoying to be in dark mode and then suddenly see some bright white content :(

Given all of this, it does make sense for us to provide some sort of toggle/setting for the checkerboard that is independent of the current color scheme.
Comment 6 WebKit Commit Bot 2019-09-11 19:31:13 PDT
Comment on attachment 378525 [details]
Patch

Clearing flags on attachment: 378525

Committed r249790: <https://trac.webkit.org/changeset/249790>
Comment 7 WebKit Commit Bot 2019-09-11 19:31:15 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-09-11 19:32:19 PDT
<rdar://problem/55287372>
Comment 9 Radar WebKit Bug Importer 2019-09-11 19:32:19 PDT
<rdar://problem/55287373>