WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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-
Details
Formatted Diff
Diff
Patch
(109.60 KB, patch)
2020-11-12 19:09 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(106.00 KB, patch)
2020-11-12 20:06 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2020-11-12 18:45:20 PST
Comment hidden (obsolete)
Created
attachment 413991
[details]
Patch
Sam Weinig
Comment 2
2020-11-12 19:09:47 PST
Comment hidden (obsolete)
Created
attachment 413993
[details]
Patch
Sam Weinig
Comment 3
2020-11-12 20:06:46 PST
Created
attachment 413998
[details]
Patch
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
<
rdar://problem/71374775
>
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.
Top of Page
Format For Printing
XML
Clone This Bug