[webkit-changes] [WebKit/WebKit] f8b599: [UnifiedPDF] [iOS] Zooming in through MobileSafari...

Abrar Rahman Protyasha noreply at github.com
Wed Jan 15 01:41:11 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f8b5996fa7be25f5d5d08ccc10a678426d95d5ad
      https://github.com/WebKit/WebKit/commit/f8b5996fa7be25f5d5d08ccc10a678426d95d5ad
  Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
  Date:   2025-01-15 (Wed, 15 Jan 2025)

  Changed paths:
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
    M Source/WebKit/WebProcess/Plugins/PluginView.cpp
    M Source/WebKit/WebProcess/Plugins/PluginView.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp

  Log Message:
  -----------
  [UnifiedPDF] [iOS] Zooming in through MobileSafari's page format menu pushes plugin to left corner
https://bugs.webkit.org/show_bug.cgi?id=285717
rdar://140269285

Reviewed by Sammy Gill.

MobileSafari's page format menu applies scale adjustments through
-[WKWebView _setViewScale:]. With PDFHVC, these scale changes were
dropped entirely from the custom content view, and thus never had any
effect on the scale at which a PDF document was presented in.

While our intention with the plugin is to correctly respect
page format menu scale adjustments, the plugin's zooming behavior (on
iOS) is currently fighting against main farme zooming, resulting in the
symptom reported in the bug title. This patch introduces a behavior fork
for iOS family where we continue dropping view scale adjustments, such
that MobileSafari page format menu interactions are no-ops. This will be
undone after we rearchitect zooming to be handled by the main frame (and
not by the plugin).

* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::documentEditingContext const):
(WebKit::UnifiedPDFPlugin::pageToRootView const):
* Source/WebKit/WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::clearSelection):
(WebKit::PluginView::linkURLAndBoundsAtPoint const):
* Source/WebKit/WebProcess/Plugins/PluginView.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didScalePage):

Canonical link: https://commits.webkit.org/288923@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