Changeset 274409 in webkit


Ignore:
Timestamp:
Mar 15, 2021 12:36:05 AM (3 years ago)
Author:
graouts@webkit.org
Message:

Improve coding style of CSSPropertyAnimation.cpp
https://bugs.webkit.org/show_bug.cgi?id=223148

Reviewed by Darin Adler.

As much as possible, do the following:

  1. mark classes as final
  2. mark overridden methods as final
  3. move overridden methods in private sections
  4. failing that, move them to protected sections
  5. stay clear from abbreviated terms
    • prop => property
    • anim => client
    • dst => destination
  6. use from/to as parameter names instead of a/b for any method where the role of the parameters warrant it (eg. blend, canInterpolate)

This should greatly improve the coding style used throughout CSSPropertyAnimation.cpp
and make it cohesive.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):
(WebCore::blendFilterOperations):
(WebCore::blendFilter):
(WebCore::AnimationPropertyWrapperBase::AnimationPropertyWrapperBase):
(WebCore::AnimationPropertyWrapperBase::property const):
(WebCore::PropertyWrapperGetter::PropertyWrapperGetter):
(WebCore::PropertyWrapperGetter::value const):
(WebCore::PropertyWrapper::PropertyWrapper):
(WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper):
(WebCore::canInterpolateLengths):
(WebCore::canInterpolateLengthVariants):
(WebCore::NonNegativeFloatPropertyWrapper::NonNegativeFloatPropertyWrapper):
(WebCore::CSSPropertyAnimation::blendProperties):
(WebCore::CSSPropertyAnimation::isPropertyAnimatable):
(WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
(WebCore::CSSPropertyAnimation::propertiesEqual):
(WebCore::CSSPropertyAnimation::canPropertyBeInterpolated):
(WebCore::DiscretePropertyWrapper::DiscretePropertyWrapper): Deleted.
(WebCore::LengthPropertyWrapper::LengthPropertyWrapper): Deleted.
(WebCore::LengthVariantPropertyWrapper::LengthVariantPropertyWrapper): Deleted.
(WebCore::LengthBoxPropertyWrapper::LengthBoxPropertyWrapper): Deleted.
(WebCore::PropertyWrapperClipPath::PropertyWrapperClipPath): Deleted.
(WebCore::PropertyWrapperFontVariationSettings::PropertyWrapperFontVariationSettings): Deleted.
(WebCore::PropertyWrapperShape::PropertyWrapperShape): Deleted.
(WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper): Deleted.
(WebCore::AcceleratedPropertyWrapper::AcceleratedPropertyWrapper): Deleted.
(WebCore::PropertyWrapperFilter::PropertyWrapperFilter): Deleted.
(WebCore::PropertyWrapperShadow::PropertyWrapperShadow): Deleted.
(WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists const): Deleted.
(WebCore::PropertyWrapperShadow::blendMismatchedShadowLists const): Deleted.
(WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor): Deleted.
(WebCore::PropertyWrapperMaybeInvalidColor::value const): Deleted.
(WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor): Deleted.
(WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper): Deleted.
(WebCore::FillLayerPositionPropertyWrapper::FillLayerPositionPropertyWrapper): Deleted.
(WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper): Deleted.
(WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper): Deleted.
(WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper): Deleted.
(WebCore::ShorthandPropertyWrapper:: const): Deleted.
(WebCore::PropertyWrapperFlex::PropertyWrapperFlex): Deleted.
(WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint): Deleted.
(WebCore::PropertyWrapperFontStyle::PropertyWrapperFontStyle): Deleted.
(WebCore::AutoPropertyWrapper::AutoPropertyWrapper): Deleted.
(WebCore::PerspectiveWrapper::PerspectiveWrapper): Deleted.
(WebCore::CSSPropertyAnimationWrapperMap::singleton): Deleted.
(WebCore::CSSPropertyAnimationWrapperMap::wrapperForProperty): Deleted.
(WebCore::CSSPropertyAnimationWrapperMap::wrapperForIndex): Deleted.
(WebCore::CSSPropertyAnimationWrapperMap::size): Deleted.
(WebCore::CSSPropertyAnimationWrapperMap::indexFromPropertyID): Deleted.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r274408 r274409  
     12021-03-13  Antoine Quint  <graouts@webkit.org>
     2
     3        Improve coding style of CSSPropertyAnimation.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=223148
     5
     6        Reviewed by Darin Adler.
     7
     8        As much as possible, do the following:
     9
     10        1. mark classes as final
     11        2. mark overridden methods as final
     12        3. move overridden methods in private sections
     13        4. failing that, move them to protected sections
     14        5. stay clear from abbreviated terms
     15            - prop => property
     16            - anim => client
     17            - dst => destination
     18        6. use from/to as parameter names instead of a/b for any method
     19           where the role of the parameters warrant it (eg. blend, canInterpolate)
     20
     21        This should greatly improve the coding style used throughout CSSPropertyAnimation.cpp
     22        and make it cohesive.
     23
     24        * animation/CSSPropertyAnimation.cpp:
     25        (WebCore::blendFunc):
     26        (WebCore::blendFilterOperations):
     27        (WebCore::blendFilter):
     28        (WebCore::AnimationPropertyWrapperBase::AnimationPropertyWrapperBase):
     29        (WebCore::AnimationPropertyWrapperBase::property const):
     30        (WebCore::PropertyWrapperGetter::PropertyWrapperGetter):
     31        (WebCore::PropertyWrapperGetter::value const):
     32        (WebCore::PropertyWrapper::PropertyWrapper):
     33        (WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper):
     34        (WebCore::canInterpolateLengths):
     35        (WebCore::canInterpolateLengthVariants):
     36        (WebCore::NonNegativeFloatPropertyWrapper::NonNegativeFloatPropertyWrapper):
     37        (WebCore::CSSPropertyAnimation::blendProperties):
     38        (WebCore::CSSPropertyAnimation::isPropertyAnimatable):
     39        (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
     40        (WebCore::CSSPropertyAnimation::propertiesEqual):
     41        (WebCore::CSSPropertyAnimation::canPropertyBeInterpolated):
     42        (WebCore::DiscretePropertyWrapper::DiscretePropertyWrapper): Deleted.
     43        (WebCore::LengthPropertyWrapper::LengthPropertyWrapper): Deleted.
     44        (WebCore::LengthVariantPropertyWrapper::LengthVariantPropertyWrapper): Deleted.
     45        (WebCore::LengthBoxPropertyWrapper::LengthBoxPropertyWrapper): Deleted.
     46        (WebCore::PropertyWrapperClipPath::PropertyWrapperClipPath): Deleted.
     47        (WebCore::PropertyWrapperFontVariationSettings::PropertyWrapperFontVariationSettings): Deleted.
     48        (WebCore::PropertyWrapperShape::PropertyWrapperShape): Deleted.
     49        (WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper): Deleted.
     50        (WebCore::AcceleratedPropertyWrapper::AcceleratedPropertyWrapper): Deleted.
     51        (WebCore::PropertyWrapperFilter::PropertyWrapperFilter): Deleted.
     52        (WebCore::PropertyWrapperShadow::PropertyWrapperShadow): Deleted.
     53        (WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists const): Deleted.
     54        (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists const): Deleted.
     55        (WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor): Deleted.
     56        (WebCore::PropertyWrapperMaybeInvalidColor::value const): Deleted.
     57        (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor): Deleted.
     58        (WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper): Deleted.
     59        (WebCore::FillLayerPositionPropertyWrapper::FillLayerPositionPropertyWrapper): Deleted.
     60        (WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper): Deleted.
     61        (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper): Deleted.
     62        (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper): Deleted.
     63        (WebCore::ShorthandPropertyWrapper:: const): Deleted.
     64        (WebCore::PropertyWrapperFlex::PropertyWrapperFlex): Deleted.
     65        (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint): Deleted.
     66        (WebCore::PropertyWrapperFontStyle::PropertyWrapperFontStyle): Deleted.
     67        (WebCore::AutoPropertyWrapper::AutoPropertyWrapper): Deleted.
     68        (WebCore::PerspectiveWrapper::PerspectiveWrapper): Deleted.
     69        (WebCore::CSSPropertyAnimationWrapperMap::singleton): Deleted.
     70        (WebCore::CSSPropertyAnimationWrapperMap::wrapperForProperty): Deleted.
     71        (WebCore::CSSPropertyAnimationWrapperMap::wrapperForIndex): Deleted.
     72        (WebCore::CSSPropertyAnimationWrapperMap::size): Deleted.
     73        (WebCore::CSSPropertyAnimationWrapperMap::indexFromPropertyID): Deleted.
     74
    1752021-03-14  Sam Weinig  <weinig@apple.com>
    276
  • trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp

    r274391 r274409  
    101101}
    102102
    103 static inline LengthSize blendFunc(const CSSPropertyBlendingClient* anim, const LengthSize& from, const LengthSize& to, double progress)
    104 {
    105     return { blendFunc(anim, from.width, to.width, progress, ValueRangeNonNegative),
    106              blendFunc(anim, from.height, to.height, progress, ValueRangeNonNegative) };
    107 }
    108 
    109 static inline ShadowStyle blendFunc(const CSSPropertyBlendingClient* anim, ShadowStyle from, ShadowStyle to, double progress)
     103static inline LengthSize blendFunc(const CSSPropertyBlendingClient* client, const LengthSize& from, const LengthSize& to, double progress)
     104{
     105    return { blendFunc(client, from.width, to.width, progress, ValueRangeNonNegative),
     106             blendFunc(client, from.height, to.height, progress, ValueRangeNonNegative) };
     107}
     108
     109static inline ShadowStyle blendFunc(const CSSPropertyBlendingClient* client, ShadowStyle from, ShadowStyle to, double progress)
    110110{
    111111    if (from == to)
     
    114114    double fromVal = from == ShadowStyle::Normal ? 1 : 0;
    115115    double toVal = to == ShadowStyle::Normal ? 1 : 0;
    116     double result = blendFunc(anim, fromVal, toVal, progress);
     116    double result = blendFunc(client, fromVal, toVal, progress);
    117117    return result > 0 ? ShadowStyle::Normal : ShadowStyle::Inset;
    118118}
    119119
    120 static inline std::unique_ptr<ShadowData> blendFunc(const CSSPropertyBlendingClient* anim, const ShadowData* from, const ShadowData* to, double progress)
     120static inline std::unique_ptr<ShadowData> blendFunc(const CSSPropertyBlendingClient* client, const ShadowData* from, const ShadowData* to, double progress)
    121121{
    122122    ASSERT(from && to);
     
    127127        blend(from->radius(), to->radius(), progress),
    128128        blend(from->spread(), to->spread(), progress),
    129         blendFunc(anim, from->style(), to->style(), progress),
     129        blendFunc(client, from->style(), to->style(), progress),
    130130        from->isWebkitBoxShadow(),
    131131        blend(from->color(), to->color(), progress));
    132132}
    133133
    134 static inline TransformOperations blendFunc(const CSSPropertyBlendingClient* animation, const TransformOperations& from, const TransformOperations& to, double progress)
    135 {
    136     if (animation->transformFunctionListsMatch())
     134static inline TransformOperations blendFunc(const CSSPropertyBlendingClient* client, const TransformOperations& from, const TransformOperations& to, double progress)
     135{
     136    if (client->transformFunctionListsMatch())
    137137        return to.blendByMatchingOperations(from, progress);
    138     return to.blendByUsingMatrixInterpolation(from, progress, is<RenderBox>(animation->renderer()) ? downcast<RenderBox>(*animation->renderer()).borderBoxRect().size() : LayoutSize());
     138    return to.blendByUsingMatrixInterpolation(from, progress, is<RenderBox>(client->renderer()) ? downcast<RenderBox>(*client->renderer()).borderBoxRect().size() : LayoutSize());
    139139}
    140140
     
    285285}
    286286
    287 static inline RefPtr<FilterOperation> blendFunc(const CSSPropertyBlendingClient*, FilterOperation* fromOp, FilterOperation* toOp, double progress, bool blendToPassthrough = false)
    288 {
    289     ASSERT(toOp);
    290     return toOp->blend(fromOp, progress, blendToPassthrough);
    291 }
    292 
    293 static inline FilterOperations blendFilterOperations(const CSSPropertyBlendingClient* anim,  const FilterOperations& from, const FilterOperations& to, double progress)
     287static inline RefPtr<FilterOperation> blendFunc(const CSSPropertyBlendingClient*, FilterOperation* from, FilterOperation* to, double progress, bool blendToPassthrough = false)
     288{
     289    ASSERT(to);
     290    return to->blend(from, progress, blendToPassthrough);
     291}
     292
     293static inline FilterOperations blendFilterOperations(const CSSPropertyBlendingClient* client,  const FilterOperations& from, const FilterOperations& to, double progress)
    294294{
    295295    FilterOperations result;
     
    300300        RefPtr<FilterOperation> fromOp = (i < fromSize) ? from.operations()[i].get() : 0;
    301301        RefPtr<FilterOperation> toOp = (i < toSize) ? to.operations()[i].get() : 0;
    302         RefPtr<FilterOperation> blendedOp = toOp ? blendFunc(anim, fromOp.get(), toOp.get(), progress) : (fromOp ? blendFunc(anim, 0, fromOp.get(), progress, true) : 0);
     302        RefPtr<FilterOperation> blendedOp = toOp ? blendFunc(client, fromOp.get(), toOp.get(), progress) : (fromOp ? blendFunc(client, 0, fromOp.get(), progress, true) : 0);
    303303        if (blendedOp)
    304304            result.operations().append(blendedOp);
     
    314314}
    315315
    316 static inline FilterOperations blendFunc(const CSSPropertyBlendingClient* anim, const FilterOperations& from, const FilterOperations& to, double progress, CSSPropertyID propertyID = CSSPropertyFilter)
     316static inline FilterOperations blendFunc(const CSSPropertyBlendingClient* client, const FilterOperations& from, const FilterOperations& to, double progress, CSSPropertyID propertyID = CSSPropertyFilter)
    317317{
    318318    FilterOperations result;
     
    323323    switch (propertyID) {
    324324    case CSSPropertyFilter:
    325         listsMatch = anim->filterFunctionListsMatch();
     325        listsMatch = client->filterFunctionListsMatch();
    326326        break;
    327327#if ENABLE(FILTERS_LEVEL_2)
    328328    case CSSPropertyWebkitBackdropFilter:
    329         listsMatch = anim->backdropFilterFunctionListsMatch();
     329        listsMatch = client->backdropFilterFunctionListsMatch();
    330330        break;
    331331#endif
    332332    case CSSPropertyAppleColorFilter:
    333         listsMatch = anim->colorFilterFunctionListsMatch();
     333        listsMatch = client->colorFilterFunctionListsMatch();
    334334        break;
    335335    default:
     
    338338   
    339339    if (listsMatch)
    340         result = blendFilterOperations(anim, from, to, progress);
     340        result = blendFilterOperations(client, from, to, progress);
    341341    else {
    342342        // If the filter function lists don't match, we could try to cross-fade, but don't yet have a way to represent that in CSS.
     
    348348}
    349349
    350 static inline RefPtr<StyleImage> blendFilter(const CSSPropertyBlendingClient* anim, CachedImage* image, const FilterOperations& from, const FilterOperations& to, double progress)
     350static inline RefPtr<StyleImage> blendFilter(const CSSPropertyBlendingClient* client, CachedImage* image, const FilterOperations& from, const FilterOperations& to, double progress)
    351351{
    352352    ASSERT(image);
    353     FilterOperations filterResult = blendFilterOperations(anim, from, to, progress);
     353    FilterOperations filterResult = blendFilterOperations(client, from, to, progress);
    354354
    355355    auto imageValue = CSSImageValue::create(*image);
    356     auto filterValue = ComputedStyleExtractor::valueForFilter(anim->currentStyle(), filterResult, DoNotAdjustPixelValues);
     356    auto filterValue = ComputedStyleExtractor::valueForFilter(client->currentStyle(), filterResult, DoNotAdjustPixelValues);
    357357
    358358    auto result = CSSFilterImageValue::create(WTFMove(imageValue), WTFMove(filterValue));
     
    361361}
    362362
    363 static inline Visibility blendFunc(const CSSPropertyBlendingClient* anim, Visibility from, Visibility to, double progress)
     363static inline Visibility blendFunc(const CSSPropertyBlendingClient* client, Visibility from, Visibility to, double progress)
    364364{
    365365    // Any non-zero result means we consider the object to be visible. Only at 0 do we consider the object to be
     
    369369    if (fromVal == toVal)
    370370        return to;
    371     double result = blendFunc(anim, fromVal, toVal, progress);
     371    double result = blendFunc(client, fromVal, toVal, progress);
    372372    return result > 0. ? Visibility::Visible : (to != Visibility::Visible ? to : from);
    373373}
    374374
    375 static inline TextUnderlineOffset blendFunc(const CSSPropertyBlendingClient* anim, const TextUnderlineOffset& from, const TextUnderlineOffset& to, double progress)
     375static inline TextUnderlineOffset blendFunc(const CSSPropertyBlendingClient* client, const TextUnderlineOffset& from, const TextUnderlineOffset& to, double progress)
    376376{
    377377    if (from.isLength() && to.isLength())
    378         return TextUnderlineOffset::createWithLength(blendFunc(anim, from.lengthValue(), to.lengthValue(), progress));
     378        return TextUnderlineOffset::createWithLength(blendFunc(client, from.lengthValue(), to.lengthValue(), progress));
    379379    return TextUnderlineOffset::createWithAuto();
    380380}
    381381
    382 static inline TextDecorationThickness blendFunc(const CSSPropertyBlendingClient* anim, const TextDecorationThickness& from, const TextDecorationThickness& to, double progress)
     382static inline TextDecorationThickness blendFunc(const CSSPropertyBlendingClient* client, const TextDecorationThickness& from, const TextDecorationThickness& to, double progress)
    383383{
    384384    if (from.isLength() && to.isLength())
    385         return TextDecorationThickness::createWithLength(blendFunc(anim, from.lengthValue(), to.lengthValue(), progress));
     385        return TextDecorationThickness::createWithLength(blendFunc(client, from.lengthValue(), to.lengthValue(), progress));
    386386    return TextDecorationThickness::createWithAuto();
    387387}
    388388
    389 static inline LengthBox blendFunc(const CSSPropertyBlendingClient* anim, const LengthBox& from, const LengthBox& to, double progress, ValueRange valueRange = ValueRangeNonNegative)
    390 {
    391     LengthBox result(blendFunc(anim, from.top(), to.top(), progress, valueRange),
    392                      blendFunc(anim, from.right(), to.right(), progress, valueRange),
    393                      blendFunc(anim, from.bottom(), to.bottom(), progress, valueRange),
    394                      blendFunc(anim, from.left(), to.left(), progress, valueRange));
    395 
     389static inline LengthBox blendFunc(const CSSPropertyBlendingClient* client, const LengthBox& from, const LengthBox& to, double progress, ValueRange valueRange = ValueRangeNonNegative)
     390{
     391    LengthBox result(blendFunc(client, from.top(), to.top(), progress, valueRange),
     392                     blendFunc(client, from.right(), to.right(), progress, valueRange),
     393                     blendFunc(client, from.bottom(), to.bottom(), progress, valueRange),
     394                     blendFunc(client, from.left(), to.left(), progress, valueRange));
    396395    return result;
    397396}
     
    442441}
    443442
    444 static inline RefPtr<StyleImage> blendFunc(const CSSPropertyBlendingClient* anim, StyleImage* from, StyleImage* to, double progress)
     443static inline RefPtr<StyleImage> blendFunc(const CSSPropertyBlendingClient* client, StyleImage* from, StyleImage* to, double progress)
    445444{
    446445    if (!from || !to)
     
    464463            CSSFilterImageValue& toFilter = downcast<CSSFilterImageValue>(toGenerated);
    465464            if (fromFilter.equalInputImages(toFilter) && fromFilter.cachedImage())
    466                 return blendFilter(anim, fromFilter.cachedImage(), fromFilter.filterOperations(), toFilter.filterOperations(), progress);
     465                return blendFilter(client, fromFilter.cachedImage(), fromFilter.filterOperations(), toFilter.filterOperations(), progress);
    467466        }
    468467
     
    483482            CSSFilterImageValue& fromFilter = downcast<CSSFilterImageValue>(fromGenerated);
    484483            if (fromFilter.cachedImage() && downcast<StyleCachedImage>(*to).cachedImage() == fromFilter.cachedImage())
    485                 return blendFilter(anim, fromFilter.cachedImage(), fromFilter.filterOperations(), FilterOperations(), progress);
     484                return blendFilter(client, fromFilter.cachedImage(), fromFilter.filterOperations(), FilterOperations(), progress);
    486485        }
    487486        // FIXME: Add interpolation between cross-fade and image source.
     
    491490            CSSFilterImageValue& toFilter = downcast<CSSFilterImageValue>(toGenerated);
    492491            if (toFilter.cachedImage() && downcast<StyleCachedImage>(*from).cachedImage() == toFilter.cachedImage())
    493                 return blendFilter(anim, toFilter.cachedImage(), FilterOperations(), toFilter.filterOperations(), progress);
     492                return blendFilter(client, toFilter.cachedImage(), FilterOperations(), toFilter.filterOperations(), progress);
    494493        }
    495494        // FIXME: Add interpolation between image source and cross-fade.
     
    499498    // https://bugs.webkit.org/show_bug.cgi?id=78293
    500499    if (is<StyleCachedImage>(*from) && is<StyleCachedImage>(*to))
    501         return crossfadeBlend(anim, downcast<StyleCachedImage>(from), downcast<StyleCachedImage>(to), progress);
     500        return crossfadeBlend(client, downcast<StyleCachedImage>(from), downcast<StyleCachedImage>(to), progress);
    502501
    503502    return to;
    504503}
    505504
    506 static inline NinePieceImage blendFunc(const CSSPropertyBlendingClient* anim, const NinePieceImage& from, const NinePieceImage& to, double progress)
     505static inline NinePieceImage blendFunc(const CSSPropertyBlendingClient* client, const NinePieceImage& from, const NinePieceImage& to, double progress)
    507506{
    508507    if (!from.hasImage() || !to.hasImage())
     
    514513        return to;
    515514
    516     if (auto* renderer = anim->renderer()) {
     515    if (auto* renderer = client->renderer()) {
    517516        if (from.image()->imageSize(renderer, 1.0) != to.image()->imageSize(renderer, 1.0))
    518517            return to;
    519518    }
    520519
    521     return NinePieceImage(blendFunc(anim, from.image(), to.image(), progress),
     520    return NinePieceImage(blendFunc(client, from.image(), to.image(), progress),
    522521        from.imageSlices(), from.fill(), from.borderSlices(), from.outset(), from.horizontalRule(), from.verticalRule());
    523522}
     
    525524#if ENABLE(VARIATION_FONTS)
    526525
    527 static inline FontVariationSettings blendFunc(const CSSPropertyBlendingClient* anim, const FontVariationSettings& from, const FontVariationSettings& to, double progress)
     526static inline FontVariationSettings blendFunc(const CSSPropertyBlendingClient* client, const FontVariationSettings& from, const FontVariationSettings& to, double progress)
    528527{
    529528    if (!progress)
     
    540539        auto& toItem = to.at(i);
    541540        ASSERT(fromItem.tag() == toItem.tag());
    542         float interpolated = blendFunc(anim, fromItem.value(), toItem.value(), progress);
     541        float interpolated = blendFunc(client, fromItem.value(), toItem.value(), progress);
    543542        result.insert({ fromItem.tag(), interpolated });
    544543    }
     
    548547#endif
    549548
    550 static inline FontSelectionValue blendFunc(const CSSPropertyBlendingClient* anim, FontSelectionValue from, FontSelectionValue to, double progress)
    551 {
    552     return FontSelectionValue(blendFunc(anim, static_cast<float>(from), static_cast<float>(to), progress));
    553 }
    554 
    555 static inline Optional<FontSelectionValue> blendFunc(const CSSPropertyBlendingClient* anim, Optional<FontSelectionValue> from, Optional<FontSelectionValue> to, double progress)
    556 {
    557     return FontSelectionValue(blendFunc(anim, static_cast<float>(from.value()), static_cast<float>(to.value()), progress));
     549static inline FontSelectionValue blendFunc(const CSSPropertyBlendingClient* client, FontSelectionValue from, FontSelectionValue to, double progress)
     550{
     551    return FontSelectionValue(blendFunc(client, static_cast<float>(from), static_cast<float>(to), progress));
     552}
     553
     554static inline Optional<FontSelectionValue> blendFunc(const CSSPropertyBlendingClient* client, Optional<FontSelectionValue> from, Optional<FontSelectionValue> to, double progress)
     555{
     556    return FontSelectionValue(blendFunc(client, static_cast<float>(from.value()), static_cast<float>(to.value()), progress));
    558557}
    559558
     
    562561    WTF_MAKE_FAST_ALLOCATED;
    563562public:
    564     explicit AnimationPropertyWrapperBase(CSSPropertyID prop)
    565         : m_prop(prop)
     563    explicit AnimationPropertyWrapperBase(CSSPropertyID property)
     564        : m_property(property)
    566565    {
    567566    }
     
    569568
    570569    virtual bool isShorthandWrapper() const { return false; }
    571     virtual bool equals(const RenderStyle* a, const RenderStyle* b) const = 0;
     570    virtual bool equals(const RenderStyle*, const RenderStyle*) const = 0;
    572571    virtual bool canInterpolate(const RenderStyle*, const RenderStyle*) const { return true; }
    573572    virtual void blend(const CSSPropertyBlendingClient*, RenderStyle*, const RenderStyle*, const RenderStyle*, double) const = 0;
    574573   
    575574#if !LOG_DISABLED
    576     virtual void logBlend(const RenderStyle* a, const RenderStyle* b, const RenderStyle* result, double) const = 0;
     575    virtual void logBlend(const RenderStyle*, const RenderStyle*, const RenderStyle*, double) const = 0;
    577576#endif
    578577
    579     CSSPropertyID property() const { return m_prop; }
     578    CSSPropertyID property() const { return m_property; }
    580579
    581580    virtual bool animationIsAccelerated() const { return false; }
    582581
    583582private:
    584     CSSPropertyID m_prop;
     583    CSSPropertyID m_property;
    585584};
    586585
     
    589588    WTF_MAKE_FAST_ALLOCATED;
    590589public:
    591     PropertyWrapperGetter(CSSPropertyID prop, T (RenderStyle::*getter)() const)
    592         : AnimationPropertyWrapperBase(prop)
     590    PropertyWrapperGetter(CSSPropertyID property, T (RenderStyle::*getter)() const)
     591        : AnimationPropertyWrapperBase(property)
    593592        , m_getter(getter)
    594593    {
    595594    }
    596595
     596    T value(const RenderStyle* style) const
     597    {
     598        return (style->*m_getter)();
     599    }
     600
     601private:
    597602    bool equals(const RenderStyle* a, const RenderStyle* b) const override
    598603    {
     
    601606        if (!a || !b)
    602607            return false;
    603         return this->value(a) == this->value(b);
    604     }
    605 
    606     T value(const RenderStyle* a) const
    607     {
    608         return (a->*m_getter)();
     608        return value(a) == value(b);
    609609    }
    610610
    611611#if !LOG_DISABLED
    612     void logBlend(const RenderStyle* a, const RenderStyle* b, const RenderStyle* result, double progress) const final
    613     {
    614         LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(property()) << " from " << value(a) << " to " << value(b) << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << value(result));
     612    void logBlend(const RenderStyle* from, const RenderStyle* to, const RenderStyle* result, double progress) const final
     613    {
     614        LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(property()) << " from " << value(from) << " to " << value(to) << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << value(result));
    615615    }
    616616#endif
    617617
    618 protected:
    619618    T (RenderStyle::*m_getter)() const;
    620619};
     
    624623    WTF_MAKE_FAST_ALLOCATED;
    625624public:
    626     PropertyWrapper(CSSPropertyID prop, T (RenderStyle::*getter)() const, void (RenderStyle::*setter)(T))
    627         : PropertyWrapperGetter<T>(prop, getter)
     625    PropertyWrapper(CSSPropertyID property, T (RenderStyle::*getter)() const, void (RenderStyle::*setter)(T))
     626        : PropertyWrapperGetter<T>(property, getter)
    628627        , m_setter(setter)
    629628    {
    630629    }
    631630
    632     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const override
    633     {
    634         (dst->*m_setter)(blendFunc(anim, this->value(a), this->value(b), progress));
     631    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const override
     632    {
     633        (destination->*m_setter)(blendFunc(client, this->value(from), this->value(to), progress));
    635634    }
    636635
     
    649648
    650649private:
    651 
    652650    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
    653651    {
     
    658656
    659657template <typename T>
    660 class DiscretePropertyWrapper : public PropertyWrapperGetter<T> {
    661     WTF_MAKE_FAST_ALLOCATED;
    662 public:
    663     DiscretePropertyWrapper(CSSPropertyID prop, T (RenderStyle::*getter)() const, void (RenderStyle::*setter)(T))
    664         : PropertyWrapperGetter<T>(prop, getter)
     658class DiscretePropertyWrapper final : public PropertyWrapperGetter<T> {
     659    WTF_MAKE_FAST_ALLOCATED;
     660public:
     661    DiscretePropertyWrapper(CSSPropertyID property, T (RenderStyle::*getter)() const, void (RenderStyle::*setter)(T))
     662        : PropertyWrapperGetter<T>(property, getter)
    665663        , m_setter(setter)
    666664    {
    667665    }
    668666
     667private:
    669668    bool canInterpolate(const RenderStyle*, const RenderStyle*) const final { return false; }
    670669
    671     void blend(const CSSPropertyBlendingClient*, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const override
     670    void blend(const CSSPropertyBlendingClient*, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
    672671    {
    673672        ASSERT(!progress || progress == 1.0);
    674         (dst->*m_setter)(this->value(progress ? b : a));
    675     }
    676 
    677 protected:
     673        (destination->*this->m_setter)(this->value(progress ? to : from));
     674    }
     675
    678676    void (RenderStyle::*m_setter)(T);
    679677};
     
    683681    WTF_MAKE_FAST_ALLOCATED;
    684682public:
    685     RefCountedPropertyWrapper(CSSPropertyID prop, T* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(RefPtr<T>&&))
    686         : PropertyWrapperGetter<T*>(prop, getter)
     683    RefCountedPropertyWrapper(CSSPropertyID property, T* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(RefPtr<T>&&))
     684        : PropertyWrapperGetter<T*>(property, getter)
    687685        , m_setter(setter)
    688686    {
    689687    }
    690688
    691     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const override
    692     {
    693         (dst->*m_setter)(blendFunc(anim, this->value(a), this->value(b), progress));
    694     }
    695 
    696 protected:
     689private:
     690    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
     691    {
     692        (destination->*this->m_setter)(blendFunc(client, this->value(from), this->value(to), progress));
     693    }
     694
    697695    void (RenderStyle::*m_setter)(RefPtr<T>&&);
    698696};
    699697
    700 static bool canInterpolateLengths(const Length& a, const Length& b, bool isLengthPercentage)
    701 {
    702     if (a.type() == b.type())
     698static bool canInterpolateLengths(const Length& from, const Length& to, bool isLengthPercentage)
     699{
     700    if (from.type() == to.type())
    703701        return true;
    704702
     
    708706    // dealing with a <number> as opposed to a <length> or <percentage>.
    709707    if (isLengthPercentage) {
    710         return (a.isFixed() || a.isPercentOrCalculated() || a.isRelative())
    711             && (b.isFixed() || b.isPercentOrCalculated() || b.isRelative())
    712             && a.isRelative() == b.isRelative();
     708        return (from.isFixed() || from.isPercentOrCalculated() || from.isRelative())
     709            && (to.isFixed() || to.isPercentOrCalculated() || to.isRelative())
     710            && from.isRelative() == to.isRelative();
    713711    }
    714712
     
    716714}
    717715
    718 class LengthPropertyWrapper : public PropertyWrapperGetter<const Length&> {
     716class LengthPropertyWrapper final : public PropertyWrapperGetter<const Length&> {
    719717    WTF_MAKE_FAST_ALLOCATED;
    720718public:
     
    723721        NegativeLengthsAreInvalid   = 1 << 1,
    724722    };
    725     LengthPropertyWrapper(CSSPropertyID prop, const Length& (RenderStyle::*getter)() const, void (RenderStyle::*setter)(Length&&), OptionSet<Flags> flags = { })
    726         : PropertyWrapperGetter<const Length&>(prop, getter)
     723    LengthPropertyWrapper(CSSPropertyID property, const Length& (RenderStyle::*getter)() const, void (RenderStyle::*setter)(Length&&), OptionSet<Flags> flags = { })
     724        : PropertyWrapperGetter<const Length&>(property, getter)
    727725        , m_setter(setter)
    728726        , m_flags(flags)
     
    730728    }
    731729
    732     bool canInterpolate(const RenderStyle* a, const RenderStyle* b) const override
    733     {
    734         return canInterpolateLengths(this->value(a), this->value(b), m_flags.contains(Flags::IsLengthPercentage));
    735     }
    736 
    737     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const override
     730private:
     731    bool canInterpolate(const RenderStyle* from, const RenderStyle* to) const final
     732    {
     733        return canInterpolateLengths(value(from), value(to), m_flags.contains(Flags::IsLengthPercentage));
     734    }
     735
     736    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
    738737    {
    739738        auto valueRange = m_flags.contains(Flags::NegativeLengthsAreInvalid) ? ValueRangeNonNegative : ValueRangeAll;
    740         (dst->*m_setter)(blendFunc(anim, this->value(a), this->value(b), progress, valueRange));
    741     }
    742 
    743 protected:
     739        (destination->*m_setter)(blendFunc(client, value(from), value(to), progress, valueRange));
     740    }
     741
    744742    void (RenderStyle::*m_setter)(Length&&);
    745 
    746 private:
    747743    OptionSet<Flags> m_flags;
    748744};
    749745
    750 static bool canInterpolateLengthVariants(const LengthSize& a, const LengthSize& b)
     746static bool canInterpolateLengthVariants(const LengthSize& from, const LengthSize& to)
    751747{
    752748    bool isLengthPercentage = true;
    753     return canInterpolateLengths(a.width, b.width, isLengthPercentage)
    754         && canInterpolateLengths(a.height, b.height, isLengthPercentage);
    755 }
    756 
    757 static bool canInterpolateLengthVariants(const GapLength& a, const GapLength& b)
    758 {
    759     if (a.isNormal() || b.isNormal())
     749    return canInterpolateLengths(from.width, to.width, isLengthPercentage)
     750        && canInterpolateLengths(from.height, to.height, isLengthPercentage);
     751}
     752
     753static bool canInterpolateLengthVariants(const GapLength& from, const GapLength& to)
     754{
     755    if (from.isNormal() || to.isNormal())
    760756        return false;
    761757    bool isLengthPercentage = true;
    762     return canInterpolateLengths(a.length(), b.length(), isLengthPercentage);
     758    return canInterpolateLengths(from.length(), to.length(), isLengthPercentage);
    763759}
    764760
    765761template <typename T>
    766 class LengthVariantPropertyWrapper : public PropertyWrapperGetter<const T&> {
    767     WTF_MAKE_FAST_ALLOCATED;
    768 public:
    769     LengthVariantPropertyWrapper(CSSPropertyID prop, const T& (RenderStyle::*getter)() const, void (RenderStyle::*setter)(T&&))
    770         : PropertyWrapperGetter<const T&>(prop, getter)
     762class LengthVariantPropertyWrapper final : public PropertyWrapperGetter<const T&> {
     763    WTF_MAKE_FAST_ALLOCATED;
     764public:
     765    LengthVariantPropertyWrapper(CSSPropertyID property, const T& (RenderStyle::*getter)() const, void (RenderStyle::*setter)(T&&))
     766        : PropertyWrapperGetter<const T&>(property, getter)
    771767        , m_setter(setter)
    772768    {
    773769    }
    774770
    775     bool canInterpolate(const RenderStyle* a, const RenderStyle* b) const override
    776     {
    777         return canInterpolateLengthVariants(this->value(a), this->value(b));
    778     }
    779 
    780     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const override
    781     {
    782         (dst->*m_setter)(blendFunc(anim, this->value(a), this->value(b), progress));
    783     }
    784 
    785 protected:
     771private:
     772    bool canInterpolate(const RenderStyle* from, const RenderStyle* to) const final
     773    {
     774        return canInterpolateLengthVariants(this->value(from), this->value(to));
     775    }
     776
     777    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
     778    {
     779        (destination->*m_setter)(blendFunc(client, this->value(from), this->value(to), progress));
     780    }
     781
    786782    void (RenderStyle::*m_setter)(T&&);
    787783};
    788784
    789 class LengthBoxPropertyWrapper : public PropertyWrapperGetter<const LengthBox&> {
     785class LengthBoxPropertyWrapper final : public PropertyWrapperGetter<const LengthBox&> {
    790786    WTF_MAKE_FAST_ALLOCATED;
    791787public:
     
    795791        AllowsNegativeValues    = 1 << 2,
    796792    };
    797     LengthBoxPropertyWrapper(CSSPropertyID prop, const LengthBox& (RenderStyle::*getter)() const, void (RenderStyle::*setter)(LengthBox&&), OptionSet<Flags> flags = { })
    798         : PropertyWrapperGetter<const LengthBox&>(prop, getter)
     793    LengthBoxPropertyWrapper(CSSPropertyID property, const LengthBox& (RenderStyle::*getter)() const, void (RenderStyle::*setter)(LengthBox&&), OptionSet<Flags> flags = { })
     794        : PropertyWrapperGetter<const LengthBox&>(property, getter)
    799795        , m_setter(setter)
    800796        , m_flags(flags)
     
    802798    }
    803799
    804     bool canInterpolate(const RenderStyle* a, const RenderStyle* b) const override
    805     {
    806         if (m_flags.contains(Flags::UsesFillKeyword) && a->borderImage().fill() != b->borderImage().fill())
     800private:
     801    bool canInterpolate(const RenderStyle* from, const RenderStyle* to) const final
     802    {
     803        if (m_flags.contains(Flags::UsesFillKeyword) && from->borderImage().fill() != to->borderImage().fill())
    807804            return false;
    808805
    809         auto& aLengthBox = this->value(a);
    810         auto& bLengthBox = this->value(b);
     806        auto& fromLengthBox = value(from);
     807        auto& toLengthBox = value(to);
    811808        bool isLengthPercentage = m_flags.contains(Flags::IsLengthPercentage);
    812         return canInterpolateLengths(aLengthBox.top(), bLengthBox.top(), isLengthPercentage)
    813             && canInterpolateLengths(aLengthBox.right(), bLengthBox.right(), isLengthPercentage)
    814             && canInterpolateLengths(aLengthBox.bottom(), bLengthBox.bottom(), isLengthPercentage)
    815             && canInterpolateLengths(aLengthBox.left(), bLengthBox.left(), isLengthPercentage);
    816     }
    817 
    818     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const override
     809        return canInterpolateLengths(fromLengthBox.top(), toLengthBox.top(), isLengthPercentage)
     810            && canInterpolateLengths(fromLengthBox.right(), toLengthBox.right(), isLengthPercentage)
     811            && canInterpolateLengths(fromLengthBox.bottom(), toLengthBox.bottom(), isLengthPercentage)
     812            && canInterpolateLengths(fromLengthBox.left(), toLengthBox.left(), isLengthPercentage);
     813    }
     814
     815    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
    819816    {
    820817        if (m_flags.contains(Flags::UsesFillKeyword))
    821             dst->setBorderImageSliceFill((!progress || canInterpolate(a, b) ? a : b)->borderImage().fill());
     818            destination->setBorderImageSliceFill((!progress || canInterpolate(from, to) ? from : to)->borderImage().fill());
    822819        auto valueRange = m_flags.contains(Flags::AllowsNegativeValues) ? ValueRangeAll : ValueRangeNonNegative;
    823         (dst->*m_setter)(blendFunc(anim, this->value(a), this->value(b), progress, valueRange));
    824     }
    825 
    826 protected:
     820        (destination->*m_setter)(blendFunc(client, value(from), value(to), progress, valueRange));
     821    }
     822
    827823    void (RenderStyle::*m_setter)(LengthBox&&);
    828 
    829 private:
    830824    OptionSet<Flags> m_flags;
    831825};
    832826
    833 class PropertyWrapperClipPath : public RefCountedPropertyWrapper<ClipPathOperation> {
    834     WTF_MAKE_FAST_ALLOCATED;
    835 public:
    836     PropertyWrapperClipPath(CSSPropertyID prop, ClipPathOperation* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(RefPtr<ClipPathOperation>&&))
    837         : RefCountedPropertyWrapper<ClipPathOperation>(prop, getter, setter)
    838     {
    839     }
    840 
    841     bool equals(const RenderStyle* a, const RenderStyle* b) const override
     827class PropertyWrapperClipPath final : public RefCountedPropertyWrapper<ClipPathOperation> {
     828    WTF_MAKE_FAST_ALLOCATED;
     829public:
     830    PropertyWrapperClipPath(CSSPropertyID property, ClipPathOperation* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(RefPtr<ClipPathOperation>&&))
     831        : RefCountedPropertyWrapper<ClipPathOperation>(property, getter, setter)
     832    {
     833    }
     834
     835private:
     836    bool equals(const RenderStyle* a, const RenderStyle* b) const final
    842837    {
    843838        // If the style pointers are the same, don't bother doing the test.
     
    848843            return false;
    849844
    850         auto* clipPathA = this->value(a);
    851         auto* clipPathB = this->value(b);
     845        auto* clipPathA = value(a);
     846        auto* clipPathB = value(b);
    852847        if (clipPathA == clipPathB)
    853848            return true;
     
    859854
    860855#if ENABLE(VARIATION_FONTS)
    861 class PropertyWrapperFontVariationSettings : public PropertyWrapper<FontVariationSettings> {
    862     WTF_MAKE_FAST_ALLOCATED;
    863 public:
    864     PropertyWrapperFontVariationSettings(CSSPropertyID prop, FontVariationSettings (RenderStyle::*getter)() const, void (RenderStyle::*setter)(FontVariationSettings))
    865         : PropertyWrapper<FontVariationSettings>(prop, getter, setter)
    866     {
    867     }
    868 
    869     bool equals(const RenderStyle* a, const RenderStyle* b) const override
     856class PropertyWrapperFontVariationSettings final : public PropertyWrapper<FontVariationSettings> {
     857    WTF_MAKE_FAST_ALLOCATED;
     858public:
     859    PropertyWrapperFontVariationSettings(CSSPropertyID property, FontVariationSettings (RenderStyle::*getter)() const, void (RenderStyle::*setter)(FontVariationSettings))
     860        : PropertyWrapper<FontVariationSettings>(property, getter, setter)
     861    {
     862    }
     863
     864private:
     865    bool equals(const RenderStyle* a, const RenderStyle* b) const final
    870866    {
    871867        // If the style pointers are the same, don't bother doing the test.
     
    875871        if (!a || !b)
    876872            return false;
    877         return this->value(a) == this->value(b);
    878     }
    879 
    880     bool canInterpolate(const RenderStyle* a, const RenderStyle* b) const override
    881     {
    882         auto aVariationSettings = value(a);
    883         auto bVariationSettings = value(b);
    884 
    885         if (aVariationSettings.size() != bVariationSettings.size())
     873        return value(a) == value(b);
     874    }
     875
     876    bool canInterpolate(const RenderStyle* from, const RenderStyle* to) const final
     877    {
     878        auto fromVariationSettings = value(from);
     879        auto toVariationSettings = value(to);
     880
     881        if (fromVariationSettings.size() != toVariationSettings.size())
    886882            return false;
    887883
    888         auto size = aVariationSettings.size();
     884        auto size = fromVariationSettings.size();
    889885        for (unsigned i = 0; i < size; ++i) {
    890             if (aVariationSettings.at(i).tag() != bVariationSettings.at(i).tag())
     886            if (fromVariationSettings.at(i).tag() != toVariationSettings.at(i).tag())
    891887                return false;
    892888        }
     
    897893#endif
    898894
    899 class PropertyWrapperShape : public RefCountedPropertyWrapper<ShapeValue> {
    900     WTF_MAKE_FAST_ALLOCATED;
    901 public:
    902     PropertyWrapperShape(CSSPropertyID prop, ShapeValue* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(RefPtr<ShapeValue>&&))
    903         : RefCountedPropertyWrapper<ShapeValue>(prop, getter, setter)
    904     {
    905     }
    906 
    907     bool equals(const RenderStyle* a, const RenderStyle* b) const override
     895class PropertyWrapperShape final : public RefCountedPropertyWrapper<ShapeValue> {
     896    WTF_MAKE_FAST_ALLOCATED;
     897public:
     898    PropertyWrapperShape(CSSPropertyID property, ShapeValue* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(RefPtr<ShapeValue>&&))
     899        : RefCountedPropertyWrapper<ShapeValue>(property, getter, setter)
     900    {
     901    }
     902
     903private:
     904    bool equals(const RenderStyle* a, const RenderStyle* b) const final
    908905    {
    909906        // If the style pointers are the same, don't bother doing the test.
     
    914911            return false;
    915912
    916         auto* shapeA = this->value(a);
    917         auto* shapeB = this->value(b);
     913        auto* shapeA = value(a);
     914        auto* shapeB = value(b);
    918915        if (shapeA == shapeB)
    919916            return true;
     
    924921};
    925922
    926 class StyleImagePropertyWrapper : public RefCountedPropertyWrapper<StyleImage> {
    927     WTF_MAKE_FAST_ALLOCATED;
    928 public:
    929     StyleImagePropertyWrapper(CSSPropertyID prop, StyleImage* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(RefPtr<StyleImage>&&))
    930         : RefCountedPropertyWrapper<StyleImage>(prop, getter, setter)
    931     {
    932     }
    933 
    934     bool equals(const RenderStyle* a, const RenderStyle* b) const override
     923class StyleImagePropertyWrapper final : public RefCountedPropertyWrapper<StyleImage> {
     924    WTF_MAKE_FAST_ALLOCATED;
     925public:
     926    StyleImagePropertyWrapper(CSSPropertyID property, StyleImage* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(RefPtr<StyleImage>&&))
     927        : RefCountedPropertyWrapper<StyleImage>(property, getter, setter)
     928    {
     929    }
     930
     931private:
     932    bool equals(const RenderStyle* a, const RenderStyle* b) const final
    935933    {
    936934        if (a == b)
     
    939937            return false;
    940938
    941         auto* imageA = this->value(a);
    942         auto* imageB = this->value(b);
     939        auto* imageA = value(a);
     940        auto* imageB = value(b);
    943941        return arePointingToEqualData(imageA, imageB);
    944942    }
     
    946944
    947945template <typename T>
    948 class AcceleratedPropertyWrapper : public PropertyWrapper<T> {
    949     WTF_MAKE_FAST_ALLOCATED;
    950 public:
    951     AcceleratedPropertyWrapper(CSSPropertyID prop, T (RenderStyle::*getter)() const, void (RenderStyle::*setter)(T))
    952         : PropertyWrapper<T>(prop, getter, setter)
    953     {
    954     }
    955 
    956 private:
    957     bool animationIsAccelerated() const override { return true; }
     946class AcceleratedPropertyWrapper final : public PropertyWrapper<T> {
     947    WTF_MAKE_FAST_ALLOCATED;
     948public:
     949    AcceleratedPropertyWrapper(CSSPropertyID property, T (RenderStyle::*getter)() const, void (RenderStyle::*setter)(T))
     950        : PropertyWrapper<T>(property, getter, setter)
     951    {
     952    }
     953
     954private:
     955    bool animationIsAccelerated() const final { return true; }
    958956};
    959957
     
    962960    WTF_MAKE_FAST_ALLOCATED;
    963961public:
    964     AcceleratedIndividualTransformPropertyWrapper(CSSPropertyID prop, T* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(RefPtr<T>&&))
    965         : RefCountedPropertyWrapper<T>(prop, getter, setter)
     962    AcceleratedIndividualTransformPropertyWrapper(CSSPropertyID property, T* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(RefPtr<T>&&))
     963        : RefCountedPropertyWrapper<T>(property, getter, setter)
    966964    {
    967965    }
     
    976974};
    977975
    978 class PropertyWrapperFilter : public PropertyWrapper<const FilterOperations&> {
     976class PropertyWrapperFilter final : public PropertyWrapper<const FilterOperations&> {
    979977    WTF_MAKE_FAST_ALLOCATED;
    980978public:
     
    984982    }
    985983
    986     bool animationIsAccelerated() const override
     984private:
     985    bool animationIsAccelerated() const final
    987986    {
    988987        return property() == CSSPropertyFilter
     
    993992    }
    994993
    995     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const override
    996     {
    997         (dst->*m_setter)(blendFunc(anim, this->value(a), this->value(b), progress, property()));
     994    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
     995    {
     996        (destination->*m_setter)(blendFunc(client, value(from), value(to), progress, property()));
    998997    }
    999998};
     
    10231022}
    10241023
    1025 class PropertyWrapperShadow : public AnimationPropertyWrapperBase {
    1026     WTF_MAKE_FAST_ALLOCATED;
    1027 public:
    1028     PropertyWrapperShadow(CSSPropertyID prop, const ShadowData* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(std::unique_ptr<ShadowData>, bool))
    1029         : AnimationPropertyWrapperBase(prop)
     1024class PropertyWrapperShadow final : public AnimationPropertyWrapperBase {
     1025    WTF_MAKE_FAST_ALLOCATED;
     1026public:
     1027    PropertyWrapperShadow(CSSPropertyID property, const ShadowData* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(std::unique_ptr<ShadowData>, bool))
     1028        : AnimationPropertyWrapperBase(property)
    10301029        , m_getter(getter)
    10311030        , m_setter(setter)
     
    10331032    }
    10341033
    1035     bool equals(const RenderStyle* a, const RenderStyle* b) const override
     1034private:
     1035    bool equals(const RenderStyle* a, const RenderStyle* b) const final
    10361036    {
    10371037        if (a == b)
     
    10621062    }
    10631063
    1064     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const override
    1065     {
    1066         const ShadowData* shadowA = (a->*m_getter)();
    1067         const ShadowData* shadowB = (b->*m_getter)();
    1068 
    1069         int fromLength = shadowListLength(shadowA);
    1070         int toLength = shadowListLength(shadowB);
     1064    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
     1065    {
     1066        const ShadowData* fromShadow = (from->*m_getter)();
     1067        const ShadowData* toShadow = (to->*m_getter)();
     1068
     1069        int fromLength = shadowListLength(fromShadow);
     1070        int toLength = shadowListLength(toShadow);
    10711071
    10721072        if (fromLength == toLength || (fromLength <= 1 && toLength <= 1)) {
    1073             (dst->*m_setter)(blendSimpleOrMatchedShadowLists(anim, progress, shadowA, shadowB), false);
     1073            (destination->*m_setter)(blendSimpleOrMatchedShadowLists(client, progress, fromShadow, toShadow), false);
    10741074            return;
    10751075        }
    10761076
    1077         (dst->*m_setter)(blendMismatchedShadowLists(anim, progress, shadowA, shadowB, fromLength, toLength), false);
     1077        (destination->*m_setter)(blendMismatchedShadowLists(client, progress, fromShadow, toShadow, fromLength, toLength), false);
    10781078    }
    10791079
     
    10861086#endif
    10871087
    1088 private:
    1089     std::unique_ptr<ShadowData> blendSimpleOrMatchedShadowLists(const CSSPropertyBlendingClient* anim, double progress, const ShadowData* shadowA, const ShadowData* shadowB) const
     1088    std::unique_ptr<ShadowData> blendSimpleOrMatchedShadowLists(const CSSPropertyBlendingClient* client, double progress, const ShadowData* shadowA, const ShadowData* shadowB) const
    10901089    {
    10911090        std::unique_ptr<ShadowData> newShadowData;
     
    10961095            const ShadowData* dstShadow = shadowForBlending(shadowB, shadowA);
    10971096
    1098             std::unique_ptr<ShadowData> blendedShadow = blendFunc(anim, srcShadow, dstShadow, progress);
     1097            std::unique_ptr<ShadowData> blendedShadow = blendFunc(client, srcShadow, dstShadow, progress);
    10991098            ShadowData* blendedShadowPtr = blendedShadow.get();
    11001099
     
    11131112    }
    11141113
    1115     std::unique_ptr<ShadowData> blendMismatchedShadowLists(const CSSPropertyBlendingClient* anim, double progress, const ShadowData* shadowA, const ShadowData* shadowB, int fromLength, int toLength) const
     1114    std::unique_ptr<ShadowData> blendMismatchedShadowLists(const CSSPropertyBlendingClient* client, double progress, const ShadowData* shadowA, const ShadowData* shadowB, int fromLength, int toLength) const
    11161115    {
    11171116        // The shadows in ShadowData are stored in reverse order, so when animating mismatched lists,
     
    11391138            const ShadowData* dstShadow = shadowForBlending(toShadow, fromShadow);
    11401139
    1141             std::unique_ptr<ShadowData> blendedShadow = blendFunc(anim, srcShadow, dstShadow, progress);
     1140            std::unique_ptr<ShadowData> blendedShadow = blendFunc(client, srcShadow, dstShadow, progress);
    11421141            // Insert at the start of the list to preserve the order.
    11431142            blendedShadow->setNext(WTFMove(newShadowData));
     
    11521151};
    11531152
    1154 class PropertyWrapperMaybeInvalidColor : public AnimationPropertyWrapperBase {
    1155     WTF_MAKE_FAST_ALLOCATED;
    1156 public:
    1157     PropertyWrapperMaybeInvalidColor(CSSPropertyID prop, const Color& (RenderStyle::*getter)() const, void (RenderStyle::*setter)(const Color&))
    1158         : AnimationPropertyWrapperBase(prop)
     1153class PropertyWrapperMaybeInvalidColor final : public AnimationPropertyWrapperBase {
     1154    WTF_MAKE_FAST_ALLOCATED;
     1155public:
     1156    PropertyWrapperMaybeInvalidColor(CSSPropertyID property, const Color& (RenderStyle::*getter)() const, void (RenderStyle::*setter)(const Color&))
     1157        : AnimationPropertyWrapperBase(property)
    11591158        , m_getter(getter)
    11601159        , m_setter(setter)
     
    11621161    }
    11631162
    1164     bool equals(const RenderStyle* a, const RenderStyle* b) const override
     1163private:
     1164    bool equals(const RenderStyle* a, const RenderStyle* b) const final
    11651165    {
    11661166        if (a == b)
     
    11831183    }
    11841184
    1185     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const override
    1186     {
    1187         Color fromColor = value(a);
    1188         Color toColor = value(b);
     1185    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
     1186    {
     1187        Color fromColor = value(from);
     1188        Color toColor = value(to);
    11891189
    11901190        if (!fromColor.isValid() && !toColor.isValid())
     
    11921192
    11931193        if (!fromColor.isValid())
    1194             fromColor = a->color();
     1194            fromColor = from->color();
    11951195        if (!toColor.isValid())
    1196             toColor = b->color();
    1197         (dst->*m_setter)(blendFunc(anim, fromColor, toColor, progress));
    1198     }
    1199 
    1200     Color value(const RenderStyle* a) const
    1201     {
    1202         return (a->*m_getter)();
     1196            toColor = to->color();
     1197        (destination->*m_setter)(blendFunc(client, fromColor, toColor, progress));
     1198    }
     1199
     1200    Color value(const RenderStyle* style) const
     1201    {
     1202        return (style->*m_getter)();
    12031203    }
    12041204
    12051205#if !LOG_DISABLED
    1206     void logBlend(const RenderStyle* a, const RenderStyle* b, const RenderStyle* result, double progress) const final
     1206    void logBlend(const RenderStyle* from, const RenderStyle* to, const RenderStyle* result, double progress) const final
    12071207    {
    12081208        // FIXME: better logging.
    1209         LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(property()) << " from " << value(a) << " to " << value(b) << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << value(result));
     1209        LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(property()) << " from " << value(from) << " to " << value(to) << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << value(result));
    12101210    }
    12111211#endif
    12121212
    1213 private:
    12141213    const Color& (RenderStyle::*m_getter)() const;
    12151214    void (RenderStyle::*m_setter)(const Color&);
     
    12181217
    12191218enum MaybeInvalidColorTag { MaybeInvalidColor };
    1220 class PropertyWrapperVisitedAffectedColor : public AnimationPropertyWrapperBase {
    1221     WTF_MAKE_FAST_ALLOCATED;
    1222 public:
    1223     PropertyWrapperVisitedAffectedColor(CSSPropertyID prop, const Color& (RenderStyle::*getter)() const, void (RenderStyle::*setter)(const Color&), const Color& (RenderStyle::*visitedGetter)() const, void (RenderStyle::*visitedSetter)(const Color&))
    1224         : AnimationPropertyWrapperBase(prop)
    1225         , m_wrapper(makeUnique<PropertyWrapper<const Color&>>(prop, getter, setter))
    1226         , m_visitedWrapper(makeUnique<PropertyWrapper<const Color&>>(prop, visitedGetter, visitedSetter))
    1227     {
    1228     }
    1229     PropertyWrapperVisitedAffectedColor(CSSPropertyID prop, MaybeInvalidColorTag, const Color& (RenderStyle::*getter)() const, void (RenderStyle::*setter)(const Color&), const Color& (RenderStyle::*visitedGetter)() const, void (RenderStyle::*visitedSetter)(const Color&))
    1230         : AnimationPropertyWrapperBase(prop)
    1231         , m_wrapper(makeUnique<PropertyWrapperMaybeInvalidColor>(prop, getter, setter))
    1232         , m_visitedWrapper(makeUnique<PropertyWrapperMaybeInvalidColor>(prop, visitedGetter, visitedSetter))
    1233     {
    1234     }
    1235     bool equals(const RenderStyle* a, const RenderStyle* b) const override
     1219class PropertyWrapperVisitedAffectedColor final : public AnimationPropertyWrapperBase {
     1220    WTF_MAKE_FAST_ALLOCATED;
     1221public:
     1222    PropertyWrapperVisitedAffectedColor(CSSPropertyID property, const Color& (RenderStyle::*getter)() const, void (RenderStyle::*setter)(const Color&), const Color& (RenderStyle::*visitedGetter)() const, void (RenderStyle::*visitedSetter)(const Color&))
     1223        : AnimationPropertyWrapperBase(property)
     1224        , m_wrapper(makeUnique<PropertyWrapper<const Color&>>(property, getter, setter))
     1225        , m_visitedWrapper(makeUnique<PropertyWrapper<const Color&>>(property, visitedGetter, visitedSetter))
     1226    {
     1227    }
     1228    PropertyWrapperVisitedAffectedColor(CSSPropertyID property, MaybeInvalidColorTag, const Color& (RenderStyle::*getter)() const, void (RenderStyle::*setter)(const Color&), const Color& (RenderStyle::*visitedGetter)() const, void (RenderStyle::*visitedSetter)(const Color&))
     1229        : AnimationPropertyWrapperBase(property)
     1230        , m_wrapper(makeUnique<PropertyWrapperMaybeInvalidColor>(property, getter, setter))
     1231        , m_visitedWrapper(makeUnique<PropertyWrapperMaybeInvalidColor>(property, visitedGetter, visitedSetter))
     1232    {
     1233    }
     1234
     1235private:
     1236    bool equals(const RenderStyle* a, const RenderStyle* b) const final
    12361237    {
    12371238        return m_wrapper->equals(a, b) && m_visitedWrapper->equals(a, b);
    12381239    }
    1239     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const override
    1240     {
    1241         m_wrapper->blend(anim, dst, a, b, progress);
    1242         m_visitedWrapper->blend(anim, dst, a, b, progress);
     1240
     1241    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
     1242    {
     1243        m_wrapper->blend(client, destination, from, to, progress);
     1244        m_visitedWrapper->blend(client, destination, from, to, progress);
    12431245    }
    12441246
    12451247#if !LOG_DISABLED
    1246     void logBlend(const RenderStyle* a, const RenderStyle* b, const RenderStyle* result, double progress) const final
    1247     {
    1248         m_wrapper->logBlend(a, b, result, progress);
    1249         m_visitedWrapper->logBlend(a, b, result, progress);
     1248    void logBlend(const RenderStyle* from, const RenderStyle* to, const RenderStyle* result, double progress) const final
     1249    {
     1250        m_wrapper->logBlend(from, to, result, progress);
     1251        m_visitedWrapper->logBlend(from, to, result, progress);
    12501252    }
    12511253#endif
    12521254
    1253 private:
    12541255    std::unique_ptr<AnimationPropertyWrapperBase> m_wrapper;
    12551256    std::unique_ptr<AnimationPropertyWrapperBase> m_visitedWrapper;
     
    12751276    virtual void logBlend(const FillLayer* result, const FillLayer*, const FillLayer*, double) const = 0;
    12761277#endif
     1278
    12771279private:
    12781280    CSSPropertyID m_property;
     
    12901292    }
    12911293
     1294protected:
    12921295    bool equals(const FillLayer* a, const FillLayer* b) const override
    12931296    {
     
    12961299        if (!a || !b)
    12971300            return false;
    1298         return this->value(a) == this->value(b);
     1301        return value(a) == value(b);
    12991302    }
    13001303
     
    13051308
    13061309#if !LOG_DISABLED
    1307     void logBlend(const FillLayer* result, const FillLayer* a, const FillLayer* b, double progress) const override
    1308     {
    1309         LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(property()) << " from " << value(a) << " to " << value(b) << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << value(result));
     1310    void logBlend(const FillLayer* result, const FillLayer* from, const FillLayer* to, double progress) const override
     1311    {
     1312        LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(property()) << " from " << value(from) << " to " << value(to) << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << value(result));
    13101313    }
    13111314#endif
    13121315
    1313 protected:
     1316private:
    13141317    T (FillLayer::*m_getter)() const;
    13151318};
    13161319
    13171320template <typename T>
    1318 class FillLayerPropertyWrapper : public FillLayerPropertyWrapperGetter<const T&> {
     1321class FillLayerPropertyWrapper final : public FillLayerPropertyWrapperGetter<const T&> {
    13191322    WTF_MAKE_FAST_ALLOCATED;
    13201323public:
     
    13251328    }
    13261329
    1327     void blend(const CSSPropertyBlendingClient* anim, FillLayer* dst, const FillLayer* a, const FillLayer* b, double progress) const override
    1328     {
    1329         (dst->*m_setter)(blendFunc(anim, this->value(a), this->value(b), progress));
    1330     }
    1331 
    1332     bool canInterpolate(const FillLayer* a, const FillLayer* b) const override
    1333     {
    1334         return canInterpolateLengthVariants(this->value(a), this->value(b));
     1330private:
     1331    void blend(const CSSPropertyBlendingClient* client, FillLayer* destination, const FillLayer* from, const FillLayer* to, double progress) const final
     1332    {
     1333        (destination->*this->m_setter)(blendFunc(client, this->value(from), this->value(to), progress));
     1334    }
     1335
     1336    bool canInterpolate(const FillLayer* from, const FillLayer* to) const final
     1337    {
     1338        return canInterpolateLengthVariants(this->value(from), this->value(to));
    13351339    }
    13361340
    13371341#if !LOG_DISABLED
    1338     void logBlend(const FillLayer* result, const FillLayer* a, const FillLayer* b, double progress) const override
     1342    void logBlend(const FillLayer* result, const FillLayer* from, const FillLayer* to, double progress) const final
    13391343    {
    13401344        LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(FillLayerPropertyWrapperGetter<const T&>::property())
    1341             << " from " << FillLayerPropertyWrapperGetter<const T&>::value(a)
    1342             << " to " << FillLayerPropertyWrapperGetter<const T&>::value(b)
     1345            << " from " << FillLayerPropertyWrapperGetter<const T&>::value(from)
     1346            << " to " << FillLayerPropertyWrapperGetter<const T&>::value(to)
    13431347            << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << FillLayerPropertyWrapperGetter<const T&>::value(result));
    13441348    }
    13451349#endif
    13461350
    1347 protected:
    13481351    void (FillLayer::*m_setter)(T);
    13491352};
    13501353
    1351 class FillLayerPositionPropertyWrapper : public FillLayerPropertyWrapperGetter<const Length&> {
     1354class FillLayerPositionPropertyWrapper final : public FillLayerPropertyWrapperGetter<const Length&> {
    13521355    WTF_MAKE_FAST_ALLOCATED;
    13531356public:
     
    13611364    }
    13621365
    1363     bool equals(const FillLayer* a, const FillLayer* b) const override
     1366private:
     1367    bool equals(const FillLayer* a, const FillLayer* b) const final
    13641368    {
    13651369        if (a == b)
     
    13681372            return false;
    13691373
    1370         auto fromLength = this->value(a);
    1371         auto toLength = this->value(b);
     1374        auto fromLength = value(a);
     1375        auto toLength = value(b);
    13721376       
    13731377        Edge fromEdge = (a->*m_originGetter)();
     
    13771381    }
    13781382
    1379     void blend(const CSSPropertyBlendingClient* anim, FillLayer* dst, const FillLayer* a, const FillLayer* b, double progress) const override
    1380     {
    1381         auto fromLength = this->value(a);
    1382         auto toLength = this->value(b);
     1383    void blend(const CSSPropertyBlendingClient* client, FillLayer* destination, const FillLayer* from, const FillLayer* to, double progress) const final
     1384    {
     1385        auto fromLength = value(from);
     1386        auto toLength = value(to);
    13831387       
    1384         Edge fromEdge = (a->*m_originGetter)();
    1385         Edge toEdge = (b->*m_originGetter)();
     1388        Edge fromEdge = (from->*m_originGetter)();
     1389        Edge toEdge = (to->*m_originGetter)();
    13861390       
    13871391        if (fromEdge != toEdge) {
     
    13911395            else if (toEdge == m_farEdge) {
    13921396                toLength = convertTo100PercentMinusLength(toLength);
    1393                 (dst->*m_originSetter)(fromEdge); // Now we have a calc(100% - l), it's relative to the left/top edge.
     1397                (destination->*m_originSetter)(fromEdge); // Now we have a calc(100% - l), it's relative to the left/top edge.
    13941398            }
    13951399        }
    13961400
    1397         (dst->*m_lengthSetter)(blendFunc(anim, fromLength, toLength, progress));
     1401        (destination->*m_lengthSetter)(blendFunc(client, fromLength, toLength, progress));
    13981402    }
    13991403
    14001404#if !LOG_DISABLED
    1401     void logBlend(const FillLayer* result, const FillLayer* a, const FillLayer* b, double progress) const override
    1402     {
    1403         LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(property()) << " from " << value(a) << " to " << value(b) << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << value(result));
     1405    void logBlend(const FillLayer* result, const FillLayer* from, const FillLayer* to, double progress) const final
     1406    {
     1407        LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(property()) << " from " << value(from) << " to " << value(to) << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << value(result));
    14041408    }
    14051409#endif
    14061410
    1407 protected:
    14081411    void (FillLayer::*m_lengthSetter)(Length);
    14091412    Edge (FillLayer::*m_originGetter)() const;
     
    14221425    }
    14231426
    1424     void blend(const CSSPropertyBlendingClient* anim, FillLayer* dst, const FillLayer* a, const FillLayer* b, double progress) const override
    1425     {
    1426         (dst->*m_setter)(blendFunc(anim, this->value(a), this->value(b), progress));
     1427private:
     1428    void blend(const CSSPropertyBlendingClient* client, FillLayer* destination, const FillLayer* from, const FillLayer* to, double progress) const final
     1429    {
     1430        (destination->*this->m_setter)(blendFunc(client, this->value(from), this->value(to), progress));
    14271431    }
    14281432
    14291433#if !LOG_DISABLED
    1430     void logBlend(const FillLayer* result, const FillLayer* a, const FillLayer* b, double progress) const override
     1434    void logBlend(const FillLayer* result, const FillLayer* from, const FillLayer* to, double progress) const override
    14311435    {
    14321436        LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(FillLayerPropertyWrapperGetter<T*>::property())
    1433             << " from " << FillLayerPropertyWrapperGetter<T*>::value(a)
    1434             << " to " << FillLayerPropertyWrapperGetter<T*>::value(b)
     1437            << " from " << FillLayerPropertyWrapperGetter<T*>::value(from)
     1438            << " to " << FillLayerPropertyWrapperGetter<T*>::value(to)
    14351439            << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << FillLayerPropertyWrapperGetter<T*>::value(result));
    14361440    }
    14371441#endif
    14381442
    1439 protected:
    14401443    void (FillLayer::*m_setter)(RefPtr<T>&&);
    14411444};
    14421445
    1443 class FillLayerStyleImagePropertyWrapper : public FillLayerRefCountedPropertyWrapper<StyleImage> {
     1446class FillLayerStyleImagePropertyWrapper final : public FillLayerRefCountedPropertyWrapper<StyleImage> {
    14441447    WTF_MAKE_FAST_ALLOCATED;
    14451448public:
     
    14491452    }
    14501453
    1451     bool equals(const FillLayer* a, const FillLayer* b) const override
     1454private:
     1455    bool equals(const FillLayer* a, const FillLayer* b) const final
    14521456    {
    14531457        if (a == b)
     
    14551459        if (!a || !b)
    14561460            return false;
    1457         return arePointingToEqualData(this->value(a), this->value(b));
     1461        return arePointingToEqualData(value(a), value(b));
    14581462    }
    14591463
    14601464#if !LOG_DISABLED
    1461     void logBlend(const FillLayer* result, const FillLayer* a, const FillLayer* b, double progress) const override
    1462     {
    1463         LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(property()) << " from " << value(a) << " to " << value(b) << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << value(result));
     1465    void logBlend(const FillLayer* result, const FillLayer* from, const FillLayer* to, double progress) const final
     1466    {
     1467        LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(property()) << " from " << value(from) << " to " << value(to) << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << value(result));
    14641468    }
    14651469#endif
    14661470};
    14671471
    1468 class FillLayersPropertyWrapper : public AnimationPropertyWrapperBase {
     1472class FillLayersPropertyWrapper final : public AnimationPropertyWrapperBase {
    14691473    WTF_MAKE_FAST_ALLOCATED;
    14701474public:
     
    14991503    }
    15001504
    1501     bool equals(const RenderStyle* a, const RenderStyle* b) const override
     1505private:
     1506    bool equals(const RenderStyle* a, const RenderStyle* b) const final
    15021507    {
    15031508        if (a == b)
     
    15201525    }
    15211526
    1522     bool canInterpolate(const RenderStyle* a, const RenderStyle* b) const override
    1523     {
    1524         auto* fromLayer = &(a->*m_layersGetter)();
    1525         auto* toLayer = &(b->*m_layersGetter)();
     1527    bool canInterpolate(const RenderStyle* from, const RenderStyle* to) const final
     1528    {
     1529        auto* fromLayer = &(from->*m_layersGetter)();
     1530        auto* toLayer = &(to->*m_layersGetter)();
    15261531
    15271532        while (fromLayer && toLayer) {
     
    15361541    }
    15371542
    1538     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const override
    1539     {
    1540         auto* aLayer = &(a->*m_layersGetter)();
    1541         auto* bLayer = &(b->*m_layersGetter)();
    1542         auto* dstLayer = &(dst->*m_layersAccessor)();
    1543 
    1544         while (aLayer && bLayer && dstLayer) {
    1545             m_fillLayerPropertyWrapper->blend(anim, dstLayer, aLayer, bLayer, progress);
    1546             aLayer = aLayer->next();
    1547             bLayer = bLayer->next();
     1543    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
     1544    {
     1545        auto* fromLayer = &(from->*m_layersGetter)();
     1546        auto* toLayer = &(to->*m_layersGetter)();
     1547        auto* dstLayer = &(destination->*m_layersAccessor)();
     1548
     1549        while (fromLayer && toLayer && dstLayer) {
     1550            m_fillLayerPropertyWrapper->blend(client, dstLayer, fromLayer, toLayer, progress);
     1551            fromLayer = fromLayer->next();
     1552            toLayer = toLayer->next();
    15481553            dstLayer = dstLayer->next();
    15491554        }
     
    15531558    void logBlend(const RenderStyle* from, const RenderStyle* to, const RenderStyle* result, double progress) const final
    15541559    {
    1555         auto* aLayer = &(from->*m_layersGetter)();
    1556         auto* bLayer = &(to->*m_layersGetter)();
     1560        auto* fromLayer = &(from->*m_layersGetter)();
     1561        auto* toLayer = &(to->*m_layersGetter)();
    15571562        auto* dstLayer = &(result->*m_layersGetter)();
    15581563
    1559         while (aLayer && bLayer && dstLayer) {
    1560             m_fillLayerPropertyWrapper->logBlend(dstLayer, aLayer, bLayer, progress);
    1561             aLayer = aLayer->next();
    1562             bLayer = bLayer->next();
     1564        while (fromLayer && toLayer && dstLayer) {
     1565            m_fillLayerPropertyWrapper->logBlend(dstLayer, fromLayer, toLayer, progress);
     1566            fromLayer = fromLayer->next();
     1567            toLayer = toLayer->next();
    15631568            dstLayer = dstLayer->next();
    15641569        }
     
    15661571#endif
    15671572
    1568 private:
    15691573    std::unique_ptr<FillLayerAnimationPropertyWrapperBase> m_fillLayerPropertyWrapper;
    1570 
    15711574    LayersGetter m_layersGetter;
    15721575    LayersAccessor m_layersAccessor;
    15731576};
    15741577
    1575 class ShorthandPropertyWrapper : public AnimationPropertyWrapperBase {
     1578class ShorthandPropertyWrapper final : public AnimationPropertyWrapperBase {
    15761579    WTF_MAKE_FAST_ALLOCATED;
    15771580public:
     
    15821585    }
    15831586
    1584     bool isShorthandWrapper() const override { return true; }
    1585 
    1586     bool equals(const RenderStyle* a, const RenderStyle* b) const override
     1587    bool isShorthandWrapper() const final { return true; }
     1588
     1589    const Vector<AnimationPropertyWrapperBase*>& propertyWrappers() const { return m_propertyWrappers; }
     1590
     1591private:
     1592    bool equals(const RenderStyle* a, const RenderStyle* b) const final
    15871593    {
    15881594        if (a == b)
     
    15981604    }
    15991605
    1600     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const override
     1606    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
    16011607    {
    16021608        for (auto& wrapper : m_propertyWrappers)
    1603             wrapper->blend(anim, dst, a, b, progress);
     1609            wrapper->blend(client, destination, from, to, progress);
    16041610    }
    16051611
    16061612#if !LOG_DISABLED
    1607     void logBlend(const RenderStyle* a, const RenderStyle* b, const RenderStyle* dst, double progress) const final
     1613    void logBlend(const RenderStyle* from, const RenderStyle* to, const RenderStyle* destination, double progress) const final
    16081614    {
    16091615        for (auto& wrapper : m_propertyWrappers)
    1610             wrapper->logBlend(a, b, dst, progress);
     1616            wrapper->logBlend(from, to, destination, progress);
    16111617    }
    16121618#endif
    16131619
    1614     const Vector<AnimationPropertyWrapperBase*>& propertyWrappers() const { return m_propertyWrappers; }
    1615 
    1616 private:
    16171620    Vector<AnimationPropertyWrapperBase*> m_propertyWrappers;
    16181621};
    16191622
    1620 class PropertyWrapperFlex : public AnimationPropertyWrapperBase {
     1623class PropertyWrapperFlex final : public AnimationPropertyWrapperBase {
    16211624    WTF_MAKE_FAST_ALLOCATED;
    16221625public:
     
    16261629    }
    16271630
    1628     bool equals(const RenderStyle* a, const RenderStyle* b) const override
     1631private:
     1632    bool equals(const RenderStyle* a, const RenderStyle* b) const final
    16291633    {
    16301634        if (a == b)
     
    16361640    }
    16371641
    1638     bool canInterpolate(const RenderStyle* a, const RenderStyle* b) const override
    1639     {
    1640         return a->flexGrow() != b->flexGrow() && a->flexShrink() != b->flexShrink() && canInterpolateLengths(a->flexBasis(), b->flexBasis(), false);
    1641     }
    1642 
    1643     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const override
    1644     {
    1645         dst->setFlexBasis(blendFunc(anim, a->flexBasis(), b->flexBasis(), progress));
    1646         dst->setFlexGrow(blendFunc(anim, a->flexGrow(), b->flexGrow(), progress));
    1647         dst->setFlexShrink(blendFunc(anim, a->flexShrink(), b->flexShrink(), progress));
     1642    bool canInterpolate(const RenderStyle* from, const RenderStyle* to) const final
     1643    {
     1644        return from->flexGrow() != to->flexGrow() && from->flexShrink() != to->flexShrink() && canInterpolateLengths(from->flexBasis(), to->flexBasis(), false);
     1645    }
     1646
     1647    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
     1648    {
     1649        destination->setFlexBasis(blendFunc(client, from->flexBasis(), to->flexBasis(), progress));
     1650        destination->setFlexGrow(blendFunc(client, from->flexGrow(), to->flexGrow(), progress));
     1651        destination->setFlexShrink(blendFunc(client, from->flexShrink(), to->flexShrink(), progress));
    16481652    }
    16491653
     
    16571661};
    16581662
    1659 class PropertyWrapperSVGPaint : public AnimationPropertyWrapperBase {
    1660     WTF_MAKE_FAST_ALLOCATED;
    1661 public:
    1662     PropertyWrapperSVGPaint(CSSPropertyID prop, SVGPaintType (RenderStyle::*paintTypeGetter)() const, Color (RenderStyle::*getter)() const, void (RenderStyle::*setter)(const Color&))
    1663         : AnimationPropertyWrapperBase(prop)
     1663class PropertyWrapperSVGPaint final : public AnimationPropertyWrapperBase {
     1664    WTF_MAKE_FAST_ALLOCATED;
     1665public:
     1666    PropertyWrapperSVGPaint(CSSPropertyID property, SVGPaintType (RenderStyle::*paintTypeGetter)() const, Color (RenderStyle::*getter)() const, void (RenderStyle::*setter)(const Color&))
     1667        : AnimationPropertyWrapperBase(property)
    16641668        , m_paintTypeGetter(paintTypeGetter)
    16651669        , m_getter(getter)
     
    16681672    }
    16691673
    1670     bool equals(const RenderStyle* a, const RenderStyle* b) const override
     1674private:
     1675    bool equals(const RenderStyle* a, const RenderStyle* b) const final
    16711676    {
    16721677        if (a == b)
     
    16981703    }
    16991704
    1700     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const override
    1701     {
    1702         if ((a->*m_paintTypeGetter)() != SVGPaintType::RGBColor
    1703             || (b->*m_paintTypeGetter)() != SVGPaintType::RGBColor)
     1705    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
     1706    {
     1707        if ((from->*m_paintTypeGetter)() != SVGPaintType::RGBColor
     1708            || (to->*m_paintTypeGetter)() != SVGPaintType::RGBColor)
    17041709            return;
    17051710
    1706         Color fromColor = (a->*m_getter)();
    1707         Color toColor = (b->*m_getter)();
     1711        Color fromColor = (from->*m_getter)();
     1712        Color toColor = (to->*m_getter)();
    17081713
    17091714        if (!fromColor.isValid() && !toColor.isValid())
     
    17141719        if (!toColor.isValid())
    17151720            toColor = Color();
    1716         (dst->*m_setter)(blendFunc(anim, fromColor, toColor, progress));
     1721        (destination->*m_setter)(blendFunc(client, fromColor, toColor, progress));
    17171722    }
    17181723
     
    17251730#endif
    17261731
    1727 private:
    17281732    SVGPaintType (RenderStyle::*m_paintTypeGetter)() const;
    17291733    Color (RenderStyle::*m_getter)() const;
     
    17311735};
    17321736
    1733 class PropertyWrapperFontStyle : public PropertyWrapper<Optional<FontSelectionValue>> {
     1737class PropertyWrapperFontStyle final : public PropertyWrapper<Optional<FontSelectionValue>> {
    17341738    WTF_MAKE_FAST_ALLOCATED;
    17351739public:
     
    17391743    }
    17401744
    1741     bool canInterpolate(const RenderStyle* from, const RenderStyle* to) const override
     1745private:
     1746    bool canInterpolate(const RenderStyle* from, const RenderStyle* to) const final
    17421747    {
    17431748        return from->fontItalic() && to->fontItalic() && from->fontDescription().fontStyleAxis() == FontStyleAxis::slnt && to->fontDescription().fontStyleAxis() == FontStyleAxis::slnt;
    17441749    }
    17451750
    1746     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* from, const RenderStyle* to, double progress) const override
     1751    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
    17471752    {
    17481753        auto discrete = !canInterpolate(from, to);
     
    17561761        auto blendedFontItalic = progress < 0.5 ? fromFontItalic : toFontItalic;
    17571762        if (!discrete)
    1758             blendedFontItalic = blendFunc(anim, fromFontItalic, toFontItalic, progress);
    1759 
    1760         FontSelector* currentFontSelector = dst->fontCascade().fontSelector();
    1761         auto description = dst->fontDescription();
     1763            blendedFontItalic = blendFunc(client, fromFontItalic, toFontItalic, progress);
     1764
     1765        FontSelector* currentFontSelector = destination->fontCascade().fontSelector();
     1766        auto description = destination->fontDescription();
    17621767        description.setItalic(blendedFontItalic);
    17631768        description.setFontStyleAxis(blendedStyleAxis);
    1764         dst->setFontDescription(WTFMove(description));
    1765         dst->fontCascade().update(currentFontSelector);
     1769        destination->setFontDescription(WTFMove(description));
     1770        destination->fontCascade().update(currentFontSelector);
    17661771    }
    17671772};
    17681773
    17691774template <typename T>
    1770 class AutoPropertyWrapper : public PropertyWrapper<T> {
    1771     WTF_MAKE_FAST_ALLOCATED;
    1772 public:
    1773     AutoPropertyWrapper(CSSPropertyID prop, T (RenderStyle::*getter)() const, void (RenderStyle::*setter)(T), bool (RenderStyle::*autoGetter)() const, void (RenderStyle::*autoSetter)(), Optional<T> minValue = WTF::nullopt)
    1774         : PropertyWrapper<T>(prop, getter, setter)
     1775class AutoPropertyWrapper final : public PropertyWrapper<T> {
     1776    WTF_MAKE_FAST_ALLOCATED;
     1777public:
     1778    AutoPropertyWrapper(CSSPropertyID property, T (RenderStyle::*getter)() const, void (RenderStyle::*setter)(T), bool (RenderStyle::*autoGetter)() const, void (RenderStyle::*autoSetter)(), Optional<T> minValue = WTF::nullopt)
     1779        : PropertyWrapper<T>(property, getter, setter)
    17751780        , m_autoGetter(autoGetter)
    17761781        , m_autoSetter(autoSetter)
     
    17791784    }
    17801785
    1781     bool canInterpolate(const RenderStyle* from, const RenderStyle* to) const override
     1786private:
     1787    bool canInterpolate(const RenderStyle* from, const RenderStyle* to) const final
    17821788    {
    17831789        return !(from->*m_autoGetter)() && !(to->*m_autoGetter)();
    17841790    }
    17851791
    1786     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* from, const RenderStyle* to, double progress) const override
    1787     {
    1788         auto blendedValue = blendFunc(anim, this->value(from), this->value(to), progress);
    1789         if (this->m_minValue)
    1790             blendedValue = blendedValue > *this->m_minValue ? blendedValue : *this->m_minValue;
    1791         (dst->*this->m_setter)(blendedValue);
     1792    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
     1793    {
     1794        auto blendedValue = blendFunc(client, this->value(from), this->value(to), progress);
     1795        if (m_minValue)
     1796            blendedValue = blendedValue > *m_minValue ? blendedValue : *m_minValue;
     1797        (destination->*this->m_setter)(blendedValue);
    17921798
    17931799        if (canInterpolate(from, to))
     
    17971803        if (!progress) {
    17981804            if ((from->*m_autoGetter)())
    1799                 (dst->*m_autoSetter)();
     1805                (destination->*m_autoSetter)();
    18001806        } else {
    18011807            if ((to->*m_autoGetter)())
    1802                 (dst->*m_autoSetter)();
    1803         }
    1804     }
    1805 
    1806 private:
     1808                (destination->*m_autoSetter)();
     1809        }
     1810    }
     1811
    18071812    bool (RenderStyle::*m_autoGetter)() const;
    18081813    void (RenderStyle::*m_autoSetter)();
     
    18131818    WTF_MAKE_FAST_ALLOCATED;
    18141819public:
    1815     NonNegativeFloatPropertyWrapper(CSSPropertyID prop, float (RenderStyle::*getter)() const, void (RenderStyle::*setter)(float))
    1816         : PropertyWrapper<float>(prop, getter, setter)
    1817     {
    1818     }
    1819 
    1820     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* from, const RenderStyle* to, double progress) const override
    1821     {
    1822         auto blendedValue = blendFunc(anim, value(from), value(to), progress);
    1823         (dst->*m_setter)(blendedValue > 0 ? blendedValue : 0);
    1824     }
    1825 };
    1826 
    1827 class PerspectiveWrapper : public NonNegativeFloatPropertyWrapper {
     1820    NonNegativeFloatPropertyWrapper(CSSPropertyID property, float (RenderStyle::*getter)() const, void (RenderStyle::*setter)(float))
     1821        : PropertyWrapper<float>(property, getter, setter)
     1822    {
     1823    }
     1824
     1825protected:
     1826    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const override
     1827    {
     1828        auto blendedValue = blendFunc(client, value(from), value(to), progress);
     1829        (destination->*m_setter)(blendedValue > 0 ? blendedValue : 0);
     1830    }
     1831};
     1832
     1833class PerspectiveWrapper final : public NonNegativeFloatPropertyWrapper {
    18281834    WTF_MAKE_FAST_ALLOCATED;
    18291835public:
     
    18331839    }
    18341840
    1835     bool canInterpolate(const RenderStyle* from, const RenderStyle* to) const override
     1841private:
     1842    bool canInterpolate(const RenderStyle* from, const RenderStyle* to) const final
    18361843    {
    18371844        if (!from->hasPerspective() || !to->hasPerspective())
     
    18401847    }
    18411848
    1842     void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* from, const RenderStyle* to, double progress) const override
     1849    void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final
    18431850    {
    18441851        if (!canInterpolate(from, to))
    1845             (dst->*m_setter)(progress ? value(to) : value(from));
     1852            (destination->*m_setter)(progress ? value(to) : value(from));
    18461853        else
    1847             NonNegativeFloatPropertyWrapper::blend(anim, dst, from, to, progress);
    1848     }
    1849 };
    1850 
    1851 class CSSPropertyAnimationWrapperMap {
     1854            NonNegativeFloatPropertyWrapper::blend(client, destination, from, to, progress);
     1855    }
     1856};
     1857
     1858class CSSPropertyAnimationWrapperMap final {
    18521859    WTF_MAKE_FAST_ALLOCATED;
    18531860public:
     
    22392246}
    22402247
    2241 // Returns true if we need to start animation timers
    2242 void CSSPropertyAnimation::blendProperties(const CSSPropertyBlendingClient* anim, CSSPropertyID prop, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress)
    2243 {
    2244     ASSERT(prop != CSSPropertyInvalid);
    2245 
    2246     AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::singleton().wrapperForProperty(prop);
     2248void CSSPropertyAnimation::blendProperties(const CSSPropertyBlendingClient* client, CSSPropertyID property, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress)
     2249{
     2250    ASSERT(property != CSSPropertyInvalid);
     2251
     2252    AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::singleton().wrapperForProperty(property);
    22472253    if (wrapper) {
    22482254        // https://drafts.csswg.org/web-animations-1/#discrete
    22492255        // The property’s values cannot be meaningfully combined, thus it is not additive and
    22502256        // interpolation swaps from Va to Vb at 50% (p=0.5).
    2251         if (!wrapper->canInterpolate(a, b))
     2257        if (!wrapper->canInterpolate(from, to))
    22522258            progress = progress < 0.5 ? 0 : 1;
    2253         wrapper->blend(anim, dst, a, b, progress);
     2259        wrapper->blend(client, destination, from, to, progress);
    22542260#if !LOG_DISABLED
    2255         wrapper->logBlend(a, b, dst, progress);
     2261        wrapper->logBlend(from, to, destination, progress);
    22562262#endif
    22572263    }
    22582264}
    22592265
    2260 bool CSSPropertyAnimation::isPropertyAnimatable(CSSPropertyID prop)
    2261 {
    2262     return CSSPropertyAnimationWrapperMap::singleton().wrapperForProperty(prop);
    2263 }
    2264 
    2265 bool CSSPropertyAnimation::animationOfPropertyIsAccelerated(CSSPropertyID prop)
    2266 {
    2267     AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::singleton().wrapperForProperty(prop);
     2266bool CSSPropertyAnimation::isPropertyAnimatable(CSSPropertyID property)
     2267{
     2268    return CSSPropertyAnimationWrapperMap::singleton().wrapperForProperty(property);
     2269}
     2270
     2271bool CSSPropertyAnimation::animationOfPropertyIsAccelerated(CSSPropertyID property)
     2272{
     2273    AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::singleton().wrapperForProperty(property);
    22682274    return wrapper ? wrapper->animationIsAccelerated() : false;
    22692275}
     
    22812287}
    22822288
    2283 bool CSSPropertyAnimation::propertiesEqual(CSSPropertyID prop, const RenderStyle* a, const RenderStyle* b)
    2284 {
    2285     AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::singleton().wrapperForProperty(prop);
     2289bool CSSPropertyAnimation::propertiesEqual(CSSPropertyID property, const RenderStyle* a, const RenderStyle* b)
     2290{
     2291    AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::singleton().wrapperForProperty(property);
    22862292    if (wrapper)
    22872293        return wrapper->equals(a, b);
     
    22892295}
    22902296
    2291 bool CSSPropertyAnimation::canPropertyBeInterpolated(CSSPropertyID prop, const RenderStyle* a, const RenderStyle* b)
    2292 {
    2293     AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::singleton().wrapperForProperty(prop);
     2297bool CSSPropertyAnimation::canPropertyBeInterpolated(CSSPropertyID property, const RenderStyle* from, const RenderStyle* to)
     2298{
     2299    AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::singleton().wrapperForProperty(property);
    22942300    if (wrapper)
    2295         return wrapper->canInterpolate(a, b);
     2301        return wrapper->canInterpolate(from, to);
    22962302    return false;
    22972303}
Note: See TracChangeset for help on using the changeset viewer.