[webkit-changes] [WebKit/WebKit] a8debe: [UnifiedPDF] [visionOS] PDF opening as thumbnail a...

Abrar Rahman Protyasha noreply at github.com
Fri Dec 13 08:49:24 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a8debe65e40785cdfd2088195409132d66021e9d
      https://github.com/WebKit/WebKit/commit/a8debe65e40785cdfd2088195409132d66021e9d
  Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
  Date:   2024-12-13 (Fri, 13 Dec 2024)

  Changed paths:
    M Source/WebCore/page/ViewportConfiguration.cpp
    M Source/WebCore/page/ViewportConfiguration.h

  Log Message:
  -----------
  [UnifiedPDF] [visionOS] PDF opening as thumbnail and pushed to the corner 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



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