Ignore:
Timestamp:
Sep 5, 2013, 8:15:59 AM (12 years ago)
Author:
[email protected]
Message:

Animations in an AnimationList are never null
https://bugs.webkit.org/show_bug.cgi?id=120720

Reviewed by Andreas Kling.

Change AnimationList::operator[] to return an Animation& and fix up related code to also take references.

  • css/CSSComputedStyleDeclaration.cpp:
  • css/DeprecatedStyleBuilder.cpp:
  • page/animation/CompositeAnimation.cpp:
  • page/animation/KeyframeAnimation.cpp:
  • platform/animation/Animation.h:
  • platform/animation/AnimationList.cpp:
  • platform/animation/AnimationList.h:
  • rendering/RenderLayerBacking.cpp:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp

    r154887 r155119  
    16361636class ApplyPropertyAnimation {
    16371637public:
    1638     static void setValue(Animation* animation, T value) { (animation->*setterFunction)(value); }
    1639     static T value(const Animation* animation) { return (animation->*getterFunction)(); }
    1640     static bool test(const Animation* animation) { return (animation->*testFunction)(); }
    1641     static void clear(Animation* animation) { (animation->*clearFunction)(); }
     1638    static void setValue(Animation& animation, T value) { (animation.*setterFunction)(value); }
     1639    static T value(const Animation& animation) { return (animation.*getterFunction)(); }
     1640    static bool test(const Animation& animation) { return (animation.*testFunction)(); }
     1641    static void clear(Animation& animation) { (animation.*clearFunction)(); }
    16421642    static T initial() { return (*initialFunction)(); }
    1643     static void map(StyleResolver* styleResolver, Animation* animation, CSSValue* value) { (styleResolver->styleMap()->*mapFunction)(animation, value); }
     1643    static void map(StyleResolver* styleResolver, Animation& animation, CSSValue* value) { (styleResolver->styleMap()->*mapFunction)(&animation, value); }
    16441644    static AnimationList* accessAnimations(RenderStyle* style) { return (style->*animationGetterFunction)(); }
    16451645    static const AnimationList* animations(RenderStyle* style) { return (style->*immutableAnimationGetterFunction)(); }
     
    16541654                list->append(Animation::create());
    16551655            setValue(list->animation(i), value(parentList->animation(i)));
    1656             list->animation(i)->setAnimationMode(parentList->animation(i)->animationMode());
     1656            list->animation(i).setAnimationMode(parentList->animation(i).animationMode());
    16571657        }
    16581658
     
    16691669        setValue(list->animation(0), initial());
    16701670        if (propertyID == CSSPropertyWebkitTransitionProperty)
    1671             list->animation(0)->setAnimationMode(Animation::AnimateAll);
     1671            list->animation(0).setAnimationMode(Animation::AnimateAll);
    16721672        for (size_t i = 1; i < list->size(); ++i)
    16731673            clear(list->animation(i));
Note: See TracChangeset for help on using the changeset viewer.