Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 30a915b5c386b5ecfc81b82be6d52072e8e6d108 https://github.com/WebKit/WebKit/commit/30a915b5c386b5ecfc81b82be6d52072e8e6d108 Author: Simon Fraser <simon.fra...@apple.com> Date: 2023-12-19 (Tue, 19 Dec 2023)
Changed paths: M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm Log Message: ----------- [UnifiedPDF] Going from Single Page to Two Pages doesn't reset the scroll position https://bugs.webkit.org/show_bug.cgi?id=266610 rdar://119520473 Reviewed by Tim Horton. When changing from the single page to the 2-page view in the UnifiedPDF viewer, the document can get shorter, so we may have to adjust the scroll position. Do this after PDF layout. In order to set the scroll position, we need to implement `requestScrollToPosition()` to talk to the relevant ScrollingCoordinator. Not testable because you can't change the view mode in a test. * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm: (WebKit::UnifiedPDFPlugin::updateScrollingExtents): (WebKit::UnifiedPDFPlugin::requestScrollToPosition): (WebKit::toWebCoreCursorType): Canonical link: https://commits.webkit.org/272279@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes