[webkit-changes] [WebKit/WebKit] 1d5ea2: [UnifiedPDF] Clean up selection repaint code
Simon Fraser
noreply at github.com
Wed May 22 08:44:51 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1d5ea2d61eff45027240a20a5561f6a393c7ad13
https://github.com/WebKit/WebKit/commit/1d5ea2d61eff45027240a20a5561f6a393c7ad13
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2024-05-22 (Wed, 22 May 2024)
Changed paths:
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
Log Message:
-----------
[UnifiedPDF] Clean up selection repaint code
https://bugs.webkit.org/show_bug.cgi?id=274499
rdar://128505796
Reviewed by Abrar Rahman Protyasha.
Selection repaint currently works by computing a vector of rectangles for
the selection (and possibly the old selection too), and then repainting them.
This loses information about which page the rect belongs to, and for future
discrete mode changes we'll need this.
So repaint selections by enumerating their page coverage. If we have to
repaint the old selection, just pass it directly to `repaintOnSelectionChange()`.
Rename that method since it was called for selection repaint in general,
not just on active state changes.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::windowActivityDidChange):
(WebKit::UnifiedPDFPlugin::repaintOnSelectionChange):
(WebKit::UnifiedPDFPlugin::setCurrentSelection):
(WebKit::UnifiedPDFPlugin::setNeedsRepaintInDocumentRects): Deleted.
(WebKit::UnifiedPDFPlugin::boundsForSelection const): Deleted.
(WebKit::UnifiedPDFPlugin::repaintOnSelectionActiveStateChangeIfNeeded): Deleted.
Canonical link: https://commits.webkit.org/279127@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