[webkit-changes] [WebKit/WebKit] a83a06: [UnifiedPDF] Data detector highlight painting shou...
Abrar Rahman Protyasha
noreply at github.com
Sat Mar 16 01:27:00 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a83a068ce4deea7c97d93f22b98084197cf3367f
https://github.com/WebKit/WebKit/commit/a83a068ce4deea7c97d93f22b98084197cf3367f
Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
Date: 2024-03-16 (Sat, 16 Mar 2024)
Changed paths:
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDataDetectorOverlayController.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDataDetectorOverlayController.mm
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
Log Message:
-----------
[UnifiedPDF] Data detector highlight painting should be optimized by specifying dirty rects
https://bugs.webkit.org/show_bug.cgi?id=271091
rdar://124719471
Reviewed by Sammy Gill.
Currently we paint the entire page overlay when we think a data detector
highlight needs to be painted. Instead, we should specify which rects
(in content space) we want to have painted. This patch:
1. Keeps track of both the active DDHighlight as well as the
PDFDataDetectorItem it's paired to. This allows us to be able to read
the associated PDF selection object.
1. Keeps track of the "just-deactivated" stale highlight data. This
allows us to ask for the stale data to be (re)painted away, if
needed.
2. Introduces a helper utility on UnifiedPDFPlugin that returns the
content space bounds for a PDF Selection.
3. Queries said utility with the selections for both the active and the
stale highlight, painting the resulting rects as necessary.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDataDetectorOverlayController.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDataDetectorOverlayController.mm:
(WebKit::PDFDataDetectorOverlayController::handleMouseEvent):
(WebKit::PDFDataDetectorOverlayController::didInvalidateHighlightOverlayRects):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::selectionBoundsAcrossDocumentInContentSpace const):
Canonical link: https://commits.webkit.org/276239@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