[webkit-changes] [WebKit/WebKit] 907be2: [UnifiedPDF] UnifiedPDFPlugin should start produci...

Abrar Rahman Protyasha noreply at github.com
Wed Nov 29 18:34:02 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 907be252d130e3290d0876282300061f0051f2e7
      https://github.com/WebKit/WebKit/commit/907be252d130e3290d0876282300061f0051f2e7
  Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
  Date:   2023-11-29 (Wed, 29 Nov 2023)

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

  Log Message:
  -----------
  [UnifiedPDF] UnifiedPDFPlugin should start producing cursor updates
https://bugs.webkit.org/show_bug.cgi?id=265512
rdar://118925385

Reviewed by Simon Fraser.

This commit lays down the plumbing required to start generating cursor
updates from UnifiedPDFPlugin, and is written in anticipation of correct
hit testing to identify areas of interest under the mouse -- see
rdar://118550951. Note that this commit is not involved in actually
notifying the web page about cursor updates, since that was already
hooked up in 270863 at main.

We introduce the `PDFElementTypes` option set to indicate the presence
of interesting PDF elements under a given point. This mirrors the
`PDFAreaOfInterest` enumeration from PDFKit.

Furthermore, we update `UnifiedPDFPlugin::handleMouseEvent()` to reason
about mouseMove events by passing the event in question to
`UnifiedPDFPlugin::pdfElementTypesForPluginPoint()`. This function is not
implemented yet, but will be done soon, as mentioned above.

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

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




More information about the webkit-changes mailing list