Bug 207758

Summary: [WPE] Use the theme to render the focus ring
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WPE WebKitAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, bugs-noreply
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch aperez: review+

Description Carlos Garcia Campos 2020-02-14 06:18:16 PST
This makes form controls consistent with elements having an auto outline.
Comment 1 Carlos Garcia Campos 2020-02-14 06:21:25 PST
Created attachment 390758 [details]
Patch
Comment 2 Adrian Perez 2020-02-20 00:14:32 PST
Comment on attachment 390758 [details]
Patch

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

> Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:298
> +    UNUSED_PARAM(offset);

What is the reason for these two being ignored? IIUC, it is possible
to set some CSS properties on focus rings using the :focus selector,
and I think these two values might comes from there in some way e.g.
if the shape is not overriden, but only the border width then that
would mean “paint the system focus ring, but with a custom width”.

I think it's fine to land the patch as-is, but I would leave a TODO
comment here.

> Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:320
> +    UNUSED_PARAM(offset);

Ditto.
Comment 3 Carlos Garcia Campos 2020-02-20 02:30:24 PST
(In reply to Adrian Perez from comment #2)
> Comment on attachment 390758 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=390758&action=review
> 
> > Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:298
> > +    UNUSED_PARAM(offset);
> 
> What is the reason for these two being ignored?

We have always ignored them in GTK port. I checked other browsers and they also seem to ignore it.

> IIUC, it is possible
> to set some CSS properties on focus rings using the :focus selector,
> and I think these two values might comes from there in some way e.g.
> if the shape is not overriden, but only the border width then that
> would mean “paint the system focus ring, but with a custom width”.

I tried to honor them and it didn't really work. In the case of the offset, it sometimes applied already by renderer (depends on the caller).

> I think it's fine to land the patch as-is, but I would leave a TODO
> comment here.

Ok, we can investigate it later.

> > Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:320
> > +    UNUSED_PARAM(offset);
> 
> Ditto.
Comment 4 Carlos Garcia Campos 2020-02-20 02:32:11 PST
Committed r257049: <https://trac.webkit.org/changeset/257049>