[webkit-changes] [WebKit/WebKit] d74204: [macOS] Add a mechanism to temporarily suppress te...
Aditya Keerthi
noreply at github.com
Wed May 15 11:14:06 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d74204522d48951c10bb31282e991ce3a7df96d7
https://github.com/WebKit/WebKit/commit/d74204522d48951c10bb31282e991ce3a7df96d7
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2024-05-15 (Wed, 15 May 2024)
Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
M Source/WebKit/UIProcess/PageClient.h
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
M Source/WebKit/UIProcess/ViewGestureController.cpp
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
M Source/WebKit/UIProcess/mac/PageClientImplMac.h
M Source/WebKit/UIProcess/mac/PageClientImplMac.mm
M Source/WebKit/UIProcess/mac/WKTextIndicatorStyleManager.h
M Source/WebKit/UIProcess/mac/WebViewImpl.h
M Source/WebKit/UIProcess/mac/WebViewImpl.mm
Log Message:
-----------
[macOS] Add a mechanism to temporarily suppress text indicators during scrolling/resizing/zooming
https://bugs.webkit.org/show_bug.cgi?id=274071
rdar://127271298
Reviewed by Abrar Rahman Protyasha and Richard Robinson.
Modern text indicators are inserted as subviews of `WKWebView`. During scrolling,
resizing, and zooming, text can get displaced from the text indicator. Consequently,
in this scenarios, text indicators should be temporarily suppressed, and restored
when in a stable state.
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView setPageZoom:]):
(-[WKWebView _setTextZoomFactor:]):
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::scrollingNodeScrollViewDidScroll):
* Source/WebKit/UIProcess/PageClient.h:
(WebKit::PageClient::willBeginViewGesture):
(WebKit::PageClient::didEndViewGesture):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
Remove the platform conditional, so that all types of scrolls can be detected on macOS.
* Source/WebKit/UIProcess/ViewGestureController.cpp:
(WebKit::ViewGestureController::willBeginGesture):
(WebKit::ViewGestureController::didEndGesture):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willBeginViewGesture):
(WebKit::WebPageProxy::didEndViewGesture):
* Source/WebKit/UIProcess/WebPageProxy.h:
Introduce `willBeginViewGesture` and `didEndViewGesture` to enable suppression
during magnification and navigation gestures.
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::scrollingNodeScrollViewDidScroll): Deleted.
* Source/WebKit/UIProcess/mac/PageClientImplMac.h:
* Source/WebKit/UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::scrollingNodeScrollViewDidScroll):
(WebKit::PageClientImpl::willBeginViewGesture):
(WebKit::PageClientImpl::didEndViewGesture):
* Source/WebKit/UIProcess/mac/WKTextIndicatorStyleManager.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::renewGState):
Suppress modern text indicators during resizing.
(WebKit::WebViewImpl::hasContentRelativeChildViews const):
(WebKit::WebViewImpl::suppressContentRelativeChildViews):
Use a `HysteresisActivity` to drive suppression. `Remove` / `Restore` are used
to hide views for a longer period of time, such as during a magnification gesture.
Otherwise, `TemporarilyRemove` is used for affecting behaviors which have no
start/end, such as resizing.
(WebKit::WebViewImpl::contentRelativeViewsHysteresisTimerFired):
(WebKit::WebViewImpl::restoreContentRelativeChildViews):
(WebKit::WebViewImpl::setMagnification):
Canonical link: https://commits.webkit.org/278818@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list