diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/css/cssom/style_value_factory.h')
-rw-r--r-- | chromium/third_party/blink/renderer/core/css/cssom/style_value_factory.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/chromium/third_party/blink/renderer/core/css/cssom/style_value_factory.h b/chromium/third_party/blink/renderer/core/css/cssom/style_value_factory.h index 094c4635dc1..97e73500a10 100644 --- a/chromium/third_party/blink/renderer/core/css/cssom/style_value_factory.h +++ b/chromium/third_party/blink/renderer/core/css/cssom/style_value_factory.h @@ -14,6 +14,7 @@ namespace blink { class CSSParserContext; class CSSProperty; +class CSSPropertyName; class CSSValue; class ExecutionContext; class PropertyRegistration; @@ -28,14 +29,10 @@ class CORE_EXPORT StyleValueFactory { const PropertyRegistration*, const String&, const CSSParserContext*); - static CSSStyleValue* CssValueToStyleValue( - CSSPropertyID, - const AtomicString& custom_property_name, - const CSSValue&); - static CSSStyleValueVector CssValueToStyleValueVector( - CSSPropertyID, - const AtomicString& custom_property_name, - const CSSValue&); + static CSSStyleValue* CssValueToStyleValue(const CSSPropertyName&, + const CSSValue&); + static CSSStyleValueVector CssValueToStyleValueVector(const CSSPropertyName&, + const CSSValue&); // Returns an empty vector on error conditions. static CSSStyleValueVector CoerceStyleValuesOrStrings( const CSSProperty& property, @@ -43,7 +40,16 @@ class CORE_EXPORT StyleValueFactory { const PropertyRegistration*, const HeapVector<CSSStyleValueOrString>& values, const ExecutionContext&); - // If you don't have complex CSS properties, use this one. + // Reify a CSSStyleValue without the context of a CSS property. For most + // CSSValues, this will result in a CSSUnsupportedStyleValue. Note that the + // CSSUnsupportedStyleValue returned from this function (unlike regular + // CSSUnsupportedStyleValues) do not have an associated CSS property, + // which means that any attempt to StylePropertyMap.set/setAll such values + // will always fail. Therefore, this function should only be used in + // situations where declared and inline style objects [1] are not accessible, + // such as paint worklets. + // + // [1] https://www.w3.org/TR/css-typed-om-1/#declared-stylepropertymap-objects static CSSStyleValueVector CssValueToStyleValueVector(const CSSValue&); }; |