Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3aad301970ab258e0c20ac22b43ea2c271897ca6
https://github.com/WebKit/WebKit/commit/3aad301970ab258e0c20ac22b43ea2c271897ca6
Author: Abrar Rahman Protyasha <[email protected]>
Date: 2024-03-15 (Fri, 15 Mar 2024)
Changed paths:
M
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDataDetectorOverlayController.h
M
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDataDetectorOverlayController.mm
Log Message:
-----------
[UnifiedPDF] Data detector page overlay tiles should not be repainted when
there is no active highlight
https://bugs.webkit.org/show_bug.cgi?id=271074
rdar://124707729
Reviewed by Simon Fraser.
Currently, we unconditionally call PageOverlay::setNeedsDisplay()
whenever we scroll the PDF plugin. This is incredibly inefficient
because we're repainting all the tiles even when there is no need to do
so.
This patch teaches teh data detector overlay controller to better reason
about when a repaint is necessary, and only calls setNeedsDisplay() when
those conditions are met. Namely, we no longer repaint if there is no
active highlight or if the active highlight instance has not changed.
In a future patch, we will further optimize this by clipping the repaint
to only the bounds of the active (and just-deactivated) highlight.
*
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDataDetectorOverlayController.h:
*
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDataDetectorOverlayController.mm:
(WebKit::PDFDataDetectorOverlayController::handleMouseEvent):
(WebKit::PDFDataDetectorOverlayController::didInvalidateHighlightOverlayRects):
Canonical link: https://commits.webkit.org/276200@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes