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

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

Issue 2610853004: Implements CSSPropertyAPI for the text-indent property. (Closed)
Patch Set: rebase Created 3 years, 11 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 6caab9c9efc28dca15ad1dae816337677293362c..43a4bdbe46822da283fc5084c61e020b4517f3a8 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -705,48 +705,6 @@ static CSSValue* consumeSnapHeight(CSSParserTokenRange& range,
return list;
}
-static CSSValue* consumeTextIndent(CSSParserTokenRange& range,
- CSSParserMode cssParserMode) {
- // [ <length> | <percentage> ] && hanging? && each-line?
- // Keywords only allowed when css3Text is enabled.
- CSSValueList* list = CSSValueList::createSpaceSeparated();
-
- bool hasLengthOrPercentage = false;
- bool hasEachLine = false;
- bool hasHanging = false;
-
- do {
- if (!hasLengthOrPercentage) {
- if (CSSValue* textIndent = consumeLengthOrPercent(
- range, cssParserMode, ValueRangeAll, UnitlessQuirk::Allow)) {
- list->append(*textIndent);
- hasLengthOrPercentage = true;
- continue;
- }
- }
-
- if (RuntimeEnabledFeatures::css3TextEnabled()) {
- CSSValueID id = range.peek().id();
- if (!hasEachLine && id == CSSValueEachLine) {
- list->append(*consumeIdent(range));
- hasEachLine = true;
- continue;
- }
- if (!hasHanging && id == CSSValueHanging) {
- list->append(*consumeIdent(range));
- hasHanging = true;
- continue;
- }
- }
- return nullptr;
- } while (!range.atEnd());
-
- if (!hasLengthOrPercentage)
- return nullptr;
-
- return list;
-}
-
static bool validWidthOrHeightKeyword(CSSValueID id,
const CSSParserContext* context) {
if (id == CSSValueWebkitMinContent || id == CSSValueWebkitMaxContent ||
@@ -3115,8 +3073,6 @@ const CSSValue* CSSPropertyParser::parseSingleValue(
property == CSSPropertyCounterIncrement ? 1 : 0);
case CSSPropertySnapHeight:
return consumeSnapHeight(m_range, m_context->mode());
- case CSSPropertyTextIndent:
- return consumeTextIndent(m_range, m_context->mode());
case CSSPropertyMaxWidth:
case CSSPropertyMaxHeight:
return consumeMaxWidthOrHeight(m_range, m_context, UnitlessQuirk::Allow);

Powered by Google App Engine
This is Rietveld 408576698