[webkit-changes] [WebKit/WebKit] 30a915: [UnifiedPDF] Going from Single Page to Two Pages d...
Simon Fraser
noreply at github.com
Tue Dec 19 10:31:07 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 30a915b5c386b5ecfc81b82be6d52072e8e6d108
https://github.com/WebKit/WebKit/commit/30a915b5c386b5ecfc81b82be6d52072e8e6d108
Author: Simon Fraser <simon.fraser at 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
More information about the webkit-changes
mailing list