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

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

Issue 1405793002: Move legacy webkit properties into CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch for landing Created 5 years, 2 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 | « no previous file | third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1632103e4cafc7b748d2e315ce72d290646585bc..73f765836830c131aa302d452b642694a2400bee 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -875,6 +875,24 @@ static PassRefPtrWillBeRawPtr<CSSValue> consumeTouchAction(CSSParserTokenRange&
return list.release();
}
+static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeLineClamp(CSSParserTokenRange& range, CSSParserMode cssParserMode)
+{
+ if (range.peek().type() != PercentageToken && range.peek().type() != NumberToken)
+ return nullptr;
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> clampValue = consumePercent(range, ValueRangeNonNegative);
+ if (clampValue)
+ return clampValue;
+ // When specifying number of lines, don't allow 0 as a valid value.
+ return consumeInteger(range, cssParserMode, 1);
+}
+
+static PassRefPtrWillBeRawPtr<CSSValue> consumeLocale(CSSParserTokenRange& range)
+{
+ if (range.peek().id() == CSSValueAuto)
+ return consumeIdent(range);
+ return consumeString(range);
+}
+
PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSPropertyID propId)
{
m_range.consumeWhitespace();
@@ -938,6 +956,13 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSProperty
return consumeClip(m_range, m_context.mode());
case CSSPropertyTouchAction:
return consumeTouchAction(m_range);
+ case CSSPropertyWebkitLineClamp:
+ return consumeLineClamp(m_range, m_context.mode());
+ case CSSPropertyWebkitFontSizeDelta:
+ return consumeLength(m_range, m_context.mode(), ValueRangeAll, UnitlessQuirk::Allow);
+ case CSSPropertyWebkitHyphenateCharacter:
+ case CSSPropertyWebkitLocale:
+ return consumeLocale(m_range);
default:
return nullptr;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698