Refactor parameters to blending functions
https://bugs.webkit.org/show_bug.cgi?id=224433
Reviewed by Dean Jackson.
Reduce the number of parameters passed to the blending functions such that we package
the client and progress together and track whether the animation is discrete instead
of computing it several times. This information is now passed as a BlendingContext
parameter, and a CSSPropertyBlendingContext private to CSSPropertyAnimation.
When we support composite operations, we'll just need to add a new member to that
struct instead of modifying all the method signatures.
Since we are modifying the method signatures, we also change the RenderStyle pointers
to references since we would never pass in a null value.
- animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyBlendingContext::CSSPropertyBlendingContext):
(WebCore::blendFunc):
(WebCore::blendFilterOperations):
(WebCore::blendFilter):
(WebCore::crossfadeBlend):
(WebCore::AnimationPropertyWrapperBase::canInterpolate const):
(WebCore::PropertyWrapperGetter::value const):
(WebCore::canInterpolateCaretColor):
(WebCore::CSSPropertyAnimation::blendProperties):
(WebCore::CSSPropertyAnimation::propertiesEqual):
(WebCore::CSSPropertyAnimation::canPropertyBeInterpolated):
- animation/CSSPropertyAnimation.h:
- animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):
- css/CSSCrossfadeValue.cpp:
(WebCore::blendFunc):
(WebCore::CSSCrossfadeValue::blend const):
- css/CSSCrossfadeValue.h:
- css/CSSGradientValue.cpp:
(WebCore::RadialGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
(WebCore::ConicGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
(WebCore::CSSGradientValue::computeStops):
(WebCore::blendMixedTypes):
(WebCore::blend):
- platform/Length.h:
- platform/LengthPoint.h:
(WebCore::blend):
(WebCore::blend):
- platform/animation/AnimationUtilities.h:
(WebCore::blend):
- platform/graphics/ColorBlending.cpp:
(WebCore::blend):
(WebCore::blendWithoutPremultiply):
- platform/graphics/ColorBlending.h:
- platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
(WebCore::PlatformCAFilters::colorMatrixValueForFilter):
- platform/graphics/filters/FilterOperation.cpp:
(WebCore::BasicColorMatrixFilterOperation::blend):
(WebCore::BasicComponentTransferFilterOperation::blend):
(WebCore::InvertLightnessFilterOperation::blend):
(WebCore::BlurFilterOperation::blend):
(WebCore::DropShadowFilterOperation::blend):
- platform/graphics/filters/FilterOperation.h:
(WebCore::FilterOperation::blend):
- platform/graphics/transforms/IdentityTransformOperation.h:
- platform/graphics/transforms/Matrix3DTransformOperation.cpp:
(WebCore::createOperation):
(WebCore::Matrix3DTransformOperation::blend):
- platform/graphics/transforms/Matrix3DTransformOperation.h:
- platform/graphics/transforms/MatrixTransformOperation.cpp:
(WebCore::MatrixTransformOperation::blend):
- platform/graphics/transforms/MatrixTransformOperation.h:
- platform/graphics/transforms/PerspectiveTransformOperation.cpp:
(WebCore::PerspectiveTransformOperation::blend):
- platform/graphics/transforms/PerspectiveTransformOperation.h:
- platform/graphics/transforms/RotateTransformOperation.cpp:
(WebCore::RotateTransformOperation::blend):
- platform/graphics/transforms/RotateTransformOperation.h:
- platform/graphics/transforms/ScaleTransformOperation.cpp:
(WebCore::ScaleTransformOperation::blend):
- platform/graphics/transforms/ScaleTransformOperation.h:
- platform/graphics/transforms/SkewTransformOperation.cpp:
(WebCore::SkewTransformOperation::blend):
- platform/graphics/transforms/SkewTransformOperation.h:
- platform/graphics/transforms/TransformOperation.h:
- platform/graphics/transforms/TransformOperations.cpp:
(WebCore::TransformOperations::blendByMatchingOperations const):
(WebCore::TransformOperations::blendByUsingMatrixInterpolation const):
(WebCore::TransformOperations::blend const):
- platform/graphics/transforms/TransformOperations.h:
- platform/graphics/transforms/TranslateTransformOperation.cpp:
(WebCore::TranslateTransformOperation::blend):
- platform/graphics/transforms/TranslateTransformOperation.h:
- rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeCircle::blend const):
(WebCore::BasicShapeEllipse::blend const):
(WebCore::BasicShapePolygon::blend const):
(WebCore::BasicShapePath::blend const):
(WebCore::BasicShapeInset::blend const):
- rendering/style/BasicShapes.h:
(WebCore::BasicShapeCenterCoordinate::blend const):
(WebCore::BasicShapeRadius::blend const):
(WebCore::propertyInStyleMatchesValueForTransitionInMap):
(WebCore::updateCSSTransitionsForStyleableAndProperty):
(WebCore::SVGLengthValue::blend):
(WebCore::blendFloatPoint):
(WebCore::SVGPathBlender::blendAnimatedDimensonalFloat):
(WebCore::SVGPathBlender::blendArcToSegment):