RESOLVED FIXED 234456
Read the default value of the ScrollAnimatorEnabled setting from NSUserDefaults
https://bugs.webkit.org/show_bug.cgi?id=234456
Summary Read the default value of the ScrollAnimatorEnabled setting from NSUserDefaults
Simon Fraser (smfr)
Reported 2021-12-17 18:00:20 PST
Read the default value of the ScrollAnimatorEnabled setting from NSUserDefaults
Attachments
Patch (22.36 KB, patch)
2021-12-17 18:05 PST, Simon Fraser (smfr)
no flags
Patch (23.48 KB, patch)
2021-12-17 21:17 PST, Simon Fraser (smfr)
thorton: review+
Simon Fraser (smfr)
Comment 1 2021-12-17 18:05:59 PST
Simon Fraser (smfr)
Comment 2 2021-12-17 21:17:58 PST
Simon Fraser (smfr)
Comment 3 2021-12-18 23:09:33 PST
Radar WebKit Bug Importer
Comment 4 2021-12-18 23:10:19 PST
Sam Weinig
Comment 5 2021-12-19 10:12:59 PST
Comment on attachment 447510 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=447510&action=review > LayoutTests/fast/dom/horizontal-scrollbar-in-rtl.html:36 > + if (window.internals) > + internals.settings.setScrollAnimatorEnabled(false); Is there a benefit here to using the internals function rather than a header <!-- webkit-test-runner [ ScrollAnimatorEnabled=false ] -->? My preference is to prefer the comment command over programatic except in cases where either dynamic changes are needed or we are modifying an external test via some platform hook function.
Sam Weinig
Comment 6 2021-12-19 10:15:42 PST
Comment on attachment 447510 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=447510&action=review > Source/WebKit/Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm:71 > + return [[NSUserDefaults standardUserDefaults] boolForKey:@"NSScrollAnimationEnabled"]; I think this will give weird / unexpected behavior if this returns different values for the WebProcess and the UIProcess (a quirk of the preferences where we don't serialize values that have the default value when sending them to the web process). Is there a guarantee that NSScrollAnimationEnabled is set the same in both processes?
Simon Fraser (smfr)
Comment 7 2021-12-20 08:41:15 PST
(In reply to Sam Weinig from comment #5) > Comment on attachment 447510 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=447510&action=review > > > LayoutTests/fast/dom/horizontal-scrollbar-in-rtl.html:36 > > + if (window.internals) > > + internals.settings.setScrollAnimatorEnabled(false); > > Is there a benefit here to using the internals function rather than a header > <!-- webkit-test-runner [ ScrollAnimatorEnabled=false ] -->? > > My preference is to prefer the comment command over programatic except in > cases where either dynamic changes are needed or we are modifying an > external test via some platform hook function. The header comment didn't work (because this is not an internal or experimental feature). That was what I tried initially.
Sam Weinig
Comment 8 2021-12-26 10:59:05 PST
(In reply to Simon Fraser (smfr) from comment #7) > (In reply to Sam Weinig from comment #5) > > Comment on attachment 447510 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=447510&action=review > > > > > LayoutTests/fast/dom/horizontal-scrollbar-in-rtl.html:36 > > > + if (window.internals) > > > + internals.settings.setScrollAnimatorEnabled(false); > > > > Is there a benefit here to using the internals function rather than a header > > <!-- webkit-test-runner [ ScrollAnimatorEnabled=false ] -->? > > > > My preference is to prefer the comment command over programatic except in > > cases where either dynamic changes are needed or we are modifying an > > external test via some platform hook function. > > The header comment didn't work (because this is not an internal or > experimental feature). That was what I tried initially. Header comments should be working for any type of preference. It does not need to be experimental or internal.
Note You need to log in before you can comment on or make changes to this bug.