[webkit-changes] [WebKit/WebKit] 212b86: [iOS] Allow clients to override text input traits

Aditya Keerthi noreply at github.com
Tue Dec 6 08:22:22 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 212b86c2035cf1570090e14605f5f12e0edaa519
      https://github.com/WebKit/WebKit/commit/212b86c2035cf1570090e14605f5f12e0edaa519
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2022-12-06 (Tue, 06 Dec 2022)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm

  Log Message:
  -----------
  [iOS] Allow clients to override text input traits
https://bugs.webkit.org/show_bug.cgi?id=248606
rdar://100240377

Reviewed by Wenson Hsieh.

Text input traits are provided by `WKContentView`, which clients do not have
access to. To support overriding text input traits, `WKContentView` now calls
into `-[WKWebView _textInputTraits]` to give clients the opportunity to
customize traits. The `WKWebView` implementation calls back into `WKContentView`
to return the standard set of traits.

* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _textInputTraits]):
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textInputTraits]):
(-[WKContentView textInputTraitsForWebView]):
* Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
(-[CustomTextInputTraitsWebView initWithFrame:keyboardType:]):
(-[CustomTextInputTraitsWebView _textInputTraits]):
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/257412@main




More information about the webkit-changes mailing list