Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: da7921e81ff8dd117debc87f7f7fced226329357
      
https://github.com/WebKit/WebKit/commit/da7921e81ff8dd117debc87f7f7fced226329357
  Author: Abrar Rahman Protyasha <[email protected]>
  Date:   2026-01-15 (Thu, 15 Jan 2026)

  Changed paths:
    M Source/WebCore/platform/graphics/GraphicsLayer.cpp
    M Source/WebCore/platform/graphics/GraphicsLayer.h
    M Source/WebCore/platform/graphics/Path.h
    M Source/WebCore/platform/graphics/PathSegment.h
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
    M Source/WebCore/platform/graphics/ca/PlatformCALayer.h
    M Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.h
    M Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
    M Source/WebKit/Shared/RemoteLayerTree/LayerProperties.h
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTree.serialization.in
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm
    M 
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDiscretePresentationController.mm
    M 
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.h
    M 
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.mm
    M 
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFScrollingPresentationController.mm
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.mm

  Log Message:
  -----------
  [Unified PDF] [iOS] Reintroduce shadows under the page background layer
https://bugs.webkit.org/show_bug.cgi?id=288384
rdar://146036887

Reviewed by Tim Horton.

Page background shadows were previously disabled on iOS (291001@main)
because our naive drop shadow implementation required 4 offscreen passes
of the CALayers in question. In this patch, we restore page background
shadows in UnifiedPDFPlugin, primarily by setting an explicit shadow
path on the platform layers. Note that the we do this in conjunction to
the original drop shadow filter operation approach, since that mechanism
sets the appropriate shadow radius/color/offset on the platform layers.

Doing so necessitated introducing support to set shadow paths in general
on a WebCore::GraphicsLayer object. The majority of this patch is simple
plumbing that teaches WebCore/platform/graphics how to set/update shadow
paths.

* Source/WebCore/platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::setShadowPath):
* Source/WebCore/platform/graphics/GraphicsLayer.h:
* Source/WebCore/platform/graphics/Path.h:
* Source/WebCore/platform/graphics/PathSegment.h:
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h:
* Source/WebCore/platform/graphics/ca/PlatformCALayer.h:
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::PlatformCALayerCocoa::clone const):
(WebCore::PlatformCALayerCocoa::shadowPath const):
(WebCore::PlatformCALayerCocoa::setShadowPath):
* Source/WebKit/Shared/RemoteLayerTree/LayerProperties.h:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTree.serialization.in:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
(WebKit::dumpChangedLayers):
* 
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDiscretePresentationController.mm:
(WebKit::PDFDiscretePresentationController::updateLayersOnLayoutChange):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.mm:
(WebKit::PDFPresentationController::shadowPathForLayer const):
(WebKit::PDFPresentationController::makePageContainerLayer):
(WebKit::PDFPresentationController::shouldAddPageBackgroundLayerShadow const): 
Deleted.
* 
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFScrollingPresentationController.mm:
(WebKit::PDFScrollingPresentationController::updatePageBackgroundLayers):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.mm:
(WebKit::PlatformCALayerRemote::shadowPath const):
(WebKit::PlatformCALayerRemote::setShadowPath):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to