Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4ad8749ae961d25f2847fa31db30c5ada9f62cdc
      
https://github.com/WebKit/WebKit/commit/4ad8749ae961d25f2847fa31db30c5ada9f62cdc
  Author: Adrian Perez de Castro <[email protected]>
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp
    M Tools/TestWebKitAPI/Tests/WebKit/WKPreferences.cpp
    M Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp

  Log Message:
  -----------
  [GLib] Some default values for WebKitSettings properties do not match 
UnifiedWebPreferences.yaml
https://bugs.webkit.org/show_bug.cgi?id=255779

Reviewed by Carlos Garcia Campos.

Make WebKitSettings properties which have a corresponding WebKitFeature
pick their default values from UnifiedWebPreferences.yaml, by means of
the generated DEFAULT_VALUE_FOR_* macros. This way changing the defaults
in the YAML source both the feature flags and WebKitSettings properties
will be initially in sync.

For feature flags that have a corresponding WebKitSettings property
that did not match the value declared in UnifiedWebPreferences.yaml,
move the default values to the YAML file. This makes the YAML source
the canonical source of truth.

Note that this patch does not attempt to keep the values of feature
flags and WebKitSettings properties synchronized at run time. That
would be an additional cghange to be done later on on top of this one.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: Update
defaults to reflect the WebKitSettings ones for the WPE and GTK ports.
* Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp:
(webKitSettingsConstructed): Remove manually setting feature flag
defaults, relying on the values from UnifiedWebPreferences.yaml instead.
(webkit_settings_class_init): Change property definitions to use default
values from UnifiedWebPreferences.yaml.
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
(testWebKitSettings): Adapt to handle the default for WebRTC being
different for USE(GSTREAMER_WEBRTC) and USE(LIBWEBRTC).
(testWebKitFeatures): Remove FIXME in the part of the test case that
checks that initial values match the declared defaults. There are a
couple of feature flags which are skipped in the check, possibly to
be fixed later on.
(testWebKitSettingsApplyFromConfigFile): Adapt to handle the default
for WebRTC being different for USE(GSTREAMER_WEBRTC) and USE(LIBWEBRTC).
* Tools/TestWebKitAPI/Tests/WebKit/WKPreferences.cpp:
(TestWebKitAPI::TEST(WebKit, WKPreferencesDefaults)): Adapt test case
for defaults which are now defined in UnifiedWebPreferences.yaml
differently for the WPE and GTK ports.

Canonical link: https://commits.webkit.org/280080@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to