| Index: Source/core/css/resolver/FontBuilder.cpp
|
| diff --git a/Source/core/css/resolver/FontBuilder.cpp b/Source/core/css/resolver/FontBuilder.cpp
|
| index ebe3114a6a287b910a12d80c8ce006324ae12346..009e557cef48b9b4234c5d610a8ed6fc0f3d8200 100644
|
| --- a/Source/core/css/resolver/FontBuilder.cpp
|
| +++ b/Source/core/css/resolver/FontBuilder.cpp
|
| @@ -381,87 +381,6 @@ void FontBuilder::setStretch(FontStretch fontStretch)
|
| scope.fontDescription().setStretch(fontStretch);
|
| }
|
|
|
| -void FontBuilder::setFontVariantLigaturesInitial()
|
| -{
|
| - FontDescriptionChangeScope scope(this);
|
| -
|
| - scope.fontDescription().setCommonLigaturesState(FontDescription::NormalLigaturesState);
|
| - scope.fontDescription().setDiscretionaryLigaturesState(FontDescription::NormalLigaturesState);
|
| - scope.fontDescription().setHistoricalLigaturesState(FontDescription::NormalLigaturesState);
|
| - scope.fontDescription().setContextualLigaturesState(FontDescription::NormalLigaturesState);
|
| -}
|
| -
|
| -void FontBuilder::setFontVariantLigaturesInherit(const FontDescription& parentFontDescription)
|
| -{
|
| - FontDescriptionChangeScope scope(this);
|
| -
|
| - scope.fontDescription().setCommonLigaturesState(parentFontDescription.commonLigaturesState());
|
| - scope.fontDescription().setDiscretionaryLigaturesState(parentFontDescription.discretionaryLigaturesState());
|
| - scope.fontDescription().setHistoricalLigaturesState(parentFontDescription.historicalLigaturesState());
|
| - scope.fontDescription().setContextualLigaturesState(parentFontDescription.historicalLigaturesState());
|
| -}
|
| -
|
| -void FontBuilder::setFontVariantLigaturesValue(CSSValue* value)
|
| -{
|
| - FontDescriptionChangeScope scope(this);
|
| -
|
| - FontDescription::LigaturesState commonLigaturesState = FontDescription::NormalLigaturesState;
|
| - FontDescription::LigaturesState discretionaryLigaturesState = FontDescription::NormalLigaturesState;
|
| - FontDescription::LigaturesState historicalLigaturesState = FontDescription::NormalLigaturesState;
|
| - FontDescription::LigaturesState contextualLigaturesState = FontDescription::NormalLigaturesState;
|
| -
|
| - if (value->isValueList()) {
|
| - CSSValueList* valueList = toCSSValueList(value);
|
| - for (size_t i = 0; i < valueList->length(); ++i) {
|
| - CSSValue* item = valueList->item(i);
|
| - ASSERT(item->isPrimitiveValue());
|
| - if (item->isPrimitiveValue()) {
|
| - CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(item);
|
| - switch (primitiveValue->getValueID()) {
|
| - case CSSValueNoCommonLigatures:
|
| - commonLigaturesState = FontDescription::DisabledLigaturesState;
|
| - break;
|
| - case CSSValueCommonLigatures:
|
| - commonLigaturesState = FontDescription::EnabledLigaturesState;
|
| - break;
|
| - case CSSValueNoDiscretionaryLigatures:
|
| - discretionaryLigaturesState = FontDescription::DisabledLigaturesState;
|
| - break;
|
| - case CSSValueDiscretionaryLigatures:
|
| - discretionaryLigaturesState = FontDescription::EnabledLigaturesState;
|
| - break;
|
| - case CSSValueNoHistoricalLigatures:
|
| - historicalLigaturesState = FontDescription::DisabledLigaturesState;
|
| - break;
|
| - case CSSValueHistoricalLigatures:
|
| - historicalLigaturesState = FontDescription::EnabledLigaturesState;
|
| - break;
|
| - case CSSValueNoContextual:
|
| - contextualLigaturesState = FontDescription::DisabledLigaturesState;
|
| - break;
|
| - case CSSValueContextual:
|
| - contextualLigaturesState = FontDescription::EnabledLigaturesState;
|
| - break;
|
| - default:
|
| - ASSERT_NOT_REACHED();
|
| - break;
|
| - }
|
| - }
|
| - }
|
| - }
|
| -#if ENABLE(ASSERT)
|
| - else {
|
| - ASSERT_WITH_SECURITY_IMPLICATION(value->isPrimitiveValue());
|
| - ASSERT(toCSSPrimitiveValue(value)->getValueID() == CSSValueNormal);
|
| - }
|
| -#endif
|
| -
|
| - scope.fontDescription().setCommonLigaturesState(commonLigaturesState);
|
| - scope.fontDescription().setDiscretionaryLigaturesState(discretionaryLigaturesState);
|
| - scope.fontDescription().setHistoricalLigaturesState(historicalLigaturesState);
|
| - scope.fontDescription().setContextualLigaturesState(contextualLigaturesState);
|
| -}
|
| -
|
| void FontBuilder::setScript(const String& locale)
|
| {
|
| FontDescriptionChangeScope scope(this);
|
| @@ -484,6 +403,13 @@ void FontBuilder::setVariant(FontVariant smallCaps)
|
| scope.fontDescription().setVariant(smallCaps);
|
| }
|
|
|
| +void FontBuilder::setVariantLigatures(const FontDescription::VariantLigatures& ligatures)
|
| +{
|
| + FontDescriptionChangeScope scope(this);
|
| +
|
| + scope.fontDescription().setVariantLigatures(ligatures);
|
| +}
|
| +
|
| void FontBuilder::setTextRendering(TextRenderingMode textRenderingMode)
|
| {
|
| FontDescriptionChangeScope scope(this);
|
|
|