Bug 255518

Summary: [GLib] Add introspectable API to configure experimental features at runtime
Product: WebKit Reporter: Adrian Perez <aperez>
Component: WebKit APIAssignee: Diego Pino <dpino>
Status: RESOLVED FIXED    
Severity: Normal CC: dpino, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=255779
https://bugs.webkit.org/show_bug.cgi?id=255915
https://bugs.webkit.org/show_bug.cgi?id=256136
https://bugs.webkit.org/show_bug.cgi?id=275577

Description Adrian Perez 2023-04-17 07:07:02 PDT
We would like to have something similar like the JSCOptions API,
but for WebKit, likely attached to the WebKitSettings class. It
should allow to:

 1. Enumerate available features which can be toggled at run time
    (their names, default value, current value, etc).
 2. Toggle values programmatically :)

The above would allow to have e.g. a development menu like Safari
Tech Preview in the Minibrowser and (if desired) in Epiphany, or
maybe even command line options to let people easily preview
features which are in development.
Comment 1 Adrian Perez 2023-04-17 07:08:54 PDT
This should be useful to easily try in-development features as well,
like for example the SVG LBSE (bug #90738) -- we've had people more
than once ask to be able to toggle features at runtime, so they do
not need to locally patch GTK/WPE port builds to try out things.
Comment 2 Adrian Perez 2023-04-17 14:50:35 PDT
Pull request: https://github.com/WebKit/WebKit/pull/12824
Comment 3 EWS 2023-04-24 13:31:51 PDT
Committed 263331@main (760e6a2591cf): <https://commits.webkit.org/263331@main>

Reviewed commits have been landed. Closing PR #12824 and removing active labels.
Comment 4 Radar WebKit Bug Importer 2023-04-24 13:33:18 PDT
<rdar://problem/108468818>
Comment 5 Diego Pino 2023-04-28 00:55:12 PDT
Debian Stable bot is failing after this patch with the following build error:

https://build.webkit.org/#/builders/46/builds/29638

```
../../Tools/MiniBrowser/gtk/main.c:377:9: error: ‘G_OPTION_ENTRY_NULL’ undeclared (first use in this function); did you mean ‘G_OPTION_ARG_NONE’?
  377 |         G_OPTION_ENTRY_NULL
      |         ^~~~~~~~~~~~~~~~~~~
      |         G_OPTION_ARG_NONE
```

Macro 'G_OPTION_ENTRY_NULL' is only defined since glib 2.70 but Debian Stable only includes glib 2.66
Comment 6 Diego Pino 2023-04-28 00:56:20 PDT
Re-opening for pull request https://github.com/webkit/webkit/pull/13265
Comment 7 EWS 2023-05-04 19:49:49 PDT
Committed 263707@main (f407ecf491e1): <https://commits.webkit.org/263707@main>

Reviewed commits have been landed. Closing PR #13265 and removing active labels.