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

Unified Diff: Source/core/css/parser/LegacyCSSPropertyParser.cpp

Issue 1345063003: Adapt parseFontVariantLigatures to use CSSParserTokenRange (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/LegacyCSSPropertyParser.cpp
diff --git a/Source/core/css/parser/LegacyCSSPropertyParser.cpp b/Source/core/css/parser/LegacyCSSPropertyParser.cpp
index 38fe11864b07f8d8df945590b0c3b88848388a3b..820f4f00c55e9902d3302eb2409c8ef85bbc73cb 100644
--- a/Source/core/css/parser/LegacyCSSPropertyParser.cpp
+++ b/Source/core/css/parser/LegacyCSSPropertyParser.cpp
@@ -1382,12 +1382,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
parsedValue = parseFontFeatureSettings();
break;
- case CSSPropertyFontVariantLigatures:
- if (id == CSSValueNormal)
- validPrimitive = true;
- else
- return parseFontVariantLigatures(important);
- break;
case CSSPropertyWebkitClipPath:
if (id == CSSValueNone) {
validPrimitive = true;
@@ -1445,6 +1439,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyOverflow:
case CSSPropertyQuotes:
case CSSPropertyWebkitHighlight:
+ case CSSPropertyFontVariantLigatures:
validPrimitive = false;
break;
@@ -7017,59 +7012,6 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFontFeatureSettings()
return settings.release();
}
-bool CSSPropertyParser::parseFontVariantLigatures(bool important)
-{
- RefPtrWillBeRawPtr<CSSValueList> ligatureValues = CSSValueList::createSpaceSeparated();
- bool sawCommonLigaturesValue = false;
- bool sawDiscretionaryLigaturesValue = false;
- bool sawHistoricalLigaturesValue = false;
- bool sawContextualLigaturesValue = false;
-
- for (CSSParserValue* value = m_valueList->current(); value; value = m_valueList->next()) {
- if (value->m_unit != CSSParserValue::Identifier)
- return false;
-
- switch (value->id) {
- case CSSValueNoCommonLigatures:
- case CSSValueCommonLigatures:
- if (sawCommonLigaturesValue)
- return false;
- sawCommonLigaturesValue = true;
- ligatureValues->append(cssValuePool().createIdentifierValue(value->id));
- break;
- case CSSValueNoDiscretionaryLigatures:
- case CSSValueDiscretionaryLigatures:
- if (sawDiscretionaryLigaturesValue)
- return false;
- sawDiscretionaryLigaturesValue = true;
- ligatureValues->append(cssValuePool().createIdentifierValue(value->id));
- break;
- case CSSValueNoHistoricalLigatures:
- case CSSValueHistoricalLigatures:
- if (sawHistoricalLigaturesValue)
- return false;
- sawHistoricalLigaturesValue = true;
- ligatureValues->append(cssValuePool().createIdentifierValue(value->id));
- break;
- case CSSValueNoContextual:
- case CSSValueContextual:
- if (sawContextualLigaturesValue)
- return false;
- sawContextualLigaturesValue = true;
- ligatureValues->append(cssValuePool().createIdentifierValue(value->id));
- break;
- default:
- return false;
- }
- }
-
- if (!ligatureValues->length())
- return false;
-
- addProperty(CSSPropertyFontVariantLigatures, ligatureValues.release(), important);
- return true;
-}
-
bool CSSPropertyParser::parseCalculation(CSSParserValue* value, ValueRange range)
{
ASSERT(isCalculation(value));
« no previous file with comments | « Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698