Bug 207758 - [WPE] Use the theme to render the focus ring
Summary: [WPE] Use the theme to render the focus ring
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WPE WebKit (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-14 06:18 PST by Carlos Garcia Campos
Modified: 2020-02-20 02:32 PST (History)
2 users (show)

See Also:


Attachments
Patch (7.86 KB, patch)
2020-02-14 06:21 PST, Carlos Garcia Campos
aperez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>