Index: Source/core/css/resolver/StyleBuilderCustom.cpp |
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp |
index a30084fe0034412b92288c9e67c730e7b1aa52c2..d1daf005af4a31d68161da18c57e598b4bbba292 100644 |
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp |
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp |
@@ -864,6 +864,43 @@ void StyleBuilderFunctions::applyValueCSSPropertyTextUnderlinePosition(StyleReso |
state.style()->setTextUnderlinePosition(static_cast<TextUnderlinePosition>(t)); |
} |
+void StyleBuilderFunctions::applyInitialCSSPropertyWillChange(StyleResolverState& state) |
+{ |
+ state.style()->setWillChangeContents(false); |
+ state.style()->setWillChangeScrollPosition(false); |
+ state.style()->setWillChangeProperties(Vector<CSSPropertyID>()); |
+} |
+ |
+void StyleBuilderFunctions::applyInheritCSSPropertyWillChange(StyleResolverState& state) |
+{ |
+ state.style()->setWillChangeContents(state.parentStyle()->willChangeContents()); |
+ state.style()->setWillChangeScrollPosition(state.parentStyle()->willChangeScrollPosition()); |
+ state.style()->setWillChangeProperties(state.parentStyle()->willChangeProperties()); |
+} |
+ |
+void StyleBuilderFunctions::applyValueCSSPropertyWillChange(StyleResolverState& state, CSSValue* value) |
+{ |
+ ASSERT(value->isValueList()); |
+ bool willChangeContents = false; |
+ bool willChangeScrollPosition = false; |
+ Vector<CSSPropertyID> willChangeProperties; |
+ |
+ for (CSSValueListIterator i(value); i.hasMore(); i.advance()) { |
+ CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(i.value()); |
+ if (CSSPropertyID propertyID = primitiveValue->getPropertyID()) |
+ willChangeProperties.append(propertyID); |
+ else if (primitiveValue->getValueID() == CSSValueContents) |
+ willChangeContents = true; |
+ else if (primitiveValue->getValueID() == CSSValueScrollPosition) |
+ willChangeScrollPosition = true; |
+ else |
+ ASSERT_NOT_REACHED(); |
+ } |
+ state.style()->setWillChangeContents(willChangeContents); |
+ state.style()->setWillChangeScrollPosition(willChangeScrollPosition); |
+ state.style()->setWillChangeProperties(willChangeProperties); |
+} |
+ |
// Everything below this line is from the old StyleResolver::applyProperty |
// and eventually needs to move into new StyleBuilderFunctions calls intead. |
@@ -1944,6 +1981,7 @@ void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolverState& state, |
case CSSPropertyWhiteSpace: |
case CSSPropertyWidows: |
case CSSPropertyWidth: |
+ case CSSPropertyWillChange: |
case CSSPropertyWordBreak: |
case CSSPropertyWordSpacing: |
case CSSPropertyWordWrap: |