Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UnifiedPDF] [visionOS] PDF opening as thumbnail and pushed to the co…
…rner of Safari https://bugs.webkit.org/show_bug.cgi?id=284479 rdar://140186673 Reviewed by Wenson Hsieh. Safari on visionOS applies a minimum effective device width (mEDW) on the web view. This makes for a very odd layout size, which results in the PDF plugin being displayed in a tiny rect. Unlike regular web content, PDF content does not reflow, and hence does not require laying out a page at a given minimum width. As such, this patch chooses to disregard the mEDW when the viewport is configured for a plugin document. We do so by adding `shouldHonorMinimumEffectiveDeviceWidthFromClient` to ViewportConfigration::Parameters, and only setting that to false for plugin document parameters. This option is consulted when we consider the new effective width when the view layout size is updated (as part of mEDW application), and is also consulted during regular viewport configuration updates where we reset mEDW to 0 if the option is set. * Source/WebCore/page/ViewportConfiguration.cpp: (WebCore::ViewportConfiguration::setViewLayoutSize): (WebCore::ViewportConfiguration::pluginDocumentParameters): (WebCore::ViewportConfiguration::updateConfiguration): (WebCore::operator<<): Add a couple of missing flags in text stream dumping output. * Source/WebCore/page/ViewportConfiguration.h: Canonical link: https://commits.webkit.org/287797@main
- Loading branch information