Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6a0c6f0f6eb3059f3c40570b36564bd2c972ed36
https://github.com/WebKit/WebKit/commit/6a0c6f0f6eb3059f3c40570b36564bd2c972ed36
Author: Sammy Gill <[email protected]>
Date: 2024-10-11 (Fri, 11 Oct 2024)
Changed paths:
M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h
M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
M Source/WebKit/UIProcess/PageClient.h
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/WebPageProxy.messages.in
M Source/WebKit/UIProcess/ios/PageClientImplIOS.h
M Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
M Source/WebKit/WebProcess/Plugins/PluginView.cpp
M Source/WebKit/WebProcess/Plugins/PluginView.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
Log Message:
-----------
[UnifiedPDF][iOS] Send initial scale to UIProcess after PDF document is
installed.
https://bugs.webkit.org/show_bug.cgi?id=281258
rdar://137711819
Reviewed by Abrar Rahman Protyasha and Wenson Hsieh.
After the document is installed, the plugin will compute an initial page scale
to set.
Currently on macOS, we may set this value to a scale that fits the content
inside the view,
a scale for actual size, or 1.0. On iOS for now, we will just set this initial
page scale
factor to 1.0 and ultimately defer all initial scaling to the document fitting
scale done
in PDFDocumentLayout. We may want to revisit this at some point if we feel that
we can
choose a better scale in certain circumstances, but this is a good approach to
at least
get zooming working properly.
After the plugin computes this scale, we need to relay it over to the UI
process so that
it is synchronized, and any future scaling changes that come from the UI
process are based
off this initial scale from the plugin. This is done by simply adding a new
pluginDidInstallPDFDocument IPC that is used to pass along this scale but in
theory could
be used with any sort of other information that is needed by the UI process
after the
document is installed.
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _pluginDidInstallPDFDocument:]):
* Source/WebKit/UIProcess/PageClient.h:
(WebKit::PageClient::pluginDidInstallPDFDocument):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.h:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::pluginDidInstallPDFDocument):
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::pluginDidInstallPDFDocument):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::installPDFDocument):
(WebKit::UnifiedPDFPlugin::initialScale const):
* Source/WebKit/WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginDidInstallPDFDocument):
* Source/WebKit/WebProcess/Plugins/PluginView.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::pluginDidInstallPDFDocument):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
Canonical link: https://commits.webkit.org/285043@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes