RESOLVED FIXED 218881
Cleanup InternalSettings
https://bugs.webkit.org/show_bug.cgi?id=218881
Summary Cleanup InternalSettings
Sam Weinig
Reported 2020-11-12 18:41:41 PST
Cleanup InternalSettings
Attachments
Patch (109.60 KB, patch)
2020-11-12 18:45 PST, Sam Weinig
ews-feeder: commit-queue-
Patch (109.60 KB, patch)
2020-11-12 19:09 PST, Sam Weinig
no flags
Patch (106.00 KB, patch)
2020-11-12 20:06 PST, Sam Weinig
no flags
Sam Weinig
Comment 1 2020-11-12 18:45:20 PST Comment hidden (obsolete)
Sam Weinig
Comment 2 2020-11-12 19:09:47 PST Comment hidden (obsolete)
Sam Weinig
Comment 3 2020-11-12 20:06:46 PST
Tim Horton
Comment 4 2020-11-12 21:31:36 PST
Comment on attachment 413998 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=413998&action=review > LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-scrolled.html:5 > - internals.settings.setUserInterfaceDirectionPolicy("View"); > + internals.settings.setUserInterfaceDirectionPolicy("System"); Huh, do these tests still pass if you change the preference on your machine, now?
Sam Weinig
Comment 5 2020-11-13 06:41:39 PST
(In reply to Tim Horton from comment #4) > Comment on attachment 413998 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=413998&action=review > > > LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-scrolled.html:5 > > - internals.settings.setUserInterfaceDirectionPolicy("View"); > > + internals.settings.setUserInterfaceDirectionPolicy("System"); > > Huh, do these tests still pass if you change the preference on your machine, > now? All I changed was the spelling of the enum value. I don’t think anything else will have changed.
Sam Weinig
Comment 6 2020-11-13 07:18:04 PST
(In reply to Sam Weinig from comment #5) > (In reply to Tim Horton from comment #4) > > Comment on attachment 413998 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=413998&action=review > > > > > LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-scrolled.html:5 > > > - internals.settings.setUserInterfaceDirectionPolicy("View"); > > > + internals.settings.setUserInterfaceDirectionPolicy("System"); > > > > Huh, do these tests still pass if you change the preference on your machine, > > now? > > All I changed was the spelling of the enum value. I don’t think anything > else will have changed. To be even clearer, here was the old code that mapped View to System: - if (equalLettersIgnoringASCIICase(policy, "content")) { - settings().setUserInterfaceDirectionPolicy(UserInterfaceDirectionPolicy::Content); - return { }; - } - if (equalLettersIgnoringASCIICase(policy, "view")) { - settings().setUserInterfaceDirectionPolicy(UserInterfaceDirectionPolicy::System); - return { }; - } - return Exception { InvalidAccessError }; Now it just maps "System" to System directly.
EWS
Comment 7 2020-11-13 09:47:22 PST
Committed r269784: <https://trac.webkit.org/changeset/269784> All reviewed patches have been landed. Closing bug and clearing flags on attachment 413998 [details].
Radar WebKit Bug Importer
Comment 8 2020-11-13 09:48:18 PST
Tim Horton
Comment 9 2020-11-13 11:39:03 PST
(In reply to Sam Weinig from comment #6) > (In reply to Sam Weinig from comment #5) > > (In reply to Tim Horton from comment #4) > > > Comment on attachment 413998 [details] > > > Patch > > > > > > View in context: > > > https://bugs.webkit.org/attachment.cgi?id=413998&action=review > > > > > > > LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-scrolled.html:5 > > > > - internals.settings.setUserInterfaceDirectionPolicy("View"); > > > > + internals.settings.setUserInterfaceDirectionPolicy("System"); > > > > > > Huh, do these tests still pass if you change the preference on your machine, > > > now? > > > > All I changed was the spelling of the enum value. I don’t think anything > > else will have changed. > > To be even clearer, here was the old code that mapped View to System: > > - if (equalLettersIgnoringASCIICase(policy, "content")) { > - > settings().setUserInterfaceDirectionPolicy(UserInterfaceDirectionPolicy:: > Content); > - return { }; > - } > - if (equalLettersIgnoringASCIICase(policy, "view")) { > - > settings().setUserInterfaceDirectionPolicy(UserInterfaceDirectionPolicy:: > System); > - return { }; > - } > - return Exception { InvalidAccessError }; > > Now it just maps "System" to System directly. Oh! Naively assumed "system" meant "app wide" and "view" meant "scoped to the view", since it is possible for those to differ. Now I wonder which it really is :D Anyway, making them all the same is A++.
Note You need to log in before you can comment on or make changes to this bug.