[webkit-changes] [WebKit/WebKit] f3ce15: [UnifiedPDF] Handle PDF actions that move betwen p...
Sammy Gill
noreply at github.com
Tue Feb 13 18:31:21 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f3ce152618e8b172daa501d4d579128f439dcfa7
https://github.com/WebKit/WebKit/commit/f3ce152618e8b172daa501d4d579128f439dcfa7
Author: Sammy Gill <sammy.gill at apple.com>
Date: 2024-02-13 (Tue, 13 Feb 2024)
Changed paths:
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
Log Message:
-----------
[UnifiedPDF] Handle PDF actions that move betwen pages and perform zooms.
https://bugs.webkit.org/show_bug.cgi?id=268508
rdar://122049363
Reviewed by Tim Horton.
To start handling PDFActions we will check to see if an annotation has
an associated action. If it does then we check to see what type of
action it is. In this patch we provide support for actions that go to
next/previous pages, the first/last pages and zooming in/out.
We already have logic for these things so this is just a matter of
hooking up the PDFActions to them. For zooming in/out we hook into their
respective functions. For any sort page navigations we can use
scrollToPage. PDFDestination navigations are handled in a similar way.
Finally, I added in some logic to take into consideration page margins
in scrollToPointInPage.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::handleMouseEvent):
(WebKit::UnifiedPDFPlugin::scrollToPointInPage):
(WebKit::UnifiedPDFPlugin::handlePDFActionForAnnotation):
Canonical link: https://commits.webkit.org/274598@main
More information about the webkit-changes
mailing list