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

Unified Diff: Source/core/css/resolver/StyleResolver.h

Issue 21012002: Web Animations: Trigger and update CSS Animations backed by the Web Animations model (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix windows build. Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/css/resolver/StyleResolver.h
diff --git a/Source/core/css/resolver/StyleResolver.h b/Source/core/css/resolver/StyleResolver.h
index 3c5a8b3927b51331ee1207faf1209d702d63b299..58cca41852c448d81bb6e9522ee9e77b2644f9c4 100644
--- a/Source/core/css/resolver/StyleResolver.h
+++ b/Source/core/css/resolver/StyleResolver.h
@@ -22,6 +22,7 @@
#ifndef StyleResolver_h
#define StyleResolver_h
+#include "core/animation/KeyframeAnimationEffect.h"
#include "core/css/DocumentRuleSets.h"
#include "core/css/InspectorCSSOMWrappers.h"
#include "core/css/PseudoStyleRequest.h"
@@ -42,6 +43,7 @@
namespace WebCore {
+class CSSAnimationUpdate;
class CSSFontSelector;
class CSSRuleList;
class CSSSelector;
@@ -185,7 +187,15 @@ public:
PassRefPtr<RenderStyle> styleForElement(Element*, RenderStyle* parentStyle = 0, StyleSharingBehavior = AllowStyleSharing,
RuleMatchingBehavior = MatchAllRules, RenderRegion* regionForStyling = 0);
+ // FIXME: The following logic related to animations and keyframes should be factored out of StyleResolver
+ // The body of calculateCSSAnimationUpdate can move to CSSAnimations.cpp and take just const element, const style,
+ // and const ScopedStyleTree
+ PassOwnPtr<CSSAnimationUpdate> calculateCSSAnimationUpdate(StyleResolverState&);
+ void resolveKeyframes(Element*, const StringImpl* animationName, KeyframeAnimationEffect::KeyframeVector&);
+ const StylePropertySet* firstKeyframeStyles(const Element*, const StringImpl* animationName);
void keyframeStylesForAnimation(Element*, const RenderStyle*, KeyframeList&);
+ const StyleRuleKeyframes* matchScopedKeyframesRule(const Element*, const StringImpl* animationName);
+ PassRefPtr<RenderStyle> styleForKeyframe(Element*, const RenderStyle*, const StyleKeyframe*, KeyframeValue&);
PassRefPtr<RenderStyle> pseudoStyleForElement(Element*, const PseudoStyleRequest&, RenderStyle* parentStyle);
@@ -222,9 +232,6 @@ public:
// FIXME: Used by SharingStyleFinder, but should be removed.
bool styleSharingCandidateMatchesRuleSet(const ElementResolveContext&, RenderStyle*, RuleSet*);
- const StyleRuleKeyframes* matchScopedKeyframesRule(Element*, const StringImpl* animationName);
- PassRefPtr<RenderStyle> styleForKeyframe(Element*, const RenderStyle*, const StyleKeyframe*, KeyframeValue&);
-
// These methods will give back the set of rules that matched for a given element (or a pseudo-element).
enum CSSRuleFilter {
UAAndUserCSSRules = 1 << 1,
@@ -303,7 +310,7 @@ private:
template <StyleApplicationPass pass>
void applyProperties(StyleResolverState&, const StylePropertySet* properties, StyleRule*, bool isImportant, bool inheritedOnly, PropertyWhitelistType = PropertyWhitelistNone);
template <StyleApplicationPass pass>
- void applyAnimatedProperties(StyleResolverState&, const Element*, const DocumentTimeline*);
+ void applyAnimatedProperties(StyleResolverState&, const Element*, const DocumentTimeline*, const CSSAnimationUpdate*);
void resolveVariables(StyleResolverState&, CSSPropertyID, CSSValue*, Vector<std::pair<CSSPropertyID, String> >& knownExpressions);
void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPage, const String& pageName);
void matchPageRulesForList(Vector<StyleRulePage*>& matchedRules, const Vector<StyleRulePage*>&, bool isLeftPage, bool isFirstPage, const String& pageName);

Powered by Google App Engine
This is Rietveld 408576698