Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 18970a1eb04af74556cf9413f2363550ac2aee61 https://github.com/WebKit/WebKit/commit/18970a1eb04af74556cf9413f2363550ac2aee61 Author: Abrar Rahman Protyasha <a_protya...@apple.com> Date: 2024-05-25 (Sat, 25 May 2024)
Changed paths: A LayoutTests/compositing/plugins/pdf/pdf-in-embed-with-root-page-zoom-expected.txt A LayoutTests/compositing/plugins/pdf/pdf-in-embed-with-root-page-zoom.html M LayoutTests/platform/mac-wk2/TestExpectations A LayoutTests/resources/image.pdf M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm Log Message: ----------- [UnifiedPDF] Embedded PDFs are blurry when zooming the containing page https://bugs.webkit.org/show_bug.cgi?id=274565 rdar://128290750 Reviewed by Simon Fraser. In 275712@main, we unconditionally allow the plugin's root layer to apply page scale. This allows any embed plugin's internal scale change to be reflected in the tiled backing. However, that change breaks the assumption in GraphicsLayer that there's a single layer applying page scale. This assumption meant that when recursively commiting changes in a layer tree, GraphicsLayer only selects (and propagates) scale factor from the furthest descendant layer that applies page scale. We see this aligning with the behavior that regardless of root page scaling, all painted tiles only reflect the embed plugin's scale. To fix this, we move away from our previous assumption of a single layer applying page scale. Instead, as we traverse the layer tree, we maintain a combined page scale representing the product of the scale factor of each layer that applies page scale. This would not only account for differences between root page scale and embed plugin scale, but also any intermediate CSS transform scale. * LayoutTests/compositing/plugins/pdf/pdf-in-embed-with-root-page-zoom-expected.txt: Added. * LayoutTests/compositing/plugins/pdf/pdf-in-embed-with-root-page-zoom.html: Added. * LayoutTests/platform/mac-wk2/TestExpectations: * LayoutTests/resources/image.pdf: Added. * Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::computePositionRelativeToBase const): (WebCore::GraphicsLayerCA::recursiveCommitChanges): * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm: (WebKit::UnifiedPDFPlugin::setPageScaleFactor): Canonical link: https://commits.webkit.org/279314@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes