Bug 193591 - Separate out outline-style: auto user-agent appearance from Mac animated focus ring drawing
Summary: Separate out outline-style: auto user-agent appearance from Mac animated focu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-18 13:51 PST by Daniel Bates
Modified: 2019-02-11 11:02 PST (History)
5 users (show)

See Also:


Attachments
Patch (10.24 KB, patch)
2019-01-18 14:01 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (7.42 KB, patch)
2019-01-18 14:30 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (8.66 KB, patch)
2019-02-10 10:44 PST, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2019-01-18 13:51:05 PST
Currently the focus ring appearance for outline-style: auto is tangled with the Mac animated focus ring logic. We should separate them so that a non-Mac port can opt-into the former and opt-out of the latter. In particular, the iOS ports wants to opt into the former and opt-out of the latter.
Comment 1 Daniel Bates 2019-01-18 14:01:10 PST
Created attachment 359536 [details]
Patch
Comment 2 Simon Fraser (smfr) 2019-01-18 14:10:26 PST
Comment on attachment 359536 [details]
Patch

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

> Source/WebCore/page/Settings.yaml:799
> +usePlatformFocusRingColorForOutlineStyleAuto:
> +  initial: defaultUsePlatformFocusRingColorForOutlineStyleAuto()
> +
> +useShrinkWrappedFocusRingForOutlineStyleAuto:
> +  initial: defaultUseShrinkWrappedFocusRingForOutlineStyleAuto()

Do you really need settings here, or can you just have a static function somewhere whose return values depend on #ifdefs?

I think Settings are only useful if you are ever going to change them at runtime, e.g. for testing.

I could imagine some static methods on Theme/RenderTheme, for instance.
Comment 3 Daniel Bates 2019-01-18 14:30:01 PST
Created attachment 359540 [details]
Patch
Comment 4 Daniel Bates 2019-02-10 10:44:12 PST
Created attachment 361633 [details]
Patch
Comment 5 Daniel Bates 2019-02-10 10:45:09 PST
(In reply to Simon Fraser (smfr) from comment #2)
> Comment on attachment 359536 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=359536&action=review
> 
> > Source/WebCore/page/Settings.yaml:799
> > +usePlatformFocusRingColorForOutlineStyleAuto:
> > +  initial: defaultUsePlatformFocusRingColorForOutlineStyleAuto()
> > +
> > +useShrinkWrappedFocusRingForOutlineStyleAuto:
> > +  initial: defaultUseShrinkWrappedFocusRingForOutlineStyleAuto()
> 
> Do you really need settings here, or can you just have a static function
> somewhere whose return values depend on #ifdefs?
> 

Took this approach.
Comment 6 Daniel Bates 2019-02-11 11:00:13 PST
Comment on attachment 361633 [details]
Patch

Clearing flags on attachment: 361633

Committed r241271: <https://trac.webkit.org/changeset/241271>
Comment 7 Daniel Bates 2019-02-11 11:00:15 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-02-11 11:02:42 PST
<rdar://problem/47970888>