Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f71c4eb33c8f16ceb5508bc9a414187f93d58203
https://github.com/WebKit/WebKit/commit/f71c4eb33c8f16ceb5508bc9a414187f93d58203
Author: Tim Horton <[email protected]>
Date: 2025-02-10 (Mon, 10 Feb 2025)
Changed paths:
M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
M Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/UnifiedPDFTests.mm
Log Message:
-----------
[UnifiedPDF] [iOS] Support printing in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=287456
rdar://142292582
Reviewed by Abrar Rahman Protyasha.
Hoist the macOS version of PDFPlugin printing into WebPageCocoa and enable it
cross-platform.
The only change made to the code was to move off NSGraphicsContext and hand
PDFKit a CGContextRef directly.
Also, add a test that this works on iOS with Unified PDF enabled.
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::computePagesForPrintingPDFDocument):
(WebKit::roundCGFloat):
(WebKit::drawPDFPage):
(WebKit::WebPage::drawPDFDocument):
(WebKit::WebPage::drawPagesToPDFFromPDFDocument):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::beginPrinting):
(WebKit::WebPage::drawRectToImage):
(WebKit::WebPage::drawPagesToPDFImpl):
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::computePagesForPrintingPDFDocument): Deleted.
(WebKit::WebPage::drawPagesToPDFFromPDFDocument): Deleted.
* Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::computePagesForPrintingPDFDocument): Deleted.
(WebKit::roundCGFloat): Deleted.
(WebKit::drawPDFPage): Deleted.
(WebKit::WebPage::drawPDFDocument): Deleted.
(WebKit::WebPage::drawPagesToPDFFromPDFDocument): Deleted.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/UnifiedPDFTests.mm:
(TestWebKitAPI::UNIFIED_PDF_TEST):
Canonical link: https://commits.webkit.org/290199@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