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

Changeset 243151 in webkit


Ignore:
Timestamp:
Mar 19, 2019, 10:59:24 AM (8 years ago)
Author:
Alan Bujtas
Message:

RenderElement::startAnimation should take const Animation&
​https://bugs.webkit.org/show_bug.cgi?id=195929

Reviewed by Daniel Bates.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::applyPendingAcceleratedActions):

  • page/animation/KeyframeAnimation.cpp:

(WebCore::KeyframeAnimation::startAnimation):
(WebCore::KeyframeAnimation::endAnimation):

  • rendering/RenderElement.h:

(WebCore::RenderElement::startAnimation):
(WebCore::RenderElement::animationFinished):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::startAnimation):

  • rendering/RenderLayerBacking.h:
  • rendering/RenderLayerModelObject.cpp:

(WebCore::RenderLayerModelObject::startAnimation):
(WebCore::RenderLayerModelObject::animationFinished):

  • rendering/RenderLayerModelObject.h:
Location:
trunk/Source/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r243150 r243151  
     12019-03-19  Zalan Bujtas  <zalan@apple.com>
     2
     3        RenderElement::startAnimation should take const Animation&
     4        https://bugs.webkit.org/show_bug.cgi?id=195929
     5
     6        Reviewed by Daniel Bates.
     7
     8        * animation/KeyframeEffect.cpp:
     9        (WebCore::KeyframeEffect::applyPendingAcceleratedActions):
     10        * page/animation/KeyframeAnimation.cpp:
     11        (WebCore::KeyframeAnimation::startAnimation):
     12        (WebCore::KeyframeAnimation::endAnimation):
     13        * rendering/RenderElement.h:
     14        (WebCore::RenderElement::startAnimation):
     15        (WebCore::RenderElement::animationFinished):
     16        * rendering/RenderLayerBacking.cpp:
     17        (WebCore::RenderLayerBacking::startAnimation):
     18        * rendering/RenderLayerBacking.h:
     19        * rendering/RenderLayerModelObject.cpp:
     20        (WebCore::RenderLayerModelObject::startAnimation):
     21        (WebCore::RenderLayerModelObject::animationFinished):
     22        * rendering/RenderLayerModelObject.h:
     23
    1242019-03-19  Devin Rousso  <drousso@apple.com>
    225
  • trunk/Source/WebCore/animation/KeyframeEffect.cpp

    r239965 r243151  
    13201320        switch (action) {
    13211321        case AcceleratedAction::Play:
    1322             if (!compositedRenderer->startAnimation(timeOffset, backingAnimationForCompositedRenderer().ptr(), m_blendingKeyframes)) {
     1322            if (!compositedRenderer->startAnimation(timeOffset, backingAnimationForCompositedRenderer(), m_blendingKeyframes)) {
    13231323                m_shouldRunAccelerated = false;
    13241324                m_lastRecordedAcceleratedAction = AcceleratedAction::Stop;
  • trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp

    r243112 r243151  
    293293{
    294294    if (auto* renderer = this->renderer())
    295         return renderer->startAnimation(timeOffset, m_animation.ptr(), m_keyframes);
     295        return renderer->startAnimation(timeOffset, m_animation, m_keyframes);
    296296    return false;
    297297}
  • trunk/Source/WebCore/rendering/RenderElement.h

    r243103 r243151  
    227227    virtual void transitionFinished(CSSPropertyID) { }
    228228
    229     virtual bool startAnimation(double /* timeOffset */, const Animation*, const KeyframeList&) { return false; }
     229    virtual bool startAnimation(double /* timeOffset */, const Animation&, const KeyframeList&) { return false; }
    230230    virtual void animationPaused(double /* timeOffset */, const String& /* name */) { }
    231231    virtual void animationSeeked(double /* timeOffset */, const String& /* name */) { }
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r243145 r243151  
    27942794#endif
    27952795
    2796 bool RenderLayerBacking::startAnimation(double timeOffset, const Animation* anim, const KeyframeList& keyframes)
     2796bool RenderLayerBacking::startAnimation(double timeOffset, const Animation& animation, const KeyframeList& keyframes)
    27972797{
    27982798    bool hasOpacity = keyframes.containsProperty(CSSPropertyOpacity);
    … …  
    28472847    bool didAnimate = false;
    28482848
    2849     if (hasTransform && m_graphicsLayer->addAnimation(transformVector, snappedIntRect(renderBox()->borderBoxRect()).size(), anim, keyframes.animationName(), timeOffset))
     2849    if (hasTransform && m_graphicsLayer->addAnimation(transformVector, snappedIntRect(renderBox()->borderBoxRect()).size(), &animation, keyframes.animationName(), timeOffset))
    28502850        didAnimate = true;
    28512851
    2852     if (hasOpacity && m_graphicsLayer->addAnimation(opacityVector, IntSize(), anim, keyframes.animationName(), timeOffset))
     2852    if (hasOpacity && m_graphicsLayer->addAnimation(opacityVector, IntSize { }, &animation, keyframes.animationName(), timeOffset))
    28532853        didAnimate = true;
    28542854
    2855     if (hasFilter && m_graphicsLayer->addAnimation(filterVector, IntSize(), anim, keyframes.animationName(), timeOffset))
     2855    if (hasFilter && m_graphicsLayer->addAnimation(filterVector, IntSize { }, &animation, keyframes.animationName(), timeOffset))
    28562856        didAnimate = true;
    28572857
    28582858#if ENABLE(FILTERS_LEVEL_2)
    2859     if (hasBackdropFilter && m_graphicsLayer->addAnimation(backdropFilterVector, IntSize(), anim, keyframes.animationName(), timeOffset))
     2859    if (hasBackdropFilter && m_graphicsLayer->addAnimation(backdropFilterVector, IntSize { }, &animation, keyframes.animationName(), timeOffset))
    28602860        didAnimate = true;
    28612861#endif
  • trunk/Source/WebCore/rendering/RenderLayerBacking.h

    r243134 r243151  
    195195    void transitionFinished(CSSPropertyID);
    196196
    197     bool startAnimation(double timeOffset, const Animation* anim, const KeyframeList& keyframes);
     197    bool startAnimation(double timeOffset, const Animation&, const KeyframeList&);
    198198    void animationPaused(double timeOffset, const String& name);
    199199    void animationSeeked(double timeOffset, const String& name);
  • trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp

    r243112 r243151  
    305305}
    306306
    307 bool RenderLayerModelObject::startAnimation(double timeOffset, const Animation* animation, const KeyframeList& keyframes)
     307bool RenderLayerModelObject::startAnimation(double timeOffset, const Animation& animation, const KeyframeList& keyframes)
    308308{
    309309    if (!layer() || !layer()->backing())
  • trunk/Source/WebCore/rendering/RenderLayerModelObject.h

    r243103 r243151  
    7474    void transitionFinished(CSSPropertyID) override;
    7575
    76     bool startAnimation(double timeOffset, const Animation*, const KeyframeList& keyframes) override;
     76    bool startAnimation(double timeOffset, const Animation&, const KeyframeList&) override;
    7777    void animationPaused(double timeOffset, const String& name) override;
    7878    void animationSeeked(double timeOffset, const String& name) override;
Note: See TracChangeset for help on using the changeset viewer.