| Index: Source/core/css/resolver/StyleBuilderConverter.cpp
|
| diff --git a/Source/core/css/resolver/StyleBuilderConverter.cpp b/Source/core/css/resolver/StyleBuilderConverter.cpp
|
| index f8ed6d37572dba2bb447176a8a72f9b6c53e31be..54b86566976329a1038fc5cba804da0cba0a071c 100644
|
| --- a/Source/core/css/resolver/StyleBuilderConverter.cpp
|
| +++ b/Source/core/css/resolver/StyleBuilderConverter.cpp
|
| @@ -90,6 +90,52 @@ AtomicString StyleBuilderConverter::convertFragmentIdentifier(StyleResolverState
|
| return nullAtom;
|
| }
|
|
|
| +FontDescription::VariantLigatures StyleBuilderConverter::convertFontVariantLigatures(StyleResolverState&, CSSValue* value)
|
| +{
|
| + if (value->isValueList()) {
|
| + FontDescription::VariantLigatures ligatures;
|
| + CSSValueList* valueList = toCSSValueList(value);
|
| + for (size_t i = 0; i < valueList->length(); ++i) {
|
| + CSSValue* item = valueList->item(i);
|
| + CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(item);
|
| + switch (primitiveValue->getValueID()) {
|
| + case CSSValueNoCommonLigatures:
|
| + ligatures.common = FontDescription::DisabledLigaturesState;
|
| + break;
|
| + case CSSValueCommonLigatures:
|
| + ligatures.common = FontDescription::EnabledLigaturesState;
|
| + break;
|
| + case CSSValueNoDiscretionaryLigatures:
|
| + ligatures.discretionary = FontDescription::DisabledLigaturesState;
|
| + break;
|
| + case CSSValueDiscretionaryLigatures:
|
| + ligatures.discretionary = FontDescription::EnabledLigaturesState;
|
| + break;
|
| + case CSSValueNoHistoricalLigatures:
|
| + ligatures.historical = FontDescription::DisabledLigaturesState;
|
| + break;
|
| + case CSSValueHistoricalLigatures:
|
| + ligatures.historical = FontDescription::EnabledLigaturesState;
|
| + break;
|
| + case CSSValueNoContextual:
|
| + ligatures.contextual = FontDescription::DisabledLigaturesState;
|
| + break;
|
| + case CSSValueContextual:
|
| + ligatures.contextual = FontDescription::EnabledLigaturesState;
|
| + break;
|
| + default:
|
| + ASSERT_NOT_REACHED();
|
| + break;
|
| + }
|
| + }
|
| + return ligatures;
|
| + }
|
| +
|
| + ASSERT_WITH_SECURITY_IMPLICATION(value->isPrimitiveValue());
|
| + ASSERT(toCSSPrimitiveValue(value)->getValueID() == CSSValueNormal);
|
| + return FontDescription::VariantLigatures();
|
| +}
|
| +
|
| EGlyphOrientation StyleBuilderConverter::convertGlyphOrientation(StyleResolverState&, CSSValue* value)
|
| {
|
| if (!value->isPrimitiveValue())
|
|
|