Title: [275397] trunk/Source/WebKit
- Revision
- 275397
- Author
- [email protected]
- Date
- 2021-04-01 17:52:16 -0700 (Thu, 01 Apr 2021)
Log Message
[watchOS] Contact AutoFill suggestions no longer show up in non-username or password fields
https://bugs.webkit.org/show_bug.cgi?id=224087
<rdar://problem/76080205>
Reviewed by Tim Horton.
For the time being, limit use of `PUICQuickboardController` to text content types that would allow for login
credential AutoFill in Quickboard. We can remove this logic when `PUICQuickboardController` can be updated with
and present arbitrary text suggestion values.
* UIProcess/ios/WKContentViewInteraction.mm:
(canUseQuickboardControllerFor):
(-[WKContentView presentViewControllerForCurrentFocusedElement]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (275396 => 275397)
--- trunk/Source/WebKit/ChangeLog 2021-04-02 00:40:52 UTC (rev 275396)
+++ trunk/Source/WebKit/ChangeLog 2021-04-02 00:52:16 UTC (rev 275397)
@@ -1,3 +1,19 @@
+2021-04-01 Wenson Hsieh <[email protected]>
+
+ [watchOS] Contact AutoFill suggestions no longer show up in non-username or password fields
+ https://bugs.webkit.org/show_bug.cgi?id=224087
+ <rdar://problem/76080205>
+
+ Reviewed by Tim Horton.
+
+ For the time being, limit use of `PUICQuickboardController` to text content types that would allow for login
+ credential AutoFill in Quickboard. We can remove this logic when `PUICQuickboardController` can be updated with
+ and present arbitrary text suggestion values.
+
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (canUseQuickboardControllerFor):
+ (-[WKContentView presentViewControllerForCurrentFocusedElement]):
+
2021-04-01 BJ Burg <[email protected]>
v2: REGRESSION(r266890): [Cocoa] Fix API::InspectorClient leak
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (275396 => 275397)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2021-04-02 00:40:52 UTC (rev 275396)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2021-04-02 00:52:16 UTC (rev 275397)
@@ -6545,6 +6545,12 @@
return quickboardController;
}
+static bool canUseQuickboardControllerFor(UITextContentType type)
+{
+ // We can remove this restriction once PUICQuickboardController supports displaying text suggestion strings that are not login credentials.
+ return [type isEqualToString:UITextContentTypeUsername] || [type isEqualToString:UITextContentTypePassword] || [type isEqualToString:UITextContentTypeEmailAddress];
+}
+
#endif // HAVE(QUICKBOARD_CONTROLLER)
- (void)presentViewControllerForCurrentFocusedElement
@@ -6575,10 +6581,12 @@
break;
default: {
#if HAVE(QUICKBOARD_CONTROLLER)
- _presentedQuickboardController = [self _createQuickboardController:presentingViewController];
-#else
+ if (canUseQuickboardControllerFor(self.textContentTypeForQuickboard)) {
+ _presentedQuickboardController = [self _createQuickboardController:presentingViewController];
+ break;
+ }
+#endif
_presentedFullScreenInputViewController = adoptNS([[WKTextInputListViewController alloc] initWithDelegate:self]);
-#endif
break;
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes