-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When releasing a resize in full screen video, the video content brief…
…ly flashes to its original size https://bugs.webkit.org/show_bug.cgi?id=260558 rdar://113771996 Reviewed by Tim Horton. When releasing a resize of a window on visionOS that contains a fixed-position element, the element's size briefly becomes its original size. In `_endLiveResize`, we create a snapshot view and put it on top of the web content. The snapshot is then removed in the completion handler of a `doAfterNextPresentationUpdate` call. However, by the time the transaction commit happens in the presentation update, two important updates have yet to happen: 1. A visible content rect update 2. A geometry update The visible content rect update needs to happen before the commit so that all the new sizes are updated. However, `doAfterNextPresentationUpdate` does not ensure this. To fix, bundle a VCR update inside the `UpdateGeometry` message, and then have the web page update the VCRs when receiving the message. The geometry update of the drawing area was not happening because its size was never being set. When a geometry uodate is deferred, `_frameOrBoundsMayHaveChanged` skips setting all the relevant new values. Instead, all these values are (theoretically) set in `_didStopDeferringGeometryUpdates`. However, `_didStopDeferringGeometryUpdates` was missing setting the size of the drawing area. As a result, in `sendUpdateGeometry`, the layout size and other changes were being updated, but the drawing area size was the old value. It then eventually does get updated on the next UIKit layout via `frameOrBoundsMayHaveChanged`, but by that point the snapshot view has already been removed. Fix by simply ensuring that `_didStopDeferringGeometryUpdates` also updates the drawing area size. * Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h: * Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _createVisibleRectUpdateInfo]): (-[WKWebView _didStopDeferringGeometryUpdates]): * Source/WebKit/UIProcess/PageClient.h: * Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h: (WebKit::RemoteLayerTreeDrawingAreaProxy::setLastVisibleContentRectUpdate): (WebKit::RemoteLayerTreeDrawingAreaProxy::lastVisibleContentRectUpdate const): * Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: (WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry): * Source/WebKit/UIProcess/ios/PageClientImplIOS.h: * Source/WebKit/UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::createVisibleRectUpdateInfo): * Source/WebKit/UIProcess/ios/WKContentView.h: * Source/WebKit/UIProcess/ios/WKContentView.mm: (-[WKContentView createVisibleRectUpdateInfoFromVisibleRect:unobscuredRect:contentInsets:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:viewStability:enclosedInScrollableAncestorView:sendEvenIfUnchanged:]): (-[WKContentView didUpdateVisibleRect:unobscuredRect:contentInsets:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:viewStability:enclosedInScrollableAncestorView:sendEvenIfUnchanged:]): * Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm: * Source/WebKit/WebProcess/WebPage/DrawingArea.h: * Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in: * Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h: * Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm: (WebKit::RemoteLayerTreeDrawingArea::updateGeometry): Canonical link: https://commits.webkit.org/267652@main
- Loading branch information
Showing
17 changed files
with
130 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters