[webkit-changes] [WebKit/WebKit] bbe7d4: Comparing scales in WebKit is sometimes wrong beca...

megangardner noreply at github.com
Tue Jul 18 14:37:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bbe7d4f7a320b4e521d0b15e63c8fe9006572a12
      https://github.com/WebKit/WebKit/commit/bbe7d4f7a320b4e521d0b15e63c8fe9006572a12
  Author: Megan Gardner <megan_gardner at apple.com>
  Date:   2023-07-18 (Tue, 18 Jul 2023)

  Changed paths:
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Source/WebKit/UIProcess/ios/WKScrollView.mm
    M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

  Log Message:
  -----------
  Comparing scales in WebKit is sometimes wrong because of float to double and vis versa conversions.
https://bugs.webkit.org/show_bug.cgi?id=259064
rdar://112031165

Reviewed by Tim Horton.

While investigating rdar://111176298, the cause ended up being that the page considered
itself zoomed because of an inaccuracy in comparing zoom scales. I am proactively trying to
correct other areas where we compare zoom scales to try and combat this issue. These issues
will be more prevalent on visionOS, since it is always at a constant scale.

* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _scrollToContentScrollPosition:scrollOrigin:animated:]):
(-[WKWebView _allowsDoubleTapGestures]):
* Source/WebKit/UIProcess/ios/WKScrollView.mm:
(-[WKScrollView _setContentSizePreservingContentOffsetDuringRubberband:]):
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::computeLayoutViewportRect const):
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::adjustVelocityDataForBoundedScale):
* Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):

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




More information about the webkit-changes mailing list