-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UnifiedPDF] Handle PDF annotations actions that reset form fields.
https://bugs.webkit.org/show_bug.cgi?id=269122 rdar://problem/122680796 Reviewed by Tim Horton. A certain type of PDF annotation action can reset various fields on a form. PDFKit represents this type of action as a PDFKitActionResetForm. Basically what we will do is check to see if an annotation has an action associated with it and will handle it if it does. This first patch supports the reset form action and will check to see if the action is of that type when handling it. If it is, we will call into the appropriate PDFKit SPI which will do the actual work for us. Also, the PDF specification says that an action is composed of a type, which specifies the type of action that it is, and a list of subsequent actions that are supposed to be performed. So we need to handle this scenario also by: 1.) Performing the action 2.) Store the subsequent actions on a stack in reverse order (so that the first action is at the top of the stack). We keep handling the action at the top of the stack until it is empty. * Source/WebKit/Platform/spi/Cocoa/PDFKitSPI.h: * Source/WebKit/Shared/Cocoa/PDFKitSoftLink.h: * Source/WebKit/Shared/Cocoa/PDFKitSoftLink.mm: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm: (WebKit::UnifiedPDFPlugin::handleMouseEvent): (WebKit::UnifiedPDFPlugin::handlePDFActionForAnnotation): Canonical link: https://commits.webkit.org/274546@main
- Loading branch information
Showing
5 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters