Bug 178637 - [Settings] It should be easier to add settings to WebCore/WebKit
Summary: [Settings] It should be easier to add settings to WebCore/WebKit
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
Depends on: 178634 178656 178823 178945
  Show dependency treegraph
Reported: 2017-10-21 16:12 PDT by Sam Weinig
Modified: 2017-10-27 13:34 PDT (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2017-10-21 16:12:43 PDT
It should be easier to add settings to WebCore and WebKit. Currently, there is quite a bit of plumbing you have to do, to surface a setting as an API preference, and it's easy to get wrong.
Comment 1 Sam Weinig 2017-10-21 16:16:30 PDT
I'm not sure on the exact balance yet, but I leaning toward a system where to expose a setting via WebKit SPI you need to edit two configuration files (API will require something hand written on top of those edits): the Settings configuration file in WebCore, and Preferences configuration file in WebKit. We could conceivably get away with just the one in WebCore, but that feels like too great a layering violation, and would make it too easy to accidentally expose something as SPI that was only meant for testing.
Comment 2 Sam Weinig 2017-10-21 16:19:04 PDT
With 178634, WebCore will be converted to a YAML based configuration for Settings. 

I think adding a similar file for WebKit, where you can both declare a WebCore setting that should re-exported via WebKit, and add new WebKit layer only settings.