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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp

Issue 2100013002: Implement the new text-size-adjust CSS property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup convertTextSizeAdjust and add a test that better covers it Created 4 years, 6 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
Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
index 70b4a404fbd6b5c3877d3b75e19d12722e6bffc0..269779812af5909cfa68f24d3d020c1f762b184c 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -714,6 +714,15 @@ static CSSValue* consumeTabSize(CSSParserTokenRange& range, CSSParserMode cssPar
return consumeLength(range, cssParserMode, ValueRangeNonNegative);
}
+static CSSValue* consumeTextSizeAdjust(CSSParserTokenRange& range, CSSParserMode cssParserMode)
+{
+ if (range.peek().id() == CSSValueAuto)
+ return consumeIdent(range);
+ if (range.peek().id() == CSSValueNone)
+ return consumeIdent(range);
+ return consumePercent(range, ValueRangeNonNegative);
+}
+
static CSSValue* consumeFontSize(CSSParserTokenRange& range, CSSParserMode cssParserMode, UnitlessQuirk unitless = UnitlessQuirk::Forbid)
{
if (range.peek().id() >= CSSValueXxSmall && range.peek().id() <= CSSValueLarger)
@@ -3596,6 +3605,8 @@ CSSValue* CSSPropertyParser::parseSingleValue(CSSPropertyID unresolvedProperty,
return consumeSpacing(m_range, m_context.mode());
case CSSPropertyTabSize:
return consumeTabSize(m_range, m_context.mode());
+ case CSSPropertyTextSizeAdjust:
+ return consumeTextSizeAdjust(m_range, m_context.mode());
case CSSPropertyFontSize:
return consumeFontSize(m_range, m_context.mode(), UnitlessQuirk::Allow);
case CSSPropertyLineHeight:

Powered by Google App Engine
This is Rietveld 408576698