[webkit-changes] [WebKit/WebKit] e2f0d3: Automatic live-ish resize engages late; one frame ...

Tim Horton noreply at github.com
Tue Oct 25 16:47:30 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e2f0d3ff7df51131fadb3cb0be5d6a00bdd6c90f
      https://github.com/WebKit/WebKit/commit/e2f0d3ff7df51131fadb3cb0be5d6a00bdd6c90f
  Author: Tim Horton <timothy_horton at apple.com>
  Date:   2022-10-25 (Tue, 25 Oct 2022)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm

  Log Message:
  -----------
  Automatic live-ish resize engages late; one frame after the live resize starts
https://bugs.webkit.org/show_bug.cgi?id=247028
rdar://101562669

Reviewed by Aditya Keerthi.

* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView setFrame:]):
(-[WKWebView setBounds:]):
(-[WKWebView layoutSubviews]):
(-[WKWebView _frameOrBoundsWillChange]):
(-[WKWebView _frameOrBoundsMayHaveChanged]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _frameOrBoundsChanged]): Deleted.
`_frameOrBoundsChanged` currently engages snapshotted live-ish resize mechanism
*after* updating the frame, which means that it starts one frame behind the
live resize, and so the first frame delta is lost, leading to the right edge
of the content tearing away from the right edge of the WKWebView by the amount
of the delta.

Introduce `_frameOrBoundsWillChange` (called *before* we call super), and rename
`_frameOrBoundsChanged` to `_frameOrBoundsMayHaveChanged` since it is called
in multiple cases where we do not actually know that there was a change.

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




More information about the webkit-changes mailing list