[webkit-changes] [WebKit/WebKit] b64c3e: [UnifedPDF] Clean up annotation repaint code
Simon Fraser
noreply at github.com
Sat May 11 12:32:30 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b64c3ed8059502609a5dba0c79c6d84773362c4a
https://github.com/WebKit/WebKit/commit/b64c3ed8059502609a5dba0c79c6d84773362c4a
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2024-05-11 (Sat, 11 May 2024)
Changed paths:
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
Log Message:
-----------
[UnifedPDF] Clean up annotation repaint code
https://bugs.webkit.org/show_bug.cgi?id=274030
rdar://127915821
Reviewed by Tim Horton.
Future changes will require that we target repaints at pages, not just at the entire
document.
To support this, tighten up annotation repaint code to target a page (until the final
conversion to document coordinates). Implement a `pageIndexForAnnotation()` helper,
and add `setNeedsRepaintForAnnotation()`.
Implementing `revealAnnotation()` eliminates the final call site of `documentRectForAnnotation()`,
which can be removed.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::setNeedsRepaintForAnnotation):
(WebKit::UnifiedPDFPlugin::paintHoveredAnnotationOnPage):
(WebKit::UnifiedPDFPlugin::pageIndexForAnnotation const):
(WebKit::UnifiedPDFPlugin::pageIndexWithHoveredAnnotation const):
(WebKit::UnifiedPDFPlugin::repaintAnnotationsForFormField):
(WebKit::UnifiedPDFPlugin::startTrackingAnnotation):
(WebKit::UnifiedPDFPlugin::updateTrackedAnnotation):
(WebKit::UnifiedPDFPlugin::finishTrackingAnnotation):
(WebKit::UnifiedPDFPlugin::setActiveAnnotation):
(WebKit::UnifiedPDFPlugin::revealAnnotation):
(WebKit::UnifiedPDFPlugin::annotationRectsForTesting const):
(WebKit::UnifiedPDFPlugin::documentRectForAnnotation const): Deleted.
Canonical link: https://commits.webkit.org/278658@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list