[webkit-changes] [WebKit/WebKit] 127a9e: [UnifiedPDF] Avoid drawing pages that are clipped out
Simon Fraser
noreply at github.com
Mon Oct 2 08:23:12 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 127a9e3ebe4fd14d0efe47c290b21293e48c8885
https://github.com/WebKit/WebKit/commit/127a9e3ebe4fd14d0efe47c290b21293e48c8885
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-10-02 (Mon, 02 Oct 2023)
Changed paths:
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
Log Message:
-----------
[UnifiedPDF] Avoid drawing pages that are clipped out
https://bugs.webkit.org/show_bug.cgi?id=262455
rdar://116297449
Reviewed by Dan Glastonbury.
Optimize drawing in two ways. First, allocate an ImageBuffer just big enough for the area being
painted, instead of the whole plugin.
Second, convert the drawing rect into the same coordinate space as the compute page bounds,
and use it to avoid painting pages that don't intersect.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::create):
(WebKit::UnifiedPDFPlugin::paint):
(WebKit::UnifiedPDFPlugin::pdfDocumentSizeForPrinting const):
(WebKit::UnifiedPDFPlugin::existingSelectionContainsPoint const):
(WebKit::UnifiedPDFPlugin::rectForSelectionInRootView const):
(WebKit::UnifiedPDFPlugin::countFindMatches):
(WebKit::UnifiedPDFPlugin::findString):
(WebKit::UnifiedPDFPlugin::performDictionaryLookupAtLocation):
(WebKit:: const):
(WebKit::UnifiedPDFPlugin::accessibilityHitTest const):
(WebKit::UnifiedPDFPlugin::accessibilityAssociatedPluginParentForElement const):
Canonical link: https://commits.webkit.org/268729@main
More information about the webkit-changes
mailing list