[webkit-changes] [WebKit/WebKit] 1ba1f5: [UnifiedPDF] Pinch-to-zoom starts zooming from ori...

Abrar Rahman Protyasha noreply at github.com
Mon Feb 5 14:33:36 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1ba1f5ef79b5665f85d7b57acd3384cd64ae8179
      https://github.com/WebKit/WebKit/commit/1ba1f5ef79b5665f85d7b57acd3384cd64ae8179
  Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
  Date:   2024-02-05 (Mon, 05 Feb 2024)

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

  Log Message:
  -----------
  [UnifiedPDF] Pinch-to-zoom starts zooming from original scale factor after zooming through the context menu
https://bugs.webkit.org/show_bug.cgi?id=268764
rdar://122327672

Reviewed by Simon Fraser.

We fail to inform the UIP about a change in the page scale factor
through context menu actions, so when we try a gesture that sends the
PDF plugin a scale factor from the UIP, we receive out-dated
information.

This patch addresses the bug by calling PluginView::setPageScaleFactor,
which sends the PluginScaleFactorDidChange and PluginZoomFactorDidChange
IPC messages to the UIP, and then also calls into
UnifiedPDFPlugin::setPageScaleFactor.

Finally, we move the IPC calls in PluginView::setPageScaleFactor to
after the plugin view initialized check. This ensures that we don't
communicate a page scale factor change when one hasn't happened.

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::performContextMenuAction):
(WebKit::UnifiedPDFPlugin::zoomIn):
(WebKit::UnifiedPDFPlugin::zoomOut):
* Source/WebKit/WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setPageScaleFactor):

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




More information about the webkit-changes mailing list