[webkit-changes] [WebKit/WebKit] f275b6: [UnifiedPDF] Hit-testing is broken in 2-up mode

Simon Fraser noreply at github.com
Tue Jan 30 17:56:18 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f275b68006b0787353414b953310cdcc56682501
      https://github.com/WebKit/WebKit/commit/f275b68006b0787353414b953310cdcc56682501
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm

  Log Message:
  -----------
  [UnifiedPDF] Hit-testing is broken in 2-up mode
https://bugs.webkit.org/show_bug.cgi?id=268394
rdar://121941334

Reviewed by Tim Horton.

`nearestPageIndexForDocumentPoint()` had a `notImplemented()` for two-up display.
It turns out that we don't need the concept of "nearest" page, so just change
the implementation to `pageBounds.contains(point)` for all layout modes.
Change the naming in `pdfElementTypesForPluginPoint()` to remove the "maybe" also.

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::pageIndexForDocumentPoint const):
(WebKit::UnifiedPDFPlugin::pdfElementTypesForPluginPoint const):
(WebKit::UnifiedPDFPlugin::handleMouseEvent):
(WebKit::UnifiedPDFPlugin::nearestPageIndexForDocumentPoint const): Deleted.

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




More information about the webkit-changes mailing list