[webkit-gtk] How to enable SelectionPaintingWithoutSelectionGaps?

Michael Catanzaro mcatanzaro at igalia.com
Wed Mar 22 09:34:50 PDT 2017


On Tue, 2017-03-21 at 11:19 +0100, Artyom wrote:
> I want to get rid of "blocky" selection in webkit (see this bug:
> https://bugs.webkit.org/show_bug.cgi?id=156900). Apparently, to do
> this
> I should enable SelectionPaintingWithoutSelectionGaps. I found it in
> the
> source (in WKPreferences), but I can't understand how to enable it
> from
> WebKitGTK. Is it even possible, or are some settings from
> WKPreferences
> not exposed by WebKitGTK?

No, it's not exposed in our API at all. It would need to be added to
WebKitSettings. See
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.[h,cpp]. I think there
is no reason to not add it, just that nobody has requested it before,
so feel free to submit a patch on Bugzilla.

I kinda wonder if selection painting without gaps should be our default
behavior, but I'm not sure. Currently, all ports paint the gaps, but
only because we just removed the EFL port, which did not paint
selection gaps. macOS definitely wants to paint the gaps, but I don't
think this is how browsers work on Windows?

Note: There was a thread about this on webkit-dev a year or two ago, if
you want to search for it.

Michael


More information about the webkit-gtk mailing list