Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b1cdf45401ee0798e8c1a708f6b363db559b2d3b
https://github.com/WebKit/WebKit/commit/b1cdf45401ee0798e8c1a708f6b363db559b2d3b
Author: Tim Horton <[email protected]>
Date: 2024-08-12 (Mon, 12 Aug 2024)
Changed paths:
M
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDiscretePresentationController.mm
Log Message:
-----------
[Unified PDF] Switching presentation mode from discrete to continuous makes
the PDF jump forward one page
https://bugs.webkit.org/show_bug.cgi?id=278002
rdar://132882103
Reviewed by Abrar Rahman Protyasha.
The discrete presentation controller's implementation of
pdfPositionForCurrentView
doesn't fill in the position parameter of the VisiblePDFPosition.
When moving from discrete mode to continuous mode, this means we always scroll
to (0,0), which is the bottom left corner of the PDF. Since we put this at the
top left
corner of the view, it appears that we've scrolled to the next page.
Fill in the position parameter, by converting the top left corner of the
viewport
into page space.
The transition in the other direction remains imperfect, because of the FIXME
that I've left in PDFDiscretePresentationController::restorePDFPosition. We
can fix that in a future patch.
*
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDiscretePresentationController.mm:
(WebKit::PDFDiscretePresentationController::pdfPositionForCurrentView const):
Canonical link: https://commits.webkit.org/282155@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes