Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 15ec60645616ffbb888ccab283636ce395d39be2
      
https://github.com/WebKit/WebKit/commit/15ec60645616ffbb888ccab283636ce395d39be2
  Author: Tim Horton <[email protected]>
  Date:   2024-02-16 (Fri, 16 Feb 2024)

  Changed paths:
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
    M Source/WebKit/WebProcess/Plugins/PluginView.cpp
    M Source/WebKit/WebProcess/Plugins/PluginView.h
    M Source/WebKit/WebProcess/WebPage/FindController.cpp
    M Source/WebKit/WebProcess/WebPage/FindController.h
    M Source/WebKit/WebProcess/WebPage/ios/FindControllerIOS.mm

  Log Message:
  -----------
  UnifiedPDF: Show find indicator for the current match
https://bugs.webkit.org/show_bug.cgi?id=269559
rdar://119632525

Reviewed by Simon Fraser.

* Source/WebKit/WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::textIndicatorForSelection):
* Source/WebKit/WebProcess/Plugins/PluginView.h:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h:
(WebKit::PDFPluginBase::textIndicatorForSelection):
Allow PDF plugins to vend text indicators for the current selection, for
FindController's use (and hopefully other things later).

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::paintPDFContent):
Make it possible to paint only the foreground of the PDF.

(WebKit::UnifiedPDFPlugin::convertFromDocumentToContents const):
Add a rect version of document->contents and clean up the point version
slightly, though with no behavior change.

(WebKit::UnifiedPDFPlugin::textIndicatorForSelection):
Generate a TextIndicatorData manually (because TextIndicator only knows
how to deal in DOM ranges) for the current PDF selection.

(WebKit::UnifiedPDFPlugin::showDefinitionForAttributedString):
Leave a comment about potential future code sharing.

* Source/WebKit/WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
(WebKit::FindController::updateFindIndicator):
Allow main frame PDF plugins to also desire and install find indicators.

(WebKit::FindController::indicateFindMatch):
(WebKit::FindController::showFindIndicatorInSelection):
(WebKit::FindController::deviceScaleFactorDidChange):
(WebKit::FindController::redraw):
(WebKit::FindController::didScrollAffectingFindIndicatorPosition):
Stop passing the frame into updateFindIndicator, since it can work it out
itself, and that allows us to put the plugin deferral code in one place,
like it is in the rest of FindController.

* Source/WebKit/WebProcess/WebPage/FindController.h:

Canonical link: https://commits.webkit.org/274875@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

Reply via email to