[webkit-changes] [WebKit/WebKit] ff056c: WKWebView does not respect `-[UIScrollView allowsK...

Richard Robinson noreply at github.com
Mon Oct 16 13:40:17 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ff056c129d9c43a15b6b2a52e9ab874d8b50eaba
      https://github.com/WebKit/WebKit/commit/ff056c129d9c43a15b6b2a52e9ab874d8b50eaba
  Author: Richard Robinson <richard_robinson2 at apple.com>
  Date:   2023-10-16 (Mon, 16 Oct 2023)

  Changed paths:
    M Source/WTF/wtf/PlatformHave.h
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Source/WebKit/UIProcess/ios/WKScrollView.mm
    M Tools/TestWebKitAPI/Tests/ios/WKScrollViewTests.mm

  Log Message:
  -----------
  WKWebView does not respect `-[UIScrollView allowsKeyboardScrolling]`
https://bugs.webkit.org/show_bug.cgi?id=263164
rdar://115803459

Reviewed by Wenson Hsieh.

When determining if a keyboard scroll may occur, consult the value of `-[UIScrollView allowsKeyboardScrolling]`,
a new API introduced in iOS 17.

The default value of this property is `NO` on iPhone, and `YES` on iPad, Catalyst, and Vision. As such, the
property must initially be set to `YES` in WKScrollView to maintain its existing behavior.

Also adds an API test for this behavior.

* Source/WTF/wtf/PlatformHave.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
* Source/WebKit/UIProcess/ios/WKScrollView.mm:
(-[WKScrollView initWithFrame:]):
* Tools/TestWebKitAPI/Tests/ios/WKScrollViewTests.mm:
(TEST):

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




More information about the webkit-changes mailing list