Bug 145383 - Web Inspector: focus outline of a search field should have a radius
Summary: Web Inspector: focus outline of a search field should have a radius
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-05-26 12:51 PDT by Nikita Vasilyev
Modified: 2015-05-26 14:49 PDT (History)
8 users (show)

See Also:


Attachments
Animated GIF of the problem (8.27 KB, image/gif)
2015-05-26 12:51 PDT, Nikita Vasilyev
no flags Details
[Image] Native input has rounded outline (7.84 KB, image/gif)
2015-05-26 13:01 PDT, Nikita Vasilyev
no flags Details
Patch (1.97 KB, patch)
2015-05-26 13:45 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff
[Animated GIF] With the patch applied (51.06 KB, image/gif)
2015-05-26 13:51 PDT, Nikita Vasilyev
no flags Details
[Image] Native outline radius (8.23 KB, image/png)
2015-05-26 14:42 PDT, Nikita Vasilyev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2015-05-26 12:51:48 PDT
Created attachment 253719 [details]
Animated GIF of the problem

https://bugs.webkit.org/show_bug.cgi?id=20807 would solve our problem, but I don’t see any progress there.
Comment 1 Radar WebKit Bug Importer 2015-05-26 12:52:04 PDT
<rdar://problem/21109008>
Comment 2 Nikita Vasilyev 2015-05-26 13:01:35 PDT
Created attachment 253721 [details]
[Image] Native input has rounded outline

There are at least two ways of fixing this:

1. Use native <input type=search> as it does have a rounded outline.

Unfortunately, changing it’s hight via CSS isn't possible with the hight property – only with font-size. Also, we can’t change border colors.
Comment 3 Nikita Vasilyev 2015-05-26 13:35:41 PDT
2. Use box-shadow and make it look like outline. http://stackoverflow.com/a/14896315/16185
Comment 4 Nikita Vasilyev 2015-05-26 13:45:12 PDT
Created attachment 253731 [details]
Patch
Comment 5 Nikita Vasilyev 2015-05-26 13:51:13 PDT
Created attachment 253733 [details]
[Animated GIF] With the patch applied
Comment 6 Timothy Hatcher 2015-05-26 14:03:03 PDT
Comment on attachment 253731 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Views/Toolbar.css:121
> +    box-shadow: rgba(0, 0, 0, 0.15) 0 1px 0, 0 0 0 7px hsla(211, 96%, 48%, 0);

I think the system animates from a much larger size than 7px. Maybe even 15px.
Comment 7 Nikita Vasilyev 2015-05-26 14:42:02 PDT
Created attachment 253740 [details]
[Image] Native outline radius

(In reply to comment #6)
> Comment on attachment 253731 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=253731&action=review
> 
> > Source/WebInspectorUI/UserInterface/Views/Toolbar.css:121
> > +    box-shadow: rgba(0, 0, 0, 0.15) 0 1px 0, 0 0 0 7px hsla(211, 96%, 48%, 0);
> 
> I think the system animates from a much larger size than 7px. Maybe even
> 15px.

I measured it, it’s 24px.

However, in Web Inspector I have two constrains:

1. box-shadow can be clipped by a parent element with overflow hidden. In our case it’s Web Inspector toolbar.

2. CSS transition/animations don't allow animating box shadow color separately from its radius, which needs to be done to match the native behavior.
Comment 8 Nikita Vasilyev 2015-05-26 14:43:38 PDT
(In reply to comment #7)
> Created attachment 253740 [details]
> [Image] Native outline radius
> 
> (In reply to comment #6)
> 2. CSS transition/animations don't allow animating box shadow color
> separately from its radius, which needs to be done to match the native
> behavior.

To clarify, I need to use two different timing function for box shadow color and box shadow spread radius, which isn’t possible.
Comment 9 Timothy Hatcher 2015-05-26 14:44:37 PDT
Comment on attachment 253731 [details]
Patch

Okay, makes sense. This is clearly better than before.
Comment 10 WebKit Commit Bot 2015-05-26 14:48:58 PDT
Comment on attachment 253731 [details]
Patch

Clearing flags on attachment: 253731

Committed r184877: <http://trac.webkit.org/changeset/184877>
Comment 11 WebKit Commit Bot 2015-05-26 14:49:01 PDT
All reviewed patches have been landed.  Closing bug.