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

Side by Side Diff: sky/engine/core/animation/css/CSSAnimations.h

Issue 839473005: Simplify ScopedStyleResolver keyframe handling. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 class CSSAnimations final { 148 class CSSAnimations final {
149 WTF_MAKE_NONCOPYABLE(CSSAnimations); 149 WTF_MAKE_NONCOPYABLE(CSSAnimations);
150 DISALLOW_ALLOCATION(); 150 DISALLOW_ALLOCATION();
151 public: 151 public:
152 CSSAnimations(); 152 CSSAnimations();
153 153
154 // FIXME: This method is only used here and in the legacy animations 154 // FIXME: This method is only used here and in the legacy animations
155 // implementation. It should be made private or file-scope when the legacy 155 // implementation. It should be made private or file-scope when the legacy
156 // engine is removed. 156 // engine is removed.
157 static const StyleRuleKeyframes* matchScopedKeyframesRule(StyleResolver*, co nst Element*, const StringImpl*); 157 static const StyleRuleKeyframes* matchScopedKeyframesRule(StyleResolver*, co nst Element*, String animationName);
158 158
159 static const StylePropertyShorthand& animatableProperties(); 159 static const StylePropertyShorthand& animatableProperties();
160 static bool isAllowedAnimation(CSSPropertyID); 160 static bool isAllowedAnimation(CSSPropertyID);
161 // FIXME: We should change the Element* to a const Element* 161 // FIXME: We should change the Element* to a const Element*
162 static PassOwnPtr<CSSAnimationUpdate> calculateUpdate(Element*, const Elemen t& parentElement, const RenderStyle&, RenderStyle* parentStyle, StyleResolver*); 162 static PassOwnPtr<CSSAnimationUpdate> calculateUpdate(Element*, const Elemen t& parentElement, const RenderStyle&, RenderStyle* parentStyle, StyleResolver*);
163 163
164 void setPendingUpdate(PassOwnPtr<CSSAnimationUpdate> update) { m_pendingUpda te = update; } 164 void setPendingUpdate(PassOwnPtr<CSSAnimationUpdate> update) { m_pendingUpda te = update; }
165 void maybeApplyPendingUpdate(Element*); 165 void maybeApplyPendingUpdate(Element*);
166 bool isEmpty() const { return m_animations.isEmpty() && m_transitions.isEmpt y() && !m_pendingUpdate; } 166 bool isEmpty() const { return m_animations.isEmpty() && m_transitions.isEmpt y() && !m_pendingUpdate; }
167 void cancel(); 167 void cancel();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 const CSSPropertyID m_property; 226 const CSSPropertyID m_property;
227 AnimationNode::Phase m_previousPhase; 227 AnimationNode::Phase m_previousPhase;
228 }; 228 };
229 }; 229 };
230 230
231 } // namespace blink 231 } // namespace blink
232 232
233 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::NewAnimation); 233 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::NewAnimation);
234 234
235 #endif // SKY_ENGINE_CORE_ANIMATION_CSS_CSSANIMATIONS_H_ 235 #endif // SKY_ENGINE_CORE_ANIMATION_CSS_CSSANIMATIONS_H_
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/animation/css/CSSAnimations.cpp » ('j') | sky/engine/core/css/resolver/StyleResolver.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698