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

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

Issue 18686005: Style resolution: Apply animation properties earlier in a separate pass (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/core/css/CSSPropertyNames.in ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.h
diff --git a/Source/core/css/resolver/StyleResolver.h b/Source/core/css/resolver/StyleResolver.h
index 65b3b5a7b164f73be065e0c71c4914ab22cf6d51..1527df4a6758d36f6866c32fe151c56b6dff72f2 100644
--- a/Source/core/css/resolver/StyleResolver.h
+++ b/Source/core/css/resolver/StyleResolver.h
@@ -340,10 +340,34 @@ private:
enum StyleApplicationPass {
VariableDefinitions,
+ AnimationProperties,
HighPriorityProperties,
LowPriorityProperties
};
template <StyleApplicationPass pass>
+ static bool isPropertyForPass(CSSPropertyID property)
+ {
dglazkov 2013/07/10 14:43:42 Why is the body of the function in the header file
+ COMPILE_ASSERT(CSSPropertyVariable < firstCSSProperty, CSS_variable_is_before_first_property);
+ const CSSPropertyID firstAnimationProperty = CSSPropertyWebkitAnimation;
+ const CSSPropertyID lastAnimationProperty = CSSPropertyTransitionTimingFunction;
+ COMPILE_ASSERT(firstCSSProperty == firstAnimationProperty, CSS_first_animation_property_should_be_first_property);
+ const CSSPropertyID firstHighPriorityProperty = CSSPropertyColor;
+ const CSSPropertyID lastHighPriorityProperty = CSSPropertyLineHeight;
+ COMPILE_ASSERT(lastAnimationProperty + 1 == firstHighPriorityProperty, CSS_color_is_first_high_priority_property);
+ COMPILE_ASSERT(CSSPropertyLineHeight == firstHighPriorityProperty + 18, CSS_line_height_is_end_of_high_prioity_property_range);
+ COMPILE_ASSERT(CSSPropertyZoom == lastHighPriorityProperty - 1, CSS_zoom_is_before_line_height);
+ switch (pass) {
+ case VariableDefinitions:
+ return property == CSSPropertyVariable;
+ case AnimationProperties:
+ return property >= firstAnimationProperty && property <= lastAnimationProperty;
+ case HighPriorityProperties:
+ return property >= firstHighPriorityProperty && property <= lastHighPriorityProperty;
+ case LowPriorityProperties:
+ return property > lastHighPriorityProperty;
+ }
+ }
+ template <StyleApplicationPass pass>
void applyMatchedProperties(const MatchResult&, bool important, int startIndex, int endIndex, bool inheritedOnly);
template <StyleApplicationPass pass>
void applyProperties(const StylePropertySet* properties, StyleRule*, bool isImportant, bool inheritedOnly, PropertyWhitelistType = PropertyWhitelistNone);
« no previous file with comments | « Source/core/css/CSSPropertyNames.in ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698