Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 4cf597f04adaa1b64233c72a70052999ee5c8b64 https://github.com/WebKit/WebKit/commit/4cf597f04adaa1b64233c72a70052999ee5c8b64 Author: Abrar Rahman Protyasha <a_protya...@apple.com> Date: 2024-08-08 (Thu, 08 Aug 2024)
Changed paths: M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.mm M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm Log Message: ----------- [UnifiedPDF] Some password protected PDF documents open at huge scale after unlocking https://bugs.webkit.org/show_bug.cgi?id=277812 rdar://132842231 Reviewed by Simon Fraser. Some password protected PDF documents return a zero page count until decrypted. As such, our layout update logic is unable to settle on a reasonable initial scale for these documents, since we don't actually know the page bound of a representative page. In this patch, we force our layout update codepath to update the auto size scale (again) when unlocking a symptomatic PDF document. I was unable to write an automated test because I could not reduce reproductions to a simple enough PDF to check-in. * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.mm: (WebKit::PDFPresentationController::nearestPageIndexForDocumentPoint const): * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm: (WebKit::UnifiedPDFPlugin::attemptToUnlockPDF): (WebKit::UnifiedPDFPlugin::updateLayout): Canonical link: https://commits.webkit.org/282007@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes