Chromium Code Reviews| 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); |