ASSIGNED 117870
Kill RuntimeEnabledFeatures class
https://bugs.webkit.org/show_bug.cgi?id=117870
Summary Kill RuntimeEnabledFeatures class
Chris Dumez
Reported 2013-06-21 04:09:38 PDT
The RuntimeEnabledFeatures class is barely used currently and is manually written. It was mostly used by the Chromium port to support the [EnabledAtRuntime] IDL extended attribute. We can leverage WebCore Settings class instead which is widely used and automatically generated. We currently have 2 IDL extended attribute to enable features at runtime: - [EnabledAtRuntime] backed by the RuntimeEnabledFeatures class - [EnabledBySetting] backed by the Settings class I believe we should keep the [EnabledAtRuntime] IDL attribute because it has been supported for a long time, people know about it and it is used by Blink. However, I think we should make [EnabledAtRuntime] use Settings instead of RuntimeEnabledFeatures.
Attachments
Chris Dumez
Comment 1 2013-06-21 07:41:14 PDT
I am not sure yet if this is a viable solution and I need to investigate more. Can we always access the Settings from the bindings code? For JSDOMWindow, we currently access the settings via impl()->frame()->settings() but for other types, I believe we may not easily get access to the frame's settings.
Geoffrey Garen
Comment 2 2013-06-21 09:21:08 PDT
FWIW, JavaScript objects can access their window through structure()->globalObject().
Chris Dumez
Comment 3 2013-06-24 00:23:05 PDT
(In reply to comment #2) > FWIW, JavaScript objects can access their window through structure()->globalObject(). Thanks for the info Geoffrey. Another issue is that not all [EnabledAtRuntime] are controlled by Setting-like flags. For e.g. the media features call MediaPlayer::isAvailable(), sql database features rely on DatabaseManager::manager().isAvailable().
Note You need to log in before you can comment on or make changes to this bug.