Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9e6c27d881d0057a37b86cc3062bd968c12b33b4
      
https://github.com/WebKit/WebKit/commit/9e6c27d881d0057a37b86cc3062bd968c12b33b4
  Author: Sammy Gill <[email protected]>
  Date:   2024-02-02 (Fri, 02 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/PDFPluginAnnotation.mm
    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

  Log Message:
  -----------
  [UnifiedPDF] Text annotation HTML inputs do not get repositioned or scaled 
when zooming
https://bugs.webkit.org/show_bug.cgi?id=268360
rdar://121907350

Reviewed by Tim Horton.

UnifiedPDFPlugin was incorrectly returning the annotation bounds in
document space when the PDFPluginAnnotation was expecting the bounds in
plugin view space. Fix this by providing the bounds in the correct coordinate
space so that it can update its geomtetry correctly. This requires
that PDFPluginAnnotation stops subtracting out the scroll positions
since this is part of the document to plugin space translation.

The size of the annotation should be determined with both the document
fitting sale and the zoom scale.

Also rename boundsForannotation to pluginBoundsForAnnotation to make it
clear what coordinate space this function is returning geometry in.

* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::pluginBoundsForAnnotation const):
(WebKit::PDFPlugin::boundsForAnnotation const): Deleted.
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
(WebKit::PDFPluginAnnotation::updateGeometry):
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::convertFromDocumentToPlugin const):
(WebKit::UnifiedPDFPlugin::pluginBoundsForAnnotation const):
(WebKit::UnifiedPDFPlugin::boundsForAnnotation const): Deleted.

Canonical link: https://commits.webkit.org/274038@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to