[webkit-changes] [WebKit/WebKit] 808bcd: [UnifiedPDF] Implement two-up display mode
Simon Fraser
noreply at github.com
Mon Oct 2 09:06:45 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 808bcd5e0a980840b1dd1fcbc6787aa654c79cb8
https://github.com/WebKit/WebKit/commit/808bcd5e0a980840b1dd1fcbc6787aa654c79cb8
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-10-02 (Mon, 02 Oct 2023)
Changed paths:
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.mm
Log Message:
-----------
[UnifiedPDF] Implement two-up display mode
https://bugs.webkit.org/show_bug.cgi?id=262454
rdar://116296737
Reviewed by Dan Glastonbury.
Implement two-up display mode, which displays pairs of pages side-by-side.
In this mode, the height of the pair of pages is the larger of the two heights, and pages with
unequal heights are vertically centered in the row. If there is a single page on the last row, it's
centered (which is also the case for a single page PDF).
Have `PDFDocumentLayout::updateLayout()` keep track of the width of page pairs when necessary, which
is passed to `layoutTwoUpColumn()`.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.mm:
(WebKit::PDFDocumentLayout::updateLayout):
(WebKit::PDFDocumentLayout::layoutPages):
(WebKit::PDFDocumentLayout::layoutSingleColumn):
(WebKit::PDFDocumentLayout::layoutTwoUpColumn):
Canonical link: https://commits.webkit.org/268733@main
More information about the webkit-changes
mailing list