- Revision
- 275120
- Author
- [email protected]
- Date
- 2021-03-26 16:12:25 -0700 (Fri, 26 Mar 2021)
Log Message
Use PUICQuickboardController for text input when HAVE(QUICKBOARD_CONTROLLER) is defined
https://bugs.webkit.org/show_bug.cgi?id=223809
<rdar://problem/56730407>
Reviewed by Tim Horton.
Source/WebKit:
Enable `PUICQuickboardController` by default, and remove a runtime preference that previously disabled this
feature by default when `HAVE(QUICKBOARD_CONTROLLER)` is defined.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _updateTextInputTraits:]):
Add a couple of missing selector checks before attempting to configure smart quotes and smart dash editing
behaviors.
(-[WKContentView _createQuickboardController:]):
Additionally opt into a quickboard controller API to bypass the interstitial Quickboard view controller when
using `PUICQuickboardController`.
(-[WKContentView presentViewControllerForCurrentFocusedElement]):
Remove a check for the (now-removed) preference.
Source/WTF:
Remove the `QuickboardControllerForTextInputEnabled` WebKit preference, now that the feature is enabled by
default behind a build-time flag.
* Scripts/Preferences/WebPreferencesInternal.yaml:
LayoutTests:
Remove some extraneous instancees of `QuickboardControllerForTextInputEnabled=true` from watch-specific layout
tests, now that the feature is enabled by default.
* fast/forms/watchos/delete-content-in-text-field.html:
* fast/forms/watchos/edit-text-field-calls-injected-bundle.html:
* fast/forms/watchos/enter-text-with-spellcheck-disabled-expected.txt: Added.
* fast/forms/watchos/enter-text-with-spellcheck-disabled.html: Added.
Add a new test to exercise the missing selector checks in `-[WKContentView _updateTextInputTraits:]`.
* fast/forms/watchos/form-control-label-text.html:
* fast/forms/watchos/time-picker-value-change.html:
* fast/forms/watchos/username-text-content-type.html:
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (275119 => 275120)
--- trunk/LayoutTests/ChangeLog 2021-03-26 23:10:12 UTC (rev 275119)
+++ trunk/LayoutTests/ChangeLog 2021-03-26 23:12:25 UTC (rev 275120)
@@ -1,5 +1,27 @@
2021-03-26 Wenson Hsieh <[email protected]>
+ Use PUICQuickboardController for text input when HAVE(QUICKBOARD_CONTROLLER) is defined
+ https://bugs.webkit.org/show_bug.cgi?id=223809
+ <rdar://problem/56730407>
+
+ Reviewed by Tim Horton.
+
+ Remove some extraneous instancees of `QuickboardControllerForTextInputEnabled=true` from watch-specific layout
+ tests, now that the feature is enabled by default.
+
+ * fast/forms/watchos/delete-content-in-text-field.html:
+ * fast/forms/watchos/edit-text-field-calls-injected-bundle.html:
+ * fast/forms/watchos/enter-text-with-spellcheck-disabled-expected.txt: Added.
+ * fast/forms/watchos/enter-text-with-spellcheck-disabled.html: Added.
+
+ Add a new test to exercise the missing selector checks in `-[WKContentView _updateTextInputTraits:]`.
+
+ * fast/forms/watchos/form-control-label-text.html:
+ * fast/forms/watchos/time-picker-value-change.html:
+ * fast/forms/watchos/username-text-content-type.html:
+
+2021-03-26 Wenson Hsieh <[email protected]>
+
Allow some image overlay content to render in fully transparent image elements
https://bugs.webkit.org/show_bug.cgi?id=223781
<rdar://problem/75886351>
Modified: trunk/LayoutTests/fast/forms/watchos/delete-content-in-text-field.html (275119 => 275120)
--- trunk/LayoutTests/fast/forms/watchos/delete-content-in-text-field.html 2021-03-26 23:10:12 UTC (rev 275119)
+++ trunk/LayoutTests/fast/forms/watchos/delete-content-in-text-field.html 2021-03-26 23:12:25 UTC (rev 275120)
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true QuickboardControllerForTextInputEnabled=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<meta name="viewport" content="width=device-width">
<head>
Modified: trunk/LayoutTests/fast/forms/watchos/edit-text-field-calls-injected-bundle.html (275119 => 275120)
--- trunk/LayoutTests/fast/forms/watchos/edit-text-field-calls-injected-bundle.html 2021-03-26 23:10:12 UTC (rev 275119)
+++ trunk/LayoutTests/fast/forms/watchos/edit-text-field-calls-injected-bundle.html 2021-03-26 23:12:25 UTC (rev 275120)
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true QuickboardControllerForTextInputEnabled=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<meta name="viewport" content="width=device-width">
<head>
Added: trunk/LayoutTests/fast/forms/watchos/enter-text-with-spellcheck-disabled-expected.txt (0 => 275120)
--- trunk/LayoutTests/fast/forms/watchos/enter-text-with-spellcheck-disabled-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/forms/watchos/enter-text-with-spellcheck-disabled-expected.txt 2021-03-26 23:12:25 UTC (rev 275120)
@@ -0,0 +1,5 @@
+PASS field.value is "foo bar"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/forms/watchos/enter-text-with-spellcheck-disabled.html (0 => 275120)
--- trunk/LayoutTests/fast/forms/watchos/enter-text-with-spellcheck-disabled.html (rev 0)
+++ trunk/LayoutTests/fast/forms/watchos/enter-text-with-spellcheck-disabled.html 2021-03-26 23:12:25 UTC (rev 275120)
@@ -0,0 +1,31 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html>
+<meta name="viewport" content="width=device-width">
+<head>
+<script src=""
+<script src=""
+<script>
+jsTestIsAsync = true;
+
+async function runTest() {
+ if (!window.testRunner) {
+ description(`This test requires WebKitTestRunner.`);
+ return;
+ }
+
+ field = document.getElementById("field");
+ await UIHelper.activateElementAndWaitForInputSession(field);
+ await UIHelper.enterText("foo bar");
+ field.blur();
+ await UIHelper.waitForKeyboardToHide();
+
+ shouldBeEqualToString("field.value", "foo bar");
+ finishJSTest();
+}
+</script>
+</head>
+
+<body _onload_="runTest()">
+<input id="field" spellcheck="false" style="width: 320px; height: 568px;"></input>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/LayoutTests/fast/forms/watchos/form-control-label-text.html (275119 => 275120)
--- trunk/LayoutTests/fast/forms/watchos/form-control-label-text.html 2021-03-26 23:10:12 UTC (rev 275119)
+++ trunk/LayoutTests/fast/forms/watchos/form-control-label-text.html 2021-03-26 23:12:25 UTC (rev 275120)
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true QuickboardControllerForTextInputEnabled=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<meta name="viewport" content="width=device-width">
<head>
Modified: trunk/LayoutTests/fast/forms/watchos/time-picker-value-change.html (275119 => 275120)
--- trunk/LayoutTests/fast/forms/watchos/time-picker-value-change.html 2021-03-26 23:10:12 UTC (rev 275119)
+++ trunk/LayoutTests/fast/forms/watchos/time-picker-value-change.html 2021-03-26 23:12:25 UTC (rev 275120)
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true QuickboardControllerForTextInputEnabled=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<meta name="viewport" content="width=device-width">
<head>
Modified: trunk/LayoutTests/fast/forms/watchos/username-text-content-type.html (275119 => 275120)
--- trunk/LayoutTests/fast/forms/watchos/username-text-content-type.html 2021-03-26 23:10:12 UTC (rev 275119)
+++ trunk/LayoutTests/fast/forms/watchos/username-text-content-type.html 2021-03-26 23:12:25 UTC (rev 275120)
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true QuickboardControllerForTextInputEnabled=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<meta name="viewport" content="width=device-width">
<head>
Modified: trunk/Source/WTF/ChangeLog (275119 => 275120)
--- trunk/Source/WTF/ChangeLog 2021-03-26 23:10:12 UTC (rev 275119)
+++ trunk/Source/WTF/ChangeLog 2021-03-26 23:12:25 UTC (rev 275120)
@@ -1,3 +1,16 @@
+2021-03-26 Wenson Hsieh <[email protected]>
+
+ Use PUICQuickboardController for text input when HAVE(QUICKBOARD_CONTROLLER) is defined
+ https://bugs.webkit.org/show_bug.cgi?id=223809
+ <rdar://problem/56730407>
+
+ Reviewed by Tim Horton.
+
+ Remove the `QuickboardControllerForTextInputEnabled` WebKit preference, now that the feature is enabled by
+ default behind a build-time flag.
+
+ * Scripts/Preferences/WebPreferencesInternal.yaml:
+
2021-03-26 Yusuke Suzuki <[email protected]>
[JSC] Use new Apple ICU APIs to avoid C++ ICU API usage
Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml (275119 => 275120)
--- trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml 2021-03-26 23:10:12 UTC (rev 275119)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml 2021-03-26 23:12:25 UTC (rev 275120)
@@ -586,17 +586,6 @@
WebCore:
default: false
-QuickboardControllerForTextInputEnabled:
- type: bool
- humanReadableName: "Quickboard controller"
- humanReadableDescription: "Enable quickboard controller for text input"
- condition: HAVE(QUICKBOARD_CONTROLLER)
- webcoreBinding: none
- exposed: [ WebKit ]
- defaultValue:
- WebKit:
- default: false
-
ResourceLoadSchedulingEnabled:
type: bool
humanReadableName: "Resource Load Scheduling"
Modified: trunk/Source/WebKit/ChangeLog (275119 => 275120)
--- trunk/Source/WebKit/ChangeLog 2021-03-26 23:10:12 UTC (rev 275119)
+++ trunk/Source/WebKit/ChangeLog 2021-03-26 23:12:25 UTC (rev 275120)
@@ -1,3 +1,29 @@
+2021-03-26 Wenson Hsieh <[email protected]>
+
+ Use PUICQuickboardController for text input when HAVE(QUICKBOARD_CONTROLLER) is defined
+ https://bugs.webkit.org/show_bug.cgi?id=223809
+ <rdar://problem/56730407>
+
+ Reviewed by Tim Horton.
+
+ Enable `PUICQuickboardController` by default, and remove a runtime preference that previously disabled this
+ feature by default when `HAVE(QUICKBOARD_CONTROLLER)` is defined.
+
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView _updateTextInputTraits:]):
+
+ Add a couple of missing selector checks before attempting to configure smart quotes and smart dash editing
+ behaviors.
+
+ (-[WKContentView _createQuickboardController:]):
+
+ Additionally opt into a quickboard controller API to bypass the interstitial Quickboard view controller when
+ using `PUICQuickboardController`.
+
+ (-[WKContentView presentViewControllerForCurrentFocusedElement]):
+
+ Remove a check for the (now-removed) preference.
+
2021-03-26 Brady Eidson <[email protected]>
Refactor NetworkSessionCocoa to prepare for per-WebPageProxy sessions
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (275119 => 275120)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2021-03-26 23:10:12 UTC (rev 275119)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2021-03-26 23:12:25 UTC (rev 275120)
@@ -5234,8 +5234,10 @@
traits.autocorrectionType = disableAutocorrectAndAutocapitalize ? UITextAutocorrectionTypeNo : (_focusedElementInformation.isAutocorrect ? UITextAutocorrectionTypeYes : UITextAutocorrectionTypeNo);
if (!_focusedElementInformation.isSpellCheckingEnabled) {
- traits.smartQuotesType = UITextSmartQuotesTypeNo;
- traits.smartDashesType = UITextSmartDashesTypeNo;
+ if ([traits respondsToSelector:@selector(setSmartQuotesType:)])
+ traits.smartQuotesType = UITextSmartQuotesTypeNo;
+ if ([traits respondsToSelector:@selector(setSmartDashesType:)])
+ traits.smartDashesType = UITextSmartDashesTypeNo;
}
switch (_focusedElementInformation.inputMode) {
@@ -6510,6 +6512,7 @@
[context setSuggestions:suggestions.get()];
[context setInitialText:_focusedElementInformation.value];
[context setAcceptsEmoji:YES];
+ [context setShouldPresentModernTextInputUI:YES];
[quickboardController setQuickboardPresentingViewController:presentingViewController];
[quickboardController setExcludedFromScreenCapture:[context isSecureTextEntry]];
[quickboardController setTextInputContext:context.get()];
@@ -6548,12 +6551,10 @@
break;
default: {
#if HAVE(QUICKBOARD_CONTROLLER)
- if (_page->preferences().quickboardControllerForTextInputEnabled()) {
- _presentedQuickboardController = [self _createQuickboardController:presentingViewController];
- break;
- }
+ _presentedQuickboardController = [self _createQuickboardController:presentingViewController];
+#else
+ _presentedFullScreenInputViewController = adoptNS([[WKTextInputListViewController alloc] initWithDelegate:self]);
#endif
- _presentedFullScreenInputViewController = adoptNS([[WKTextInputListViewController alloc] initWithDelegate:self]);
break;
}
}