Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1397b00aa951d4921c301c775c39c59a0db3fc89
      
https://github.com/WebKit/WebKit/commit/1397b00aa951d4921c301c775c39c59a0db3fc89
  Author: Aditya Keerthi <[email protected]>
  Date:   2026-05-01 (Fri, 01 May 2026)

  Changed paths:
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.mm
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm

  Log Message:
  -----------
  [Unified PDF] Add an internal setting to align the trailing page of a PDF in 
two-up display to the left edge
https://bugs.webkit.org/show_bug.cgi?id=313761
rdar://175955315

Reviewed by Abrar Rahman Protyasha.

Currently, when PDFs are displayed in two-up, and there are an odd number of
pages, the last page is centered.

This patch adds an internal setting to make the alignment of the last odd page
match the alignment of the first page.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.h:
(WebKit::PDFDocumentLayout::setShouldLeftAlignTrailingTwoUpPage):
(WebKit::PDFDocumentLayout::shouldLeftAlignTrailingTwoUpPage const):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.mm:
(WebKit::PDFDocumentLayout::layoutRow):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::updateLayout):

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



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

Reply via email to