Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 2fc8377fb2908ec7003d3e8591aa5a418bfdcf54 https://github.com/WebKit/WebKit/commit/2fc8377fb2908ec7003d3e8591aa5a418bfdcf54 Author: Simon Fraser <simon.fra...@apple.com> Date: 2024-01-29 (Mon, 29 Jan 2024)
Changed paths: M Source/WebKit/UIProcess/ViewGestureController.cpp M Source/WebKit/UIProcess/ViewGestureController.h M Source/WebKit/UIProcess/WebPageProxy.cpp M Source/WebKit/UIProcess/WebPageProxy.h M Source/WebKit/UIProcess/WebPageProxy.messages.in M Source/WebKit/UIProcess/gtk/ViewGestureControllerGtk.cpp M Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.mm M Source/WebKit/WebProcess/Plugins/PluginView.cpp Log Message: ----------- [UnifiedPDF] Can't zoom out below scale 1 https://bugs.webkit.org/show_bug.cgi?id=268310 rdar://121866624 Reviewed by Tim Horton. For the PDF plugin, we need to allow minimum zoom scales of less than 1. Add support for this by allowing the plugin to vend min and max scales, keeping track of them in WebPageProxy. ViewGestureController reads them from there. We compute the min and max elastic zoom scales relative to the min and max, using multipliers that gives the same results as the old hard-coded values. The PDF min and max scale values match those in PDFKit. * Source/WebKit/UIProcess/ViewGestureController.cpp: (WebKit::ViewGestureController::endMagnificationGesture): * Source/WebKit/UIProcess/ViewGestureController.h: * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::minPageZoomFactor const): (WebKit::WebPageProxy::maxPageZoomFactor const): (WebKit::WebPageProxy::mainFramePluginHandlesPageScaleGestureDidChange): * Source/WebKit/UIProcess/WebPageProxy.h: * Source/WebKit/UIProcess/WebPageProxy.messages.in: * Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm: (WebKit::ViewGestureController::resistanceForDelta): (WebKit::ViewGestureController::handleMagnificationGestureEvent): (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture): * Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h: (WebKit::PDFPluginBase::minScaleFactor const): (WebKit::PDFPluginBase::maxScaleFactor const): * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.mm: (WebKit::PDFDocumentLayout::layoutSingleColumn): * Source/WebKit/WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::initializePlugin): Canonical link: https://commits.webkit.org/273725@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes