-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unified PDF: HUD zoom buttons don't work on embedded pdfs
https://bugs.webkit.org/show_bug.cgi?id=270536 rdar://122034458 Reviewed by Abrar Rahman Protyasha. * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h: Document the scale factors. * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm: (WebKit::UnifiedPDFPlugin::ensureLayers): Always apply the "page scale" (which is actually determined by us, not the page) to the root layer, even for embedded plugins. (WebKit::UnifiedPDFPlugin::setScaleFactor): (WebKit::UnifiedPDFPlugin::performContextMenuAction): (WebKit::UnifiedPDFPlugin::zoomIn): (WebKit::UnifiedPDFPlugin::zoomOut): (WebKit::UnifiedPDFPlugin::resetZoom): (WebKit::UnifiedPDFPlugin::updateLayout): Factor setScaleFactor (for the UnifiedPDF-owned scale) out, and adopt it internally. (WebKit::UnifiedPDFPlugin::setPageScaleFactor): For actual page scale changes, bail if we are an embedded plugin. We don't want the PDF content to follow page scale changes for embeds, only for the main frame, where page scale and UnifiedPDF-scale are synchronized. * Source/WebKit/WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::setPageScaleFactor): (WebKit::PluginView::pluginScaleFactorDidChange): Factor pluginScaleFactorDidChange out of setPageScaleFactor so that we can call it from setScaleFactor in UnifiedPDFPlugin instead of having to round-trip through PluginView::setPageScaleFactor, which allows us to correctly identify UnifiedPDFPlugin-originated scales vs. changes to the main frame page scale. * Source/WebKit/WebProcess/Plugins/PluginView.h: Canonical link: https://commits.webkit.org/275712@main
- Loading branch information
1 parent
c0e1cd6
commit 2bcded2
Showing
4 changed files
with
52 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters