-
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] Support radio buttons, checkboxes, and choice annotations.
https://bugs.webkit.org/show_bug.cgi?id=268196 rdar://problem/121692745 Reviewed by Simon Fraser. Choice annotations are similar to text widget annotations, which we already support, in that they use a PDFPluginAnnotation to support user interaction and just commit the result to the underlying annotation afterwards. Radio buttons and checkboxes involve slightly more work as we must keep track of the mouse as the user interacts with them. Holding the left mouse button on them will create a highlight effect indicating that this action is occuring and releasing it will trigger the effect of the checkbox/radio button. If the mouse is dragged off while the left mouse button is held down on it, then the highlight disappears and no effect should occur when the button is released. In order to accomplish this, we need to start tracking the annotation that is being interacted with through various mouse events. m_trackedAnnotation was added for this purpose and is updated through the various events. * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm: (WebKit::UnifiedPDFPlugin::annotationForRootViewPoint const): (WebKit::UnifiedPDFPlugin::handleMouseEvent): (WebKit::UnifiedPDFPlugin::startAnnotationTracking): (WebKit::UnifiedPDFPlugin::finishAnnotationTracking): (WebKit::UnifiedPDFPlugin::handleMouseDraggedOffTrackedAnnotation): Canonical link: https://commits.webkit.org/273921@main
- Loading branch information
Showing
2 changed files
with
91 additions
and
6 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