Changeset 291128 in webkit


Ignore:
Timestamp:
Mar 10, 2022 1:41:57 PM (4 months ago)
Author:
graouts@webkit.org
Message:

[web-animations] quotes should support discrete animation
https://bugs.webkit.org/show_bug.cgi?id=237721

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:

Source/WebCore:

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r291124 r291128  
     12022-03-10  Antoine Quint  <graouts@webkit.org>
     2
     3        [web-animations] quotes should support discrete animation
     4        https://bugs.webkit.org/show_bug.cgi?id=237721
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
     9        * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
     10        * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:
     11
    1122022-03-10  Chris Fleizach  <cfleizach@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt

    r290888 r291128  
    108108PASS position: "fixed" onto "absolute"
    109109PASS position: "absolute" onto "fixed"
     110PASS quotes (type: discrete) has testAccumulation function
     111PASS quotes: ""‘" "’" "“" "”"" onto ""“" "”" "‘" "’""
     112PASS quotes: ""“" "”" "‘" "’"" onto ""‘" "’" "“" "”""
    110113PASS resize (type: discrete) has testAccumulation function
    111114PASS resize: "horizontal" onto "both"
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt

    r290888 r291128  
    108108PASS position: "fixed" onto "absolute"
    109109PASS position: "absolute" onto "fixed"
     110PASS quotes (type: discrete) has testAddition function
     111PASS quotes: ""‘" "’" "“" "”"" onto ""“" "”" "‘" "’""
     112PASS quotes: ""“" "”" "‘" "’"" onto ""‘" "’" "“" "”""
    110113PASS resize (type: discrete) has testAddition function
    111114PASS resize: "horizontal" onto "both"
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt

    r290888 r291128  
    126126PASS position uses discrete animation when animating between "absolute" and "fixed" with effect easing
    127127PASS position uses discrete animation when animating between "absolute" and "fixed" with keyframe easing
     128PASS quotes (type: discrete) has testInterpolation function
     129PASS quotes uses discrete animation when animating between ""“" "”" "‘" "’"" and ""‘" "’" "“" "”"" with linear easing
     130PASS quotes uses discrete animation when animating between ""“" "”" "‘" "’"" and ""‘" "’" "“" "”"" with effect easing
     131PASS quotes uses discrete animation when animating between ""“" "”" "‘" "’"" and ""‘" "’" "“" "”"" with keyframe easing
    128132PASS resize (type: discrete) has testInterpolation function
    129133PASS resize uses discrete animation when animating between "both" and "horizontal" with linear easing
  • trunk/Source/WebCore/ChangeLog

    r291127 r291128  
     12022-03-10  Antoine Quint  <graouts@webkit.org>
     2
     3        [web-animations] quotes should support discrete animation
     4        https://bugs.webkit.org/show_bug.cgi?id=237721
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * animation/CSSPropertyAnimation.cpp:
     9        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
     10
    1112022-03-10  Chris Dumez  <cdumez@apple.com>
    212
  • trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp

    r291122 r291128  
    5858#include "OffsetRotation.h"
    5959#include "PathOperation.h"
     60#include "QuotesData.h"
    6061#include "RenderBox.h"
    6162#include "RenderStyle.h"
     
    27152716        destination.setNamedGridAreaColumnCount(source.namedGridAreaColumnCount());
    27162717    }
     2718};
     2719
     2720class QuotesWrapper final : public AnimationPropertyWrapperBase {
     2721    WTF_MAKE_FAST_ALLOCATED;
     2722public:
     2723    QuotesWrapper()
     2724        : AnimationPropertyWrapperBase(CSSPropertyQuotes)
     2725    {
     2726    }
     2727
     2728private:
     2729    bool canInterpolate(const RenderStyle&, const RenderStyle&, CompositeOperation) const override { return false; }
     2730
     2731    bool equals(const RenderStyle& a, const RenderStyle& b) const override
     2732    {
     2733        return a.quotes() == b.quotes();
     2734    }
     2735
     2736    void blend(RenderStyle& destination, const RenderStyle& from, const RenderStyle& to, const CSSPropertyBlendingContext& context) const override
     2737    {
     2738        ASSERT(!context.progress || context.progress == 1.0);
     2739        destination.setQuotes((context.progress ? to : from).quotes());
     2740    }
     2741
     2742#if !LOG_DISABLED
     2743    void logBlend(const RenderStyle&, const RenderStyle&, const RenderStyle&, double) const override
     2744    {
     2745    }
     2746#endif
    27172747};
    27182748
     
    30583088        new DiscretePropertyWrapper<FontVariantPosition>(CSSPropertyFontVariantPosition, &RenderStyle::fontVariantPosition, &RenderStyle::setFontVariantPosition),
    30593089        new DiscretePropertyWrapper<FontVariantCaps>(CSSPropertyFontVariantCaps, &RenderStyle::fontVariantCaps, &RenderStyle::setFontVariantCaps),
    3060         new GridTemplateAreasWrapper
     3090        new GridTemplateAreasWrapper,
     3091        new QuotesWrapper
    30613092    };
    30623093    const unsigned animatableLonghandPropertiesCount = WTF_ARRAY_LENGTH(animatableLonghandPropertyWrappers);
Note: See TracChangeset for help on using the changeset viewer.