Bug 218003

Summary: Web Inspector: Inspect element icon looks blurry on non-retina (1x) screen
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Radar WebKit Bug Importer <webkit-bug-importer>
Status: NEW ---    
Severity: Normal CC: ews-watchlist, fbucchi, hi, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: GoodFirstBug, InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Web Inspector: Fix Crosshair svg blurry for 1x non-retina screens
none
Web Inspector: Fix Crosshair svg blurry for 1x non-retina screens
none
3 screens for comparison: 1x with current issue, 1x with fix and retina with no issue
none
[Image] clipping issue after Patch is applied
none
Web Inspector: Fix Crosshair svg blurry for 1x non-retina screens
none
Fix blurry Inspect Icon on non-retina (1x) screen
fbucchi: review?
Screenshots of bug resolution
none
Screenshot of confirmation that nothing changed for retina displays after change for 1x none

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