Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e55d2e52f72128530e13f647633807cb30e7d4b6
https://github.com/WebKit/WebKit/commit/e55d2e52f72128530e13f647633807cb30e7d4b6
Author: Antti Koivisto <[email protected]>
Date: 2025-04-01 (Tue, 01 Apr 2025)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/drop-shadow-currentcolor-inheritance-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/drop-shadow-currentcolor-inheritance.html
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/values/filter-effects/CSSFilterFunctionDescriptor.h
M Source/WebCore/platform/animation/AcceleratedEffect.cpp
M Source/WebCore/platform/animation/AnimationUtilities.h
M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
M Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm
M Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
M Source/WebCore/platform/graphics/filters/FilterOperation.cpp
M Source/WebCore/platform/graphics/filters/FilterOperation.h
M Source/WebCore/platform/graphics/filters/FilterOperations.cpp
M Source/WebCore/platform/graphics/filters/FilterOperations.h
M Source/WebCore/rendering/CSSFilter.cpp
M Source/WebCore/rendering/RenderLayer.cpp
M Source/WebCore/rendering/RenderLayerBacking.cpp
A Source/WebCore/rendering/style/DropShadowFilterOperationWithStyleColor.cpp
A Source/WebCore/rendering/style/DropShadowFilterOperationWithStyleColor.h
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/style/StyleInterpolation.cpp
M Source/WebCore/style/StyleInterpolationContext.h
M Source/WebCore/style/StyleInterpolationFunctions.h
M Source/WebCore/style/StyleResolver.cpp
M Source/WebCore/style/values/color/StyleColor.cpp
M Source/WebCore/style/values/color/StyleColor.h
M Source/WebCore/style/values/filter-effects/StyleDropShadowFunction.cpp
M Source/WebCore/style/values/filter-effects/StyleDropShadowFunction.h
M Source/WebCore/style/values/filter-effects/StyleFilterProperty.cpp
Log Message:
-----------
Use-time currentcolor resolution in drop-shadow()
https://bugs.webkit.org/show_bug.cgi?id=290835
rdar://148317306
Reviewed by Sam Weinig.
Fix the last case where we resolve currentcolor at computed-value time.
Besides fixing the inheritance behavior this allows cleaning up various awkward
leftovers in the codebase.
To achieve this without a layer violation we add a new FilterOperation type
DropShadowFilterOperationWithStyleColor
that lives outside the platform layer. Drop-shadow filters in RenderStyle use
this type. It gets resolved and converted to
DropShadowFilterOperation if it needs to passed to the platform layers/IPC.
*
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/drop-shadow-currentcolor-inheritance-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/drop-shadow-currentcolor-inheritance.html:
Added.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/animation/AnimationUtilities.h:
(WebCore::BlendingContext::BlendingContext):
Include current from/to colors so we can resolve currentcolor everywhere in
blending code.
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
(WebCore::keyValueCountForFilter):
(WebCore::PlatformCAFilters::presentationModifiers):
(WebCore::PlatformCAFilters::updatePresentationModifiers):
(WebCore::PlatformCAFilters::setFiltersOnLayer):
* Source/WebCore/platform/graphics/filters/FilterOperation.cpp:
(WebCore::DropShadowFilterOperationBase::nonColorEqual const):
(WebCore::DropShadowFilterOperationBase::isIdentity const):
(WebCore::DropShadowFilterOperationBase::outsets const):
(WebCore::DropShadowFilterOperation::operator== const):
(WebCore::DropShadowFilterOperation::blend):
(WebCore::DropShadowFilterOperation::dump const):
(WebCore::operator<<):
(WebCore::DropShadowFilterOperation::isIdentity const): Deleted.
(WebCore::DropShadowFilterOperation::outsets const): Deleted.
* Source/WebCore/platform/graphics/filters/FilterOperation.h:
(WebCore::FilterOperation::isDropShadowBase const):
(WebCore::FilterOperation::requiresRepaintForCurrentColorChange const):
* Source/WebCore/platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::requiresRepaintForCurrentColorChange const):
* Source/WebCore/platform/graphics/filters/FilterOperations.h:
* Source/WebCore/rendering/CSSFilter.cpp:
(WebCore::createDropShadowEffect):
(WebCore::CSSFilter::buildFilterFunctions):
Map to DropShadowFilterOperationWithStyleColor
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateFiltersAfterStyleChange):
Reset cached filter on currentcolor change if needed.
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::resolveFilters):
(WebCore::RenderLayerBacking::updateFilters):
(WebCore::RenderLayerBacking::updateBackdropFilters):
Convert to DropShadowFilterOperation if needed.
* Source/WebCore/rendering/style/DropShadowFilterOperationWithStyleColor.cpp:
Added.
(WebCore::Style::DropShadowFilterOperationWithStyleColor::createEquivalentWithResolvedColor):
(WebCore::Style::DropShadowFilterOperationWithStyleColor::operator== const):
(WebCore::Style::DropShadowFilterOperationWithStyleColor::blend):
(WebCore::Style::DropShadowFilterOperationWithStyleColor::dump const):
* Source/WebCore/rendering/style/DropShadowFilterOperationWithStyleColor.h:
Added.
(WebCore::Style::DropShadowFilterOperationWithStyleColor::create):
(WebCore::Style::DropShadowFilterOperationWithStyleColor::styleColor const):
(WebCore::Style::DropShadowFilterOperationWithStyleColor::DropShadowFilterOperationWithStyleColor):
The new style-only filter operation type is in the Style namespace.
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayerRepaint const):
* Source/WebCore/style/StyleInterpolation.cpp:
(WebCore::Style::Interpolation::interpolateStandardProperty):
(WebCore::Style::Interpolation::interpolateCustomProperty):
* Source/WebCore/style/StyleInterpolationContext.h:
(WebCore::Style::Interpolation::Context::Context):
* Source/WebCore/style/StyleInterpolationFunctions.h:
(WebCore::Style::Interpolation::blendFunc):
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::applyMatchedProperties):
Hack not needed anymore.
* Source/WebCore/style/values/color/StyleColor.cpp:
(WebCore::Style::toStyleColorWithResolvedCurrentColor): Deleted.
Hack not needed anymore.
* Source/WebCore/style/values/color/StyleColor.h:
* Source/WebCore/style/values/filter-effects/StyleDropShadowFunction.cpp:
(WebCore::Style::toCSSDropShadow):
(WebCore::Style::createFilterOperation):
* Source/WebCore/style/values/filter-effects/StyleDropShadowFunction.h:
* Source/WebCore/style/values/filter-effects/StyleFilterProperty.cpp:
(WebCore::Style::toCSSFilterProperty):
Canonical link: https://commits.webkit.org/293027@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes