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

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

Issue 2532953008: Apply custom property animations (Closed)
Patch Set: Make animatedElement usage consistent Created 4 years 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: third_party/WebKit/Source/core/css/resolver/StyleResolver.h
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.h b/third_party/WebKit/Source/core/css/resolver/StyleResolver.h
index e69b725608ca3d4e67dc7efcc99e9ad2fd5386c1..8b79e49106e9a4f568e35bef5e8955703af4bfac 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.h
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.h
@@ -199,10 +199,33 @@ class CORE_EXPORT StyleResolver final
void collectTreeBoundaryCrossingRulesV0CascadeOrder(const Element&,
ElementRuleCollector&);
- void applyMatchedProperties(StyleResolverState&, const MatchResult&);
- bool applyAnimatedProperties(StyleResolverState&,
- const Element* animatingElement);
- void applyCallbackSelectors(StyleResolverState&);
+ struct CacheSuccess {
+ STACK_ALLOCATED();
+ bool isInheritedCacheHit;
+ bool isNonInheritedCacheHit;
+ unsigned cacheHash;
+ Member<const CachedMatchedProperties> cachedMatchedProperties;
+
+ CacheSuccess(bool isInheritedCacheHit,
+ bool isNonInheritedCacheHit,
+ unsigned cacheHash,
+ const CachedMatchedProperties* cachedMatchedProperties)
+ : isInheritedCacheHit(isInheritedCacheHit),
+ isNonInheritedCacheHit(isNonInheritedCacheHit),
+ cacheHash(cacheHash),
+ cachedMatchedProperties(cachedMatchedProperties) {}
+
+ bool isFullCacheHit() const {
+ return isInheritedCacheHit && isNonInheritedCacheHit;
+ }
+ bool shouldApplyInheritedOnly() const {
+ return isNonInheritedCacheHit && !isInheritedCacheHit;
+ }
+ void setFailed() {
+ isInheritedCacheHit = false;
+ isNonInheritedCacheHit = false;
+ }
+ };
// These flags indicate whether an apply pass for a given CSSPropertyPriority
// and isImportant is required.
@@ -228,6 +251,30 @@ class CORE_EXPORT StyleResolver final
UpdateNeedsApplyPass = true,
};
+ void applyMatchedPropertiesAndCustomPropertyAnimations(
+ StyleResolverState&,
+ const MatchResult&,
+ const Element* animatingElement);
+ CacheSuccess applyMatchedCache(StyleResolverState&, const MatchResult&);
+ void applyCustomProperties(StyleResolverState&,
+ const MatchResult&,
+ bool applyAnimations,
+ const CacheSuccess&,
+ NeedsApplyPass&);
+ void applyMatchedAnimationProperties(StyleResolverState&,
+ const MatchResult&,
+ const CacheSuccess&,
+ NeedsApplyPass&);
+ void applyMatchedStandardProperties(StyleResolverState&,
+ const MatchResult&,
+ const CacheSuccess&,
+ NeedsApplyPass&);
+ void calculateAnimationUpdate(StyleResolverState&,
+ const Element* animatingElement);
+ bool applyAnimatedStandardProperties(StyleResolverState&, const Element*);
+
+ void applyCallbackSelectors(StyleResolverState&);
+
template <CSSPropertyPriority priority, ShouldUpdateNeedsApplyPass>
void applyMatchedProperties(StyleResolverState&,
const MatchedPropertiesRange&,

Powered by Google App Engine
This is Rietveld 408576698