Skip to content

Commit

Permalink
Adjust enablement criteria for the "Async UIKit Interactions" feature…
Browse files Browse the repository at this point in the history
… flag

https://bugs.webkit.org/show_bug.cgi?id=266022

Reviewed by Aditya Keerthi.

Adjust this feature flag, such that it's enabled by default only when both the following criteria
are met:

1. `PAL::deviceClassIsSmallScreen()` is true.
2. `UIKit/async_text_input` is enabled.

* Source/WebKit/Shared/ios/WebPreferencesDefaultValuesIOS.mm:
(WebKit::defaultUseAsyncUIKitInteractions):

Canonical link: https://commits.webkit.org/271703@main
  • Loading branch information
whsieh committed Dec 8, 2023
1 parent a54075c commit 399efe5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/WebKit/Shared/ios/WebPreferencesDefaultValuesIOS.mm
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ bool defaultMediaSourceEnabled()
bool defaultUseAsyncUIKitInteractions()
{
static bool enabled = false;
#if HAVE(UI_ASYNC_TEXT_INTERACTION)
#if PLATFORM(IOS) && HAVE(UI_ASYNC_TEXT_INTERACTION)
static std::once_flag flag;
std::call_once(flag, [] {
enabled = os_feature_enabled(UIKit, async_text_input);
enabled = PAL::deviceClassIsSmallScreen() && os_feature_enabled(UIKit, async_text_input);
});
#endif
return enabled;
Expand Down

0 comments on commit 399efe5

Please sign in to comment.