Bug 234488 - Preferences that read from NSUserDefaults need to be initialied from platformInitializeStore()
Summary: Preferences that read from NSUserDefaults need to be initialied from platform...
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on: 234620
Blocks:
  Show dependency treegraph
 
Reported: 2021-12-19 11:38 PST by Simon Fraser (smfr)
Modified: 2021-12-22 14:36 PST (History)
4 users (show)

See Also:


Attachments
Patch (6.58 KB, patch)
2021-12-19 11:40 PST, Simon Fraser (smfr)
sam: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2021-12-19 11:38:23 PST
Preferences that read from NSUserDefaults need to be initialied from platformInitializeStore()
Comment 1 Simon Fraser (smfr) 2021-12-19 11:40:20 PST
Created attachment 447553 [details]
Patch
Comment 2 Sam Weinig 2021-12-20 15:55:56 PST
Comment on attachment 447553 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=447553&action=review

> Source/WebKit/UIProcess/Cocoa/WebPreferencesCocoa.mm:143
> +void WebPreferences::initializePlatformDependentPreferences()

I don't think platform dependent is the right name, since everything in this file is platform dependent. Perhaps platformInitializeProcessStateDependentPreferences()?

> Source/WebKit/UIProcess/Cocoa/WebPreferencesCocoa.mm:154
> +    m_store.setBoolValueForKey(WebPreferencesKey::scrollAnimatorEnabledKey(), [[NSUserDefaults standardUserDefaults] boolForKey:@"NSScrollAnimationEnabled"]);

I think you want to wrap this in #if PLATFORM(MAC)?
Comment 3 Simon Fraser (smfr) 2021-12-22 10:49:16 PST
https://trac.webkit.org/changeset/287364/webkit
Comment 4 Radar WebKit Bug Importer 2021-12-22 10:50:17 PST
<rdar://problem/86817858>
Comment 5 WebKit Commit Bot 2021-12-22 14:30:13 PST
Re-opened since this is blocked by bug 234620