Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: dceee48d7d3f9528cc05346a2a765fd7588485bc https://github.com/WebKit/WebKit/commit/dceee48d7d3f9528cc05346a2a765fd7588485bc Author: Sammy Gill <sammy.g...@apple.com> Date: 2024-02-01 (Thu, 01 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] 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 _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes