[webkit-changes] [WebKit/WebKit] 511fa1: [Unified PDF] Using down arrow to scroll after zoo...

Aditya Keerthi noreply at github.com
Tue Oct 22 17:22:59 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 511fa1c3b375af8a5eac34f1d336fe16283bd2f6
      https://github.com/WebKit/WebKit/commit/511fa1c3b375af8a5eac34f1d336fe16283bd2f6
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2024-10-22 (Tue, 22 Oct 2024)

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

  Log Message:
  -----------
  [Unified PDF] Using down arrow to scroll after zooming in when in discrete single page mode moves to next page
https://bugs.webkit.org/show_bug.cgi?id=281900
rdar://137608233

Reviewed by Abrar Rahman Protyasha.

Currently, using the arrow keys while in discrete single page mode always
attempts to change the current page. Prior to Unified PDF, using arrow keys
when the page is scrollable (zoomed in) would not change the page, and would
instead scroll around the current page.

This patch restores the pre-Unified PDF behavior, using a non-zero
`maximumScrollPosition` as a proxy to detect scrollability. Additionally
horizontal and vertical scrollability are considered separately, matching the
old behavior.

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDiscretePresentationController.mm:
(WebKit::PDFDiscretePresentationController::handleKeyboardEvent):
(WebKit::PDFDiscretePresentationController::handleKeyboardEventForPageNavigation):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:

Remove dead code.

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::animatedScrollDidEnd): Deleted.

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list