⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 268876 in webkit


Ignore:
Timestamp:
Oct 22, 2020, 11:26:40 AM (6 years ago)
Author:
Alan Coon
Message:

Revert r268615. rdar://problem/70578639

Location:
branches/safari-611.1.4-branch
Files:
10 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-611.1.4-branch/LayoutTests/ChangeLog

    r268874 r268876  
     12020-10-22  Alan Coon  <alancoon@apple.com>
     2
     3        Revert r268615. rdar://problem/70578639
     4
    152020-10-22  Alan Coon  <alancoon@apple.com>
    26
  • branches/safari-611.1.4-branch/LayoutTests/TestExpectations

    r268874 r268876  
    45204520webkit.org/b/217054 fast/layoutformattingcontext/horizontal-sizing-with-trailing-letter-spacing.html [ Skip ]
    45214521
    4522 webkit.org/b/217851 transitions/interrupted-transition-hardware.html [ Pass Failure ]
    4523 webkit.org/b/217851 webanimations/accelerated-transform-related-animation-property-order.html [ Pass Failure ]
    4524 webkit.org/b/217851 webanimations/accelerated-translate-animation-additional-animation-added-in-flight.html [ Pass Failure ]
    4525 webkit.org/b/217851 webanimations/accelerated-translate-animation-underlying-transform-changed-in-flight.html [ Pass Failure ]
    4526 webkit.org/b/217851 webanimations/accelerated-translate-animation-with-transform.html [ Pass Failure ]
    4527 webkit.org/b/217851 webanimations/accelerated-translate-animation.html [ Pass Failure ]
  • branches/safari-611.1.4-branch/LayoutTests/imported/w3c/ChangeLog

    r268648 r268876  
     12020-10-22  Alan Coon  <alancoon@apple.com>
     2
     3        Revert r268615. rdar://problem/70578639
     4
    152020-10-16  Darin Adler  <darin@apple.com>
    26
  • branches/safari-611.1.4-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/rotate-interpolation-expected.txt

    r268615 r268876  
    138138PASS CSS Animations: property <rotate> from neutral to [30deg] at (1) should be [30deg]
    139139PASS CSS Animations: property <rotate> from neutral to [30deg] at (2) should be [50deg]
    140 FAIL Web Animations: property <rotate> from neutral to [30deg] at (-1) should be [-10deg] assert_equals: expected "- 10deg " but got "- 50deg "
     140PASS Web Animations: property <rotate> from neutral to [30deg] at (-1) should be [-10deg]
    141141FAIL Web Animations: property <rotate> from neutral to [30deg] at (0) should be [10deg] assert_equals: expected "10deg " but got "- 10deg "
    142 FAIL Web Animations: property <rotate> from neutral to [30deg] at (0.25) should be [15deg] assert_equals: expected "15deg " but got "7.5deg "
    143 FAIL Web Animations: property <rotate> from neutral to [30deg] at (0.75) should be [25deg] assert_equals: expected "25deg " but got "28.13deg "
     142FAIL Web Animations: property <rotate> from neutral to [30deg] at (0.25) should be [15deg] assert_equals: expected "15deg " but got "none "
     143FAIL Web Animations: property <rotate> from neutral to [30deg] at (0.75) should be [25deg] assert_equals: expected "25deg " but got "22.5deg "
    144144PASS Web Animations: property <rotate> from neutral to [30deg] at (1) should be [30deg]
    145145FAIL Web Animations: property <rotate> from neutral to [30deg] at (2) should be [50deg] assert_equals: expected "50deg " but got "30deg "
  • branches/safari-611.1.4-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/scale-interpolation-expected.txt

    r268615 r268876  
    186186PASS CSS Animations: property <scale> from neutral to [1.5 1] at (1) should be [1.5 1]
    187187PASS CSS Animations: property <scale> from neutral to [1.5 1] at (2) should be [1.9 1]
    188 FAIL Web Animations: property <scale> from neutral to [1.5 1] at (-1) should be [0.7 1] assert_equals: expected "0.7 1 " but got "- 0.1 1 "
     188PASS Web Animations: property <scale> from neutral to [1.5 1] at (-1) should be [0.7 1]
    189189FAIL Web Animations: property <scale> from neutral to [1.5 1] at (0) should be [1.1 1] assert_equals: expected "1.1 1 " but got "0.7 1 "
    190 FAIL Web Animations: property <scale> from neutral to [1.5 1] at (0.25) should be [1.2 1] assert_equals: expected "1.2 1 " but got "1.05 1 "
    191 FAIL Web Animations: property <scale> from neutral to [1.5 1] at (0.75) should be [1.4 1] assert_equals: expected "1.4 1 " but got "1.46 1 "
     190FAIL Web Animations: property <scale> from neutral to [1.5 1] at (0.25) should be [1.2 1] assert_equals: expected "1.2 1 " but got "0.9 1 "
     191FAIL Web Animations: property <scale> from neutral to [1.5 1] at (0.75) should be [1.4 1] assert_equals: expected "1.4 1 " but got "1.35 1 "
    192192PASS Web Animations: property <scale> from neutral to [1.5 1] at (1) should be [1.5 1]
    193193FAIL Web Animations: property <scale> from neutral to [1.5 1] at (2) should be [1.9 1] assert_equals: expected "1.9 1 " but got "1.5 1 "
  • branches/safari-611.1.4-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-interpolation-expected.txt

    r268615 r268876  
    234234PASS CSS Animations: property <translate> from neutral to [20px] at (1) should be [20px]
    235235PASS CSS Animations: property <translate> from neutral to [20px] at (2) should be [30px]
    236 FAIL Web Animations: property <translate> from neutral to [20px] at (-1) should be [0px] assert_equals: expected "none " but got "- 20px "
     236PASS Web Animations: property <translate> from neutral to [20px] at (-1) should be [0px]
    237237FAIL Web Animations: property <translate> from neutral to [20px] at (0) should be [10px] assert_equals: expected "10px " but got "none "
    238 FAIL Web Animations: property <translate> from neutral to [20px] at (0.25) should be [12.5px] assert_equals: expected "12.5px " but got "8.75px "
    239 FAIL Web Animations: property <translate> from neutral to [20px] at (0.75) should be [17.5px] assert_equals: expected "17.5px " but got "19.06px "
     238FAIL Web Animations: property <translate> from neutral to [20px] at (0.25) should be [12.5px] assert_equals: expected "12.5px " but got "5px "
     239FAIL Web Animations: property <translate> from neutral to [20px] at (0.75) should be [17.5px] assert_equals: expected "17.5px " but got "16.25px "
    240240PASS Web Animations: property <translate> from neutral to [20px] at (1) should be [20px]
    241241FAIL Web Animations: property <translate> from neutral to [20px] at (2) should be [30px] assert_equals: expected "30px " but got "20px "
  • branches/safari-611.1.4-branch/Source/WebCore/ChangeLog

    r268874 r268876  
     12020-10-22  Alan Coon  <alancoon@apple.com>
     2
     3        Revert r268615. rdar://problem/70578639
     4
    152020-10-22  Alan Coon  <alancoon@apple.com>
    26
  • branches/safari-611.1.4-branch/Source/WebCore/animation/CSSPropertyAnimation.cpp

    r268615 r268876  
    851851
    852852private:
    853     bool animationIsAccelerated() const final { return true; }
    854 
    855853    bool equals(const RenderStyle* a, const RenderStyle* b) const final
    856854    {
     
    868866
    869867private:
    870     bool animationIsAccelerated() const final { return true; }
    871 
    872868    bool equals(const RenderStyle* a, const RenderStyle* b) const final
    873869    {
     
    885881
    886882private:
    887     bool animationIsAccelerated() const final { return true; }
    888 
    889883    bool equals(const RenderStyle* a, const RenderStyle* b) const final
    890884    {
  • branches/safari-611.1.4-branch/Source/WebCore/platform/graphics/GraphicsLayer.cpp

    r268615 r268876  
    722722int GraphicsLayer::validateTransformOperations(const KeyframeValueList& valueList, bool& hasBigRotation)
    723723{
    724     ASSERT(animatedPropertyIsTransformOrRelated(valueList.property()));
     724    ASSERT(valueList.property() == AnimatedPropertyTransform);
    725725
    726726    hasBigRotation = false;
  • branches/safari-611.1.4-branch/Source/WebCore/platform/graphics/GraphicsLayer.h

    r268615 r268876  
    134134    }
    135135
    136     TransformAnimationValue(double keyTime, TransformOperation* value, TimingFunction* timingFunction = nullptr)
    137         : AnimationValue(keyTime, timingFunction)
    138     {
    139         if (value)
    140             m_value.operations().append(value);
    141     }
    142 
    143136    std::unique_ptr<AnimationValue> clone() const override
    144137    {
  • branches/safari-611.1.4-branch/Source/WebCore/platform/graphics/GraphicsLayerClient.h

    r268615 r268876  
    2727
    2828#include "TiledBacking.h"
    29 #include "TransformationMatrix.h"
    3029#include <wtf/Forward.h>
    3130#include <wtf/OptionSet.h>
     
    3938class IntPoint;
    4039class IntRect;
     40class TransformationMatrix;
    4141
    4242enum class GraphicsLayerPaintingPhase {
     
    5252enum AnimatedPropertyID {
    5353    AnimatedPropertyInvalid,
    54     AnimatedPropertyTranslate,
    55     AnimatedPropertyScale,
    56     AnimatedPropertyRotate,
    5754    AnimatedPropertyTransform,
    5855    AnimatedPropertyOpacity,
     
    6360#endif
    6461};
    65 
    66 inline bool animatedPropertyIsTransformOrRelated(AnimatedPropertyID property)
    67 {
    68     return property == AnimatedPropertyTransform || property == AnimatedPropertyTranslate || property == AnimatedPropertyScale || property == AnimatedPropertyRotate;
    69 }
    7062
    7163enum LayerTreeAsTextBehaviorFlags {
     
    148140    virtual void logFilledVisibleFreshTile(unsigned) { };
    149141
    150     virtual TransformationMatrix transformMatrixForProperty(AnimatedPropertyID) const { return { }; }
    151 
    152142#ifndef NDEBUG
    153143    // RenderLayerBacking overrides this to verify that it is not
  • branches/safari-611.1.4-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r268874 r268876  
    5757#include <wtf/SetForScope.h>
    5858#include <wtf/SystemTracing.h>
    59 #include <wtf/UUID.h>
    6059#include <wtf/text/StringConcatenateNumbers.h>
    6160#include <wtf/text/TextStream.h>
     
    253252{
    254253    switch (property) {
    255     case AnimatedPropertyTranslate:
    256     case AnimatedPropertyScale:
    257     case AnimatedPropertyRotate:
    258254    case AnimatedPropertyTransform:
    259255        return "transform"_s;
     
    662658    GraphicsLayer::setTransform(t);
    663659    noteLayerPropertyChanged(TransformChanged);
    664 
    665     // If we are currently running a transform-related animation, a change in underlying
    666     // transform value means we must re-evaluate all transform-related animations to ensure
    667     // that the base value transform animations are current.
    668     if (isRunningTransformAnimation())
    669         noteLayerPropertyChanged(AnimationChanged | CoverageRectChanged);
    670660}
    671661
     
    700690{
    701691    for (auto& animation : m_animations) {
    702         if ((animatedPropertyIsTransformOrRelated(animation.m_property)
     692        if ((animation.m_property == AnimatedPropertyTransform
    703693            || animation.m_property == AnimatedPropertyOpacity
    704694            || animation.m_property == AnimatedPropertyBackgroundColor
     
    10551045
    10561046    bool createdAnimations = false;
    1057     if (animatedPropertyIsTransformOrRelated(valueList.property()))
     1047    if (valueList.property() == AnimatedPropertyTransform)
    10581048        createdAnimations = createTransformAnimationsFromKeyframes(valueList, anim, animationName, Seconds { timeOffset }, boxSize);
    10591049    else if (valueList.property() == AnimatedPropertyFilter) {
     
    28622852void GraphicsLayerCA::updateAnimations()
    28632853{
    2864     enum class Additive { Yes, No };
    2865     auto addAnimation = [&](LayerPropertyAnimation& animation, Additive additive = Additive::Yes) {
    2866         animation.m_animation->setAdditive(additive == Additive::Yes);
     2854    // Remove all animations so far.
     2855    for (auto& animation : m_animations)
     2856        removeCAAnimationFromLayer(animation);
     2857
     2858    // Remove all animations from the list that were pending removal.
     2859    m_animations.removeAllMatching([&](LayerPropertyAnimation animation) {
     2860        return animation.m_pendingRemoval;
     2861    });
     2862
     2863    // Add all remaining animations.
     2864    for (auto& animation : m_animations) {
    28672865        setAnimationOnLayer(animation);
    28682866        if (animation.m_playState == PlayState::PausePending || animation.m_playState == PlayState::Paused) {
     
    28712869        } else
    28722870            animation.m_playState = PlayState::Playing;
    2873     };
    2874 
    2875     enum class TransformationMatrixSource { UseIdentityMatrix, AskClient };
    2876     auto addBaseValueTransformAnimation = [&](AnimatedPropertyID property, TransformationMatrixSource matrixSource = TransformationMatrixSource::AskClient) {
    2877         // A base value transform animation can either be set to the identity matrix or to read the underlying
    2878         // value from the GraphicsLayerClient. If we didn't explicitly ask for an identity matrix, we can skip
    2879         // the addition of this base value transform animation since it will be a no-op.
    2880         auto matrix = matrixSource == TransformationMatrixSource::UseIdentityMatrix ? TransformationMatrix() : client().transformMatrixForProperty(property);
    2881         if (matrixSource == TransformationMatrixSource::AskClient && matrix.isIdentity())
    2882             return;
    2883 
    2884         // A base value transform animation needs to last forever and use the same value for its from and to values.
    2885         auto caAnimation = createPlatformCAAnimation(PlatformCAAnimation::Basic, propertyIdToString(property));
    2886         caAnimation->setDuration(Seconds::infinity().seconds());
    2887         caAnimation->setFromValue(matrix);
    2888         caAnimation->setToValue(matrix);
    2889 
    2890         auto animation = LayerPropertyAnimation(WTFMove(caAnimation), "base-transform-" + createCanonicalUUIDString(), property, 0, 0, 0_s);
    2891         // To ensure the base value transform is applied along with all the interpolating animations, we set it to have started
    2892         // as early as possible, which combined with the infinite duration ensures it's current for any given CA media time.
    2893         animation.m_beginTime = Seconds::fromNanoseconds(1);
    2894 
    2895         // Additivity will depend on the source of the matrix, if it was explicitly provided as an identity matrix, it
    2896         // is the initial base value transform animation and must override the current transform value for this layer.
    2897         // Otherwise, it is meant to apply the underlying value for one specific transform-related property and be additive
    2898         // to be combined with the other base value transform animations and interpolating animations.
    2899         addAnimation(animation, matrixSource == TransformationMatrixSource::AskClient ? Additive::Yes : Additive::No);
    2900         m_baseValueTransformAnimations.append(WTFMove(animation));
    2901     };
    2902 
    2903     // Remove all running CA animations.
    2904     for (auto& animation : m_animations) {
    2905         if (animation.m_playState == PlayState::Playing || animation.m_playState == PlayState::Paused)
    2906             removeCAAnimationFromLayer(animation);
    2907     }
    2908 
    2909     // Also remove all the base value transform CA animations.
    2910     for (auto& animation : m_baseValueTransformAnimations)
    2911         removeCAAnimationFromLayer(animation);
    2912 
    2913     // Now remove all the animations marked as pending removal and all base value transform animations.
    2914     m_animations.removeAllMatching([&](LayerPropertyAnimation animation) {
    2915         return animation.m_pendingRemoval;
    2916     });
    2917     m_baseValueTransformAnimations.clear();
    2918 
    2919     // Now that our list of animations is current, we can separate animations by property so that
    2920     // we can apply them in order. We only need to apply the last animation applied for a given
    2921     // individual transform property, so we keep a reference to that. For animations targeting
    2922     // the transform property itself, we keep them in order since they all need to apply and build
    2923     // on top of each other. Finally, animations that are not transform-related can be applied
    2924     // right away since their order relative to transform animations does not matter.
    2925     LayerPropertyAnimation* translateAnimation = nullptr;
    2926     LayerPropertyAnimation* scaleAnimation = nullptr;
    2927     LayerPropertyAnimation* rotateAnimation = nullptr;
    2928     Vector<LayerPropertyAnimation*> transformAnimations;
    2929 
    2930     for (auto& animation : m_animations) {
    2931         switch (animation.m_property) {
    2932         case AnimatedPropertyTranslate:
    2933             translateAnimation = &animation;
    2934             break;
    2935         case AnimatedPropertyScale:
    2936             scaleAnimation = &animation;
    2937             break;
    2938         case AnimatedPropertyRotate:
    2939             rotateAnimation = &animation;
    2940             break;
    2941         case AnimatedPropertyTransform:
    2942             transformAnimations.append(&animation);
    2943             break;
    2944         case AnimatedPropertyOpacity:
    2945         case AnimatedPropertyBackgroundColor:
    2946         case AnimatedPropertyFilter:
    2947 #if ENABLE(FILTERS_LEVEL_2)
    2948         case AnimatedPropertyWebkitBackdropFilter:
    2949 #endif
    2950             addAnimation(animation, Additive::No);
    2951             break;
    2952         case AnimatedPropertyInvalid:
    2953             ASSERT_NOT_REACHED();
    2954         }
    2955     }
    2956 
    2957     // Now we can apply the transform-related animations, taking care to add them in the right order
    2958     // (translate/scale/rotate/transform) and generate non-interpolating base value transform animations
    2959     // for each property that is not otherwise interpolated.
    2960     if (translateAnimation || scaleAnimation || rotateAnimation || !transformAnimations.isEmpty()) {
    2961         // Start with a base identity transform to override the transform applied to the layer and have a
    2962         // sound base to add animations on top of with additivity enabled.
    2963         addBaseValueTransformAnimation(AnimatedPropertyTransform, TransformationMatrixSource::UseIdentityMatrix);
    2964 
    2965         // Core Animation might require additive animations to be applied in the reverse order.
    2966 #if !PLATFORM(WIN) && !HAVE(CA_WHERE_ADDITIVE_TRANSFORMS_ARE_REVERSED)
    2967         if (translateAnimation)
    2968             addAnimation(*translateAnimation);
    2969         else
    2970             addBaseValueTransformAnimation(AnimatedPropertyTranslate);
    2971 
    2972         if (scaleAnimation)
    2973             addAnimation(*scaleAnimation);
    2974         else
    2975             addBaseValueTransformAnimation(AnimatedPropertyScale);
    2976 
    2977         if (rotateAnimation)
    2978             addAnimation(*rotateAnimation);
    2979         else
    2980             addBaseValueTransformAnimation(AnimatedPropertyRotate);
    2981 
    2982         for (auto* animation : transformAnimations)
    2983             addAnimation(*animation);
    2984         if (transformAnimations.isEmpty())
    2985             addBaseValueTransformAnimation(AnimatedPropertyTransform);
    2986 #else
    2987         for (auto* animation : WTF::makeReversedRange(transformAnimations))
    2988             addAnimation(*animation);
    2989         if (transformAnimations.isEmpty())
    2990             addBaseValueTransformAnimation(AnimatedPropertyTransform);
    2991 
    2992         if (rotateAnimation)
    2993             addAnimation(*rotateAnimation);
    2994         else
    2995             addBaseValueTransformAnimation(AnimatedPropertyRotate);
    2996 
    2997         if (scaleAnimation)
    2998             addAnimation(*scaleAnimation);
    2999         else
    3000             addBaseValueTransformAnimation(AnimatedPropertyScale);
    3001 
    3002         if (translateAnimation)
    3003             addAnimation(*translateAnimation);
    3004         else
    3005             addBaseValueTransformAnimation(AnimatedPropertyTranslate);
    3006 #endif
    30072871    }
    30082872}
     
    30112875{
    30122876    return m_animations.findMatching([&](LayerPropertyAnimation animation) {
    3013         return animatedPropertyIsTransformOrRelated(animation.m_property) && (animation.m_playState == PlayState::Playing || animation.m_playState == PlayState::Paused);
     2877        return animation.m_property == AnimatedPropertyTransform && animation.m_playState == PlayState::Playing;
    30142878    }) != notFound;
    30152879}
     
    31473011bool GraphicsLayerCA::createAnimationFromKeyframes(const KeyframeValueList& valueList, const Animation* animation, const String& animationName, Seconds timeOffset)
    31483012{
    3149     ASSERT(!animatedPropertyIsTransformOrRelated(valueList.property()) && (!supportsAcceleratedFilterAnimations() || valueList.property() != AnimatedPropertyFilter));
     3013    ASSERT(valueList.property() != AnimatedPropertyTransform && (!supportsAcceleratedFilterAnimations() || valueList.property() != AnimatedPropertyFilter));
    31503014
    31513015    bool valuesOK;
     
    31783042{
    31793043    TransformOperation::OperationType transformOp = isMatrixAnimation ? TransformOperation::MATRIX_3D : operations->operations().at(animationIndex)->type();
     3044#if !PLATFORM(WIN) && !HAVE(CA_WHERE_ADDITIVE_TRANSFORMS_ARE_REVERSED)
     3045    bool additive = animationIndex > 0;
     3046#else
     3047    int numAnimations = isMatrixAnimation ? 1 : operations->size();
     3048    bool additive = animationIndex < numAnimations - 1;
     3049#endif
    31803050
    31813051    RefPtr<PlatformCAAnimation> caAnimation;
    31823052    bool validMatrices = true;
    31833053    if (isKeyframe(valueList)) {
    3184         caAnimation = createKeyframeAnimation(animation, propertyIdToString(valueList.property()), false);
     3054        caAnimation = createKeyframeAnimation(animation, propertyIdToString(valueList.property()), additive);
    31853055        validMatrices = setTransformAnimationKeyframes(valueList, animation, caAnimation.get(), animationIndex, transformOp, isMatrixAnimation, boxSize);
    31863056    } else {
    31873057        if (animation->timingFunction()->isSpringTimingFunction())
    3188             caAnimation = createSpringAnimation(animation, propertyIdToString(valueList.property()), false);
     3058            caAnimation = createSpringAnimation(animation, propertyIdToString(valueList.property()), additive);
    31893059        else
    3190             caAnimation = createBasicAnimation(animation, propertyIdToString(valueList.property()), false);
     3060            caAnimation = createBasicAnimation(animation, propertyIdToString(valueList.property()), additive);
    31913061        validMatrices = setTransformAnimationEndpoints(valueList, animation, caAnimation.get(), animationIndex, transformOp, isMatrixAnimation, boxSize);
    31923062    }
     
    32013071bool GraphicsLayerCA::createTransformAnimationsFromKeyframes(const KeyframeValueList& valueList, const Animation* animation, const String& animationName, Seconds timeOffset, const FloatSize& boxSize)
    32023072{
    3203     ASSERT(animatedPropertyIsTransformOrRelated(valueList.property()));
     3073    ASSERT(valueList.property() == AnimatedPropertyTransform);
    32043074
    32053075    bool hasBigRotation;
     
    32103080
    32113081    // If function lists don't match we do a matrix animation, otherwise we do a component hardware animation.
    3212     bool isMatrixAnimation = valueList.property() == AnimatedPropertyTransform ? listIndex < 0 : true;
     3082    bool isMatrixAnimation = listIndex < 0;
    32133083    int numAnimations = isMatrixAnimation ? 1 : operations->size();
    32143084
     3085#if !PLATFORM(WIN) && !HAVE(CA_WHERE_ADDITIVE_TRANSFORMS_ARE_REVERSED)
    32153086    for (int animationIndex = 0; animationIndex < numAnimations; ++animationIndex) {
     3087#else
     3088    // Some versions of CA require animation lists to be applied in reverse order (<rdar://problem/43908047> and <rdar://problem/9112233>).
     3089    for (int animationIndex = numAnimations - 1; animationIndex >= 0; --animationIndex) {
     3090#endif
    32163091        if (!appendToUncommittedAnimations(valueList, operations, animation, animationName, boxSize, animationIndex, timeOffset, isMatrixAnimation)) {
    32173092            validMatrices = false;
     
    43414216static String animatedPropertyIDAsString(AnimatedPropertyID property)
    43424217{
    4343     switch (property) {
    4344     case AnimatedPropertyTranslate:
    4345     case AnimatedPropertyScale:
    4346     case AnimatedPropertyRotate:
    4347     case AnimatedPropertyTransform:
     4218    if (property == AnimatedPropertyTransform)
    43484219        return "transform";
    4349     case AnimatedPropertyOpacity:
     4220    if (property == AnimatedPropertyOpacity)
    43504221        return "opacity";
    4351     case AnimatedPropertyBackgroundColor:
     4222    if (property == AnimatedPropertyBackgroundColor)
    43524223        return "background-color";
    4353     case AnimatedPropertyFilter:
     4224    if (property == AnimatedPropertyFilter)
    43544225        return "filter";
     4226    if (property == AnimatedPropertyInvalid)
     4227        return "invalid";
    43554228#if ENABLE(FILTERS_LEVEL_2)
    4356     case AnimatedPropertyWebkitBackdropFilter:
     4229    if (property == AnimatedPropertyWebkitBackdropFilter)
    43574230        return "backdrop-filter";
    43584231#endif
    4359     case AnimatedPropertyInvalid:
    4360         return "invalid";
    4361     }
    4362     ASSERT_NOT_REACHED();
    43634232    return "";
    43644233}
  • branches/safari-611.1.4-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h

    r268874 r268876  
    598598   
    599599    Vector<LayerPropertyAnimation> m_animations;
    600     Vector<LayerPropertyAnimation> m_baseValueTransformAnimations;
    601600
    602601    Vector<FloatRect> m_dirtyRects;
  • branches/safari-611.1.4-branch/Source/WebCore/rendering/RenderLayerBacking.cpp

    r268615 r268876  
    35623562{
    35633563    bool hasOpacity = keyframes.containsProperty(CSSPropertyOpacity);
    3564     bool hasRotate = renderer().isBox() && keyframes.containsProperty(CSSPropertyRotate);
    3565     bool hasScale = renderer().isBox() && keyframes.containsProperty(CSSPropertyScale);
    3566     bool hasTranslate = renderer().isBox() && keyframes.containsProperty(CSSPropertyTranslate);
    35673564    bool hasTransform = renderer().isBox() && keyframes.containsProperty(CSSPropertyTransform);
    35683565    bool hasFilter = keyframes.containsProperty(CSSPropertyFilter);
     
    35733570#endif
    35743571
    3575     if (!hasOpacity && !hasRotate && !hasScale && !hasTranslate && !hasTransform && !hasFilter && !hasBackdropFilter)
    3576         return false;
    3577 
    3578     KeyframeValueList rotateVector(AnimatedPropertyRotate);
    3579     KeyframeValueList scaleVector(AnimatedPropertyScale);
    3580     KeyframeValueList translateVector(AnimatedPropertyTranslate);
     3572    if (!hasOpacity && !hasTransform && !hasFilter && !hasBackdropFilter)
     3573        return false;
     3574
    35813575    KeyframeValueList transformVector(AnimatedPropertyTransform);
    35823576    KeyframeValueList opacityVector(AnimatedPropertyOpacity);
     
    35983592       
    35993593        bool isFirstOrLastKeyframe = key == 0 || key == 1;
    3600         if ((hasRotate && isFirstOrLastKeyframe) || currentKeyframe.containsProperty(CSSPropertyRotate))
    3601             rotateVector.insert(makeUnique<TransformAnimationValue>(key, keyframeStyle->rotate(), tf));
    3602 
    3603         if ((hasScale && isFirstOrLastKeyframe) || currentKeyframe.containsProperty(CSSPropertyScale))
    3604             scaleVector.insert(makeUnique<TransformAnimationValue>(key, keyframeStyle->scale(), tf));
    3605 
    3606         if ((hasTranslate && isFirstOrLastKeyframe) || currentKeyframe.containsProperty(CSSPropertyTranslate))
    3607             translateVector.insert(makeUnique<TransformAnimationValue>(key, keyframeStyle->translate(), tf));
    3608 
    36093594        if ((hasTransform && isFirstOrLastKeyframe) || currentKeyframe.containsProperty(CSSPropertyTransform))
    36103595            transformVector.insert(makeUnique<TransformAnimationValue>(key, keyframeStyle->transform(), tf));
     
    36273612    bool didAnimate = false;
    36283613
    3629     if (hasRotate && m_graphicsLayer->addAnimation(rotateVector, snappedIntRect(renderBox()->borderBoxRect()).size(), &animation, keyframes.animationName(), timeOffset))
    3630         didAnimate = true;
    3631 
    3632     if (hasScale && m_graphicsLayer->addAnimation(scaleVector, snappedIntRect(renderBox()->borderBoxRect()).size(), &animation, keyframes.animationName(), timeOffset))
    3633         didAnimate = true;
    3634 
    3635     if (hasTranslate && m_graphicsLayer->addAnimation(translateVector, snappedIntRect(renderBox()->borderBoxRect()).size(), &animation, keyframes.animationName(), timeOffset))
    3636         didAnimate = true;
    3637 
    36383614    if (hasTransform && m_graphicsLayer->addAnimation(transformVector, snappedIntRect(renderBox()->borderBoxRect()).size(), &animation, keyframes.animationName(), timeOffset))
    36393615        didAnimate = true;
     
    37323708    CSSPropertyID cssProperty = CSSPropertyInvalid;
    37333709    switch (property) {
    3734     case AnimatedPropertyTranslate:
    3735         cssProperty = CSSPropertyTranslate;
    3736         break;
    3737     case AnimatedPropertyScale:
    3738         cssProperty = CSSPropertyScale;
    3739         break;
    3740     case AnimatedPropertyRotate:
    3741         cssProperty = CSSPropertyRotate;
    3742         break;
    37433710    case AnimatedPropertyTransform:
    37443711        cssProperty = CSSPropertyTransform;
     
    37673734{
    37683735    switch (cssProperty) {
    3769     case CSSPropertyTranslate:
    3770         return AnimatedPropertyTranslate;
    3771     case CSSPropertyScale:
    3772         return AnimatedPropertyScale;
    3773     case CSSPropertyRotate:
    3774         return AnimatedPropertyRotate;
    37753736    case CSSPropertyTransform:
    37763737        return AnimatedPropertyTransform;
     
    38603821}
    38613822
    3862 TransformationMatrix RenderLayerBacking::transformMatrixForProperty(AnimatedPropertyID property) const
    3863 {
    3864     auto* box = renderBox();
    3865     if (!box)
    3866         return { };
    3867 
    3868     TransformationMatrix matrix;
    3869 
    3870     auto applyTransformOperation = [&](TransformOperation* operation) {
    3871         if (operation)
    3872             operation->apply(matrix, snappedIntRect(renderBox()->borderBoxRect()).size());
    3873     };
    3874 
    3875     if (property == AnimatedPropertyTranslate)
    3876         applyTransformOperation(renderer().style().translate());
    3877     else if (property == AnimatedPropertyScale)
    3878         applyTransformOperation(renderer().style().scale());
    3879     else if (property == AnimatedPropertyRotate)
    3880         applyTransformOperation(renderer().style().rotate());
    3881     else if (property == AnimatedPropertyTransform)
    3882         renderer().style().transform().apply(snappedIntRect(renderBox()->borderBoxRect()).size(), matrix);
    3883     else
    3884         ASSERT_NOT_REACHED();
    3885 
    3886     return matrix;
    3887 }
    3888 
    38893823} // namespace WebCore
  • branches/safari-611.1.4-branch/Source/WebCore/rendering/RenderLayerBacking.h

    r268615 r268876  
    252252    LayoutSize subpixelOffsetFromRenderer() const { return m_subpixelOffsetFromRenderer; }
    253253
    254     TransformationMatrix transformMatrixForProperty(AnimatedPropertyID) const final;
    255 
    256254#if PLATFORM(IOS_FAMILY)
    257255    bool needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack(const GraphicsLayer&) const override;
  • branches/safari-611.1.4-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r268615 r268876  
    29732973                || effectsStack->isCurrentlyAffectingProperty(CSSPropertyWebkitBackdropFilter)
    29742974#endif
    2975                 || effectsStack->isCurrentlyAffectingProperty(CSSPropertyTranslate)
    2976                 || effectsStack->isCurrentlyAffectingProperty(CSSPropertyScale)
    2977                 || effectsStack->isCurrentlyAffectingProperty(CSSPropertyRotate)
    29782975                || effectsStack->isCurrentlyAffectingProperty(CSSPropertyTransform);
    29792976        }
     
    35213518    if (auto styleable = Styleable::fromRenderer(renderer)) {
    35223519        if (auto* effectsStack = styleable->keyframeEffectStack())
    3523             return effectsStack->isCurrentlyAffectingProperty(CSSPropertyTransform)
    3524                 || effectsStack->isCurrentlyAffectingProperty(CSSPropertyRotate)
    3525                 || effectsStack->isCurrentlyAffectingProperty(CSSPropertyScale)
    3526                 || effectsStack->isCurrentlyAffectingProperty(CSSPropertyTranslate);
     3520            return effectsStack->isCurrentlyAffectingProperty(CSSPropertyTransform);
    35273521    }
    35283522
  • branches/safari-611.1.4-branch/Source/WebCore/rendering/style/WillChangeData.cpp

    r268615 r268876  
    121121    // always composite if there's no scrollable overflow.
    122122    switch (property) {
    123     case CSSPropertyScale:
    124     case CSSPropertyRotate:
    125     case CSSPropertyTranslate:
    126123    case CSSPropertyTransform:
    127124        return true;
Note: See TracChangeset for help on using the changeset viewer.