Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a2247463abb0064a8213ab4d24a23c9d38378514
      
https://github.com/WebKit/WebKit/commit/a2247463abb0064a8213ab4d24a23c9d38378514
  Author: Sammy Gill <[email protected]>
  Date:   2024-02-23 (Fri, 23 Feb 2024)

  Changed paths:
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm

  Log Message:
  -----------
  [UnifiedPDF] PDFPluginChoiceAnnotations have incorrect font size.
https://bugs.webkit.org/show_bug.cgi?id=269923
rdar://123119103

Reviewed by Simon Fraser.

The PDFPluginChoiceAnnotation sets its font size
based on the size of the font in the underlying
annotation within the document and then scales it
based on its scale factor. The UnifiedPDFPlugin's
scale factor is its zoom scale factor, but we
could also have scaled the document to fit in the
available width. PDFPluginTextAnnotations take
into consideration both scale factors so we should
do the same here.

In order to do this more cleanly, I introduced
contentScaleFactor on the plugins. For the legacy
PDF plugin this is just the same as its
scaleFactor, but for the UnifiedPDFPlugin this is
both the document fitting scale and the zoom
scale (it seems like this is what the legacy
plugin considers to be its scaleFactor as well).

* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::contentScaleFactor const):
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
(WebKit::PDFPluginChoiceAnnotation::updateGeometry):
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::PDFPluginTextAnnotation::updateGeometry):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::contentScaleFactor const):
(WebKit::UnifiedPDFPlugin::updateSnapOffsets):
(WebKit::UnifiedPDFPlugin::searchInDictionary):

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