Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6f6d92eda135775fd18ca62e5e37f49f5f708fd9
      
https://github.com/WebKit/WebKit/commit/6f6d92eda135775fd18ca62e5e37f49f5f708fd9
  Author: Anne van Kesteren <[email protected]>
  Date:   2026-09-07 (Mon, 07 Sep 2026)

  Changed paths:
    M Source/WTF/Scripts/GeneratePreferences.rb
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/Scripts/GenerateSettings.rb
    M Source/WebCore/page/Settings.yaml

  Log Message:
  -----------
  Simplify UnifiedWebPreferences.yaml's defaultValue
https://bugs.webkit.org/show_bug.cgi?id=323438

Reviewed by Chris Dumez.

"defaultValue" now holds the value every frontend shares, either directly
or as a map of build conditions ending in "default", with a frontend
listed under it only where its value differs:

    defaultValue:
      PLATFORM(COCOA): true
      default: false
      WebKitLegacy: false

440 of 780 preferences collapse to a single defaultValue line, 48 more
share a conditional default, and 292 spell out a deviation. Whichever
frontend needs the fewest deviations supplies the shared default, ties
going to WebKit.

The 123 preferences that are not in all three frontends say so with
"excludeFrom".

GeneratePreferences.rb validates the shape. A map needs a "default" and no
value may be left empty, with build conditions before the "default" and
frontends after it; frontends are listed in the order WebKitLegacy,
WebKit, WebCore in "defaultValue", "excludeFrom" and "exposed", so
grepping a preference always finds them in the same order; a frontend
whose value is the shared default has to be left out; a map that is only a
"default" has to be written inline, whether it is the shared default or a
frontend's; a frontend cannot be nested under another frontend, which
would generate an "#if WebCore" rather than fail; and an excluded frontend
cannot carry a value. GenerateSettings.rb reports a missing "defaultValue"
as well, since Source/WebCore/page/Settings.yaml sees no validation.

MediaSourceInWorkerEnabled and UseCGDisplayListsForDOMRendering listed
"exposed" as [ WebCore, WebKit ] and are reordered. Preference bodies are
now uniformly indented two, four and six spaces.

Source/WebCore/page/Settings.yaml is converted too, since it shares
GenerateSettings.rb's parser. Its settings are WebCore-only, so they need
no "excludeFrom".

No behavior change. The conversion was mechanical, by the script attached
to this bug, whose --compare mode flattens two versions of a file to the
(preference, frontend) -> ordered condition map the generators consume and
diffs them:

    convert-web-preferences-default-values --compare before.yaml after.yaml

All 2121 pairs are identical for UnifiedWebPreferences.yaml and all 67 for
Settings.yaml, and generating every derived file for all six generator
invocations before and after produces 23 byte-identical files.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to