diff options
Diffstat (limited to 'Source/WebCore/page/animation/ImplicitAnimation.h')
-rw-r--r-- | Source/WebCore/page/animation/ImplicitAnimation.h | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/Source/WebCore/page/animation/ImplicitAnimation.h b/Source/WebCore/page/animation/ImplicitAnimation.h index df651141e..9447417b0 100644 --- a/Source/WebCore/page/animation/ImplicitAnimation.h +++ b/Source/WebCore/page/animation/ImplicitAnimation.h @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * 3. Neither the name of Apple Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * @@ -26,8 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef ImplicitAnimation_h -#define ImplicitAnimation_h +#pragma once #include "AnimationBase.h" #include "CSSPropertyNames.h" @@ -41,27 +40,29 @@ class RenderElement; // for a single RenderElement. class ImplicitAnimation : public AnimationBase { public: - static PassRefPtr<ImplicitAnimation> create(const Animation& animation, CSSPropertyID animatingProperty, RenderElement* renderer, CompositeAnimation* compositeAnimation, RenderStyle* fromStyle) + static Ref<ImplicitAnimation> create(const Animation& animation, CSSPropertyID animatingProperty, RenderElement* renderer, CompositeAnimation* compositeAnimation, const RenderStyle* fromStyle) { - return adoptRef(new ImplicitAnimation(animation, animatingProperty, renderer, compositeAnimation, fromStyle)); + return adoptRef(*new ImplicitAnimation(animation, animatingProperty, renderer, compositeAnimation, fromStyle)); }; CSSPropertyID transitionProperty() const { return m_transitionProperty; } CSSPropertyID animatingProperty() const { return m_animatingProperty; } - virtual void onAnimationEnd(double elapsedTime) override; - virtual bool startAnimation(double timeOffset) override; - virtual void pauseAnimation(double timeOffset) override; - virtual void endAnimation() override; + void onAnimationEnd(double elapsedTime) override; + bool startAnimation(double timeOffset) override; + void pauseAnimation(double timeOffset) override; + void endAnimation() override; - virtual void animate(CompositeAnimation*, RenderElement*, const RenderStyle* currentStyle, RenderStyle* targetStyle, RefPtr<RenderStyle>& animatedStyle) override; - virtual void getAnimatedStyle(RefPtr<RenderStyle>& animatedStyle) override; - virtual void reset(RenderStyle* to); + bool animate(CompositeAnimation*, RenderElement*, const RenderStyle* currentStyle, const RenderStyle* targetStyle, std::unique_ptr<RenderStyle>& animatedStyle, bool& didBlendStyle) override; + void getAnimatedStyle(std::unique_ptr<RenderStyle>& animatedStyle) override; + void reset(const RenderStyle* to); + + bool computeExtentOfTransformAnimation(LayoutRect&) const override; void setOverridden(bool); - virtual bool overridden() const override { return m_overridden; } + bool overridden() const override { return m_overridden; } - virtual bool affectsProperty(CSSPropertyID) const override; + bool affectsProperty(CSSPropertyID) const override; bool hasStyle() const { return m_fromStyle && m_toStyle; } @@ -69,7 +70,7 @@ public: void blendPropertyValueInStyle(CSSPropertyID, RenderStyle*); - virtual double timeToNextService() override; + double timeToNextService() override; bool active() const { return m_active; } void setActive(bool b) { m_active = b; } @@ -79,24 +80,24 @@ protected: bool sendTransitionEvent(const AtomicString&, double elapsedTime); void validateTransformFunctionList(); -#if ENABLE(CSS_FILTERS) void checkForMatchingFilterFunctionLists(); +#if ENABLE(FILTERS_LEVEL_2) + void checkForMatchingBackdropFilterFunctionLists(); #endif private: - ImplicitAnimation(const Animation&, CSSPropertyID, RenderElement*, CompositeAnimation*, RenderStyle*); + ImplicitAnimation(const Animation&, CSSPropertyID, RenderElement*, CompositeAnimation*, const RenderStyle*); virtual ~ImplicitAnimation(); + // The two styles that we are blending. + std::unique_ptr<RenderStyle> m_fromStyle; + std::unique_ptr<RenderStyle> m_toStyle; + CSSPropertyID m_transitionProperty; // Transition property as specified in the RenderStyle. CSSPropertyID m_animatingProperty; // Specific property for this ImplicitAnimation - bool m_overridden; // true when there is a keyframe animation that overrides the transitioning property - bool m_active; // used for culling the list of transitions - // The two styles that we are blending. - RefPtr<RenderStyle> m_fromStyle; - RefPtr<RenderStyle> m_toStyle; + bool m_active { true }; // Used for culling the list of transitions. + bool m_overridden { false }; // True when there is a keyframe animation that overrides the transitioning property }; } // namespace WebCore - -#endif // ImplicitAnimation_h |