Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9620f851dbe8b257dc5acf22c7f002f12b7210e1
      
https://github.com/WebKit/WebKit/commit/9620f851dbe8b257dc5acf22c7f002f12b7210e1
  Author: Aditya Keerthi <[email protected]>
  Date:   2026-02-09 (Mon, 09 Feb 2026)

  Changed paths:
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/UnifiedPDFTests.mm

  Log Message:
  -----------
  [iOS] PDF scrolls to bottom after changing display mode to two-up
https://bugs.webkit.org/show_bug.cgi?id=307387
rdar://170009591

Reviewed by Abrar Rahman Protyasha.

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
(WebKit::UnifiedPDFPlugin::convertUp const):

On iOS, where the plugin is sized to fit the content, 
`CoordinateSpace::Contents`
and `CoordinateSpace::ScrolledContents` are equivalent. However, the method
to convert up applies an additional offset. This results in an incorrect scroll
position when switching display modes, as the position is attempted to be
preserved using `UnifiedPDFPlugin::revealPointInPage` and `convertUp`.

Align with the `convertDown` method, which does not transform between `Contents`
and `ScrolledContents` when the plugin is sized to fit the content.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/UnifiedPDFTests.mm:
(TestWebKitAPI::UNIFIED_PDF_TEST):

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



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

Reply via email to