Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Unified Diff: Source/core/css/resolver/StyleBuilderConverter.cpp

Issue 447443003: Remove custom style building for font-variant-ligatures. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/resolver/StyleBuilderConverter.h ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « Source/core/css/resolver/StyleBuilderConverter.h ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698