Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Side by Side Diff: Source/core/platform/animation/CSSAnimationData.h

Issue 60033004: Don't check all animation/transition properties when comparing RenderStyles (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 void setPlayState(EAnimPlayState d) { m_playState = d; m_playStateSet = true ; } 130 void setPlayState(EAnimPlayState d) { m_playState = d; m_playStateSet = true ; }
131 void setProperty(CSSPropertyID t) { m_property = t; m_propertySet = true; } 131 void setProperty(CSSPropertyID t) { m_property = t; m_propertySet = true; }
132 void setTimingFunction(PassRefPtr<TimingFunction> f) { m_timingFunction = f; m_timingFunctionSet = true; } 132 void setTimingFunction(PassRefPtr<TimingFunction> f) { m_timingFunction = f; m_timingFunctionSet = true; }
133 void setAnimationMode(AnimationMode mode) { m_mode = mode; } 133 void setAnimationMode(AnimationMode mode) { m_mode = mode; }
134 134
135 void setIsNoneAnimation(bool n) { m_isNone = n; } 135 void setIsNoneAnimation(bool n) { m_isNone = n; }
136 136
137 CSSAnimationData& operator=(const CSSAnimationData& o); 137 CSSAnimationData& operator=(const CSSAnimationData& o);
138 138
139 // return true every CSSAnimationData in the chain (defined by m_next) match 139 // return true every CSSAnimationData in the chain (defined by m_next) match
140 bool operator==(const CSSAnimationData& o) const { return animationsMatch(&o ); } 140 bool operator==(const CSSAnimationData& o) const { return animationsMatchFor StyleRecalc(&o); }
141 bool operator!=(const CSSAnimationData& o) const { return !(*this == o); } 141 bool operator!=(const CSSAnimationData& o) const { return !(*this == o); }
142 142
143 bool fillsBackwards() const { return m_fillModeSet && (m_fillMode == Animati onFillModeBackwards || m_fillMode == AnimationFillModeBoth); } 143 bool fillsBackwards() const { return m_fillModeSet && (m_fillMode == Animati onFillModeBackwards || m_fillMode == AnimationFillModeBoth); }
144 bool fillsForwards() const { return m_fillModeSet && (m_fillMode == Animatio nFillModeForwards || m_fillMode == AnimationFillModeBoth); } 144 bool fillsForwards() const { return m_fillModeSet && (m_fillMode == Animatio nFillModeForwards || m_fillMode == AnimationFillModeBoth); }
145 145
146 private: 146 private:
147 CSSAnimationData(); 147 CSSAnimationData();
148 explicit CSSAnimationData(const CSSAnimationData&); 148 explicit CSSAnimationData(const CSSAnimationData&);
149 149
150 // return true if all members of this class match (excluding m_next) 150 // Return whether this object matches another CSSAnimationData object for
151 bool animationsMatch(const CSSAnimationData*) const; 151 // the purposes of style recalc. This excludes some properties.
152 bool animationsMatchForStyleRecalc(const CSSAnimationData*) const;
152 153
153 AtomicString m_name; 154 AtomicString m_name;
154 CSSPropertyID m_property; 155 CSSPropertyID m_property;
155 AnimationMode m_mode; 156 AnimationMode m_mode;
156 double m_iterationCount; 157 double m_iterationCount;
157 double m_delay; 158 double m_delay;
158 double m_duration; 159 double m_duration;
159 RefPtr<TimingFunction> m_timingFunction; 160 RefPtr<TimingFunction> m_timingFunction;
160 unsigned m_direction : 2; // AnimationDirection 161 unsigned m_direction : 2; // AnimationDirection
161 unsigned m_fillMode : 2; 162 unsigned m_fillMode : 2;
(...skipping 20 matching lines...) Expand all
182 static double initialAnimationIterationCount() { return 1.0; } 183 static double initialAnimationIterationCount() { return 1.0; }
183 static const String& initialAnimationName(); 184 static const String& initialAnimationName();
184 static EAnimPlayState initialAnimationPlayState() { return AnimPlayStatePlay ing; } 185 static EAnimPlayState initialAnimationPlayState() { return AnimPlayStatePlay ing; }
185 static CSSPropertyID initialAnimationProperty() { return CSSPropertyInvalid; } 186 static CSSPropertyID initialAnimationProperty() { return CSSPropertyInvalid; }
186 static const PassRefPtr<TimingFunction> initialAnimationTimingFunction() { r eturn CubicBezierTimingFunction::preset(CubicBezierTimingFunction::Ease); } 187 static const PassRefPtr<TimingFunction> initialAnimationTimingFunction() { r eturn CubicBezierTimingFunction::preset(CubicBezierTimingFunction::Ease); }
187 }; 188 };
188 189
189 } // namespace WebCore 190 } // namespace WebCore
190 191
191 #endif // CSSAnimationData_h 192 #endif // CSSAnimationData_h
OLDNEW
« no previous file with comments | « LayoutTests/css3/filters/composited-during-animation.html ('k') | Source/core/platform/animation/CSSAnimationData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698