[webkit-changes] [WebKit/WebKit] aa53cb: [UnifiedPDF] Move the ShouldUpdateAutoSizeScale st...

Simon Fraser noreply at github.com
Thu Mar 28 18:09:26 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: aa53cbad39408afbc5434f6d2a11f790c221a437
      https://github.com/WebKit/WebKit/commit/aa53cbad39408afbc5434f6d2a11f790c221a437
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2024-03-28 (Thu, 28 Mar 2024)

  Changed paths:
    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.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm

  Log Message:
  -----------
  [UnifiedPDF] Move the ShouldUpdateAutoSizeScale state out of PDFDocumentLayout
https://bugs.webkit.org/show_bug.cgi?id=271851
rdar://125580423

Reviewed by Sammy Gill.

It's surprising that the behavior of PDFDocumentLayout in terms of
setting m_scale after layout is stateful, based on `m_autoSizeState`.
Move this statefulness to UnifiedPDFPlugin where it makes more sense.

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.h:
(WebKit::PDFDocumentLayout::setShouldUpdateAutoSizeScale): Deleted.
(WebKit::PDFDocumentLayout::shouldUpdateAutoSizeScale const): Deleted.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.mm:
(WebKit::PDFDocumentLayout::updateLayout):
(WebKit::PDFDocumentLayout::layoutPages):
(WebKit::PDFDocumentLayout::layoutSingleColumn):
(WebKit::PDFDocumentLayout::layoutTwoUpColumn):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::setPageScaleFactor):
(WebKit::UnifiedPDFPlugin::updateLayout):
(WebKit::UnifiedPDFPlugin::contextMenuItem const):
(WebKit::UnifiedPDFPlugin::performContextMenuAction):
(WebKit::UnifiedPDFPlugin::zoomIn):
(WebKit::UnifiedPDFPlugin::zoomOut):

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



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


More information about the webkit-changes mailing list