Bug 218003 - Web Inspector: Inspect element icon looks blurry on non-retina (1x) screen
Summary: Web Inspector: Inspect element icon looks blurry on non-retina (1x) screen
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Radar WebKit Bug Importer
URL:
Keywords: GoodFirstBug, InRadar
Depends on:
Blocks:
 
Reported: 2020-10-20 16:38 PDT by Nikita Vasilyev
Modified: 2020-11-11 22:37 PST (History)
5 users (show)

See Also:


Attachments
Web Inspector: Fix Crosshair svg blurry for 1x non-retina screens (1.97 KB, patch)
2020-11-04 16:53 PST, Federico Bucchi
no flags Details | Formatted Diff | Diff
Web Inspector: Fix Crosshair svg blurry for 1x non-retina screens (1.98 KB, patch)
2020-11-04 22:52 PST, Federico Bucchi
no flags Details | Formatted Diff | Diff
3 screens for comparison: 1x with current issue, 1x with fix and retina with no issue (6.35 KB, image/png)
2020-11-04 23:10 PST, Federico Bucchi
no flags Details
[Image] clipping issue after Patch is applied (6.39 KB, image/png)
2020-11-05 11:11 PST, Devin Rousso
no flags Details
Web Inspector: Fix Crosshair svg blurry for 1x non-retina screens (2.16 KB, patch)
2020-11-05 21:39 PST, Federico Bucchi
no flags Details | Formatted Diff | Diff
Fix blurry Inspect Icon on non-retina (1x) screen (1.43 KB, patch)
2020-11-11 22:34 PST, Federico Bucchi
fbucchi: review?
Details | Formatted Diff | Diff
Screenshots of bug resolution (2.82 KB, image/png)
2020-11-11 22:36 PST, Federico Bucchi
no flags Details
Screenshot of confirmation that nothing changed for retina displays after change for 1x (5.91 KB, image/png)
2020-11-11 22:37 PST, Federico Bucchi
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2020-10-20 16:38:14 PDT
https://twitter.com/fvsch/status/1318683422555017219
Comment 1 Radar WebKit Bug Importer 2020-10-27 16:39:17 PDT
<rdar://problem/70744157>
Comment 2 Federico Bucchi 2020-11-04 16:53:43 PST
Created attachment 413226 [details]
Web Inspector: Fix Crosshair svg blurry for 1x non-retina screens
Comment 3 Devin Rousso 2020-11-04 17:44:40 PST
Comment on attachment 413226 [details]
Web Inspector: Fix Crosshair svg blurry for 1x non-retina screens

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

> Source/WebInspectorUI/UserInterface/Images/Crosshair.svg:4
> +    <g transform="translate(0.5 0.5)">

We try to avoid using `<g>` and `transform` wherever possible to keep things flat and clean.  This is how we do it for all other glyphs.

Rather than have a `translate` here, please add `0.5` to the necessary coordinates within this.
Comment 4 Devin Rousso 2020-11-04 17:48:06 PST
Also, can you upload screenshots comparing before and after?  I want to make sure this doesn't negatively affect retina displays.
Comment 5 Federico Bucchi 2020-11-04 22:52:51 PST
Created attachment 413252 [details]
Web Inspector: Fix Crosshair svg blurry for 1x non-retina screens
Comment 6 Federico Bucchi 2020-11-04 23:10:03 PST
Created attachment 413253 [details]
3 screens for comparison: 1x with current issue, 1x with fix and retina with no issue
Comment 7 Devin Rousso 2020-11-05 11:11:29 PST
Created attachment 413327 [details]
[Image] clipping issue after Patch is applied
Comment 8 Devin Rousso 2020-11-05 11:11:45 PST
Comment on attachment 413252 [details]
Web Inspector: Fix Crosshair svg blurry for 1x non-retina screens

r-, I tried applying this myself and adding the 0.5 causes the icon to shift on my retina display and partially clip on the right and bottom (see attachment 413327 [details])
Comment 9 Federico Bucchi 2020-11-05 21:39:43 PST
Created attachment 413401 [details]
Web Inspector: Fix Crosshair svg blurry for 1x non-retina screens
Comment 10 Devin Rousso 2020-11-10 12:06:17 PST
Comment on attachment 413401 [details]
Web Inspector: Fix Crosshair svg blurry for 1x non-retina screens

r- as this still has the same clipping issue

Perhaps try moving the `@media (-webkit-min-device-pixel-ratio: 2)` to `Main.css` with something like
```
    @media (-webkit-max-device-pixel-ratio: 1) {
        .tab-bar .navigation-bar .item.inspect {
            // something goes here
        }
    }
```
Comment 11 Federico Bucchi 2020-11-11 22:34:19 PST
Created attachment 413911 [details]
Fix blurry Inspect Icon on non-retina (1x) screen
Comment 12 Federico Bucchi 2020-11-11 22:36:57 PST
Created attachment 413912 [details]
Screenshots of bug resolution
Comment 13 Federico Bucchi 2020-11-11 22:37:46 PST
Created attachment 413913 [details]
Screenshot of confirmation that nothing changed for retina displays after change for 1x