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

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

Issue 1406433002: Move text-indent property 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 | « third_party/WebKit/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: third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
index 76edf7bc7305eae3c9a29efde9e58556c2c9ef0f..3f4f1a9e361cab2a607ab707874cf17478903c44 100644
--- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
@@ -660,10 +660,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
validPrimitive = validUnit(value, FLength | FNonNeg | unitless);
break;
- case CSSPropertyTextIndent:
- parsedValue = parseTextIndent();
- break;
-
case CSSPropertyPaddingTop: //// <padding-width> | inherit
case CSSPropertyPaddingRight: // Which is defined as
case CSSPropertyPaddingBottom: // <length> | <percentage>
@@ -1354,6 +1350,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyCounterIncrement:
case CSSPropertyCounterReset:
case CSSPropertySize:
+ case CSSPropertyTextIndent:
validPrimitive = false;
break;
@@ -6365,45 +6362,6 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTextEmphasisStyle()
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTextIndent()
-{
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
-
- bool hasLengthOrPercentage = false;
- bool hasEachLine = false;
- bool hasHanging = false;
-
- for (CSSParserValue* value = m_valueList->current(); value; value = m_valueList->next()) {
- // <length> | <percentage> | inherit when RuntimeEnabledFeatures::css3TextEnabled() returns false
- if (!hasLengthOrPercentage && validUnit(value, FLength | FPercent | FUnitlessQuirk)) {
- list->append(createPrimitiveNumericValue(value));
- hasLengthOrPercentage = true;
- continue;
- }
-
- // [ <length> | <percentage> ] && hanging? && each-line? | inherit
- // when RuntimeEnabledFeatures::css3TextEnabled() returns true
- if (RuntimeEnabledFeatures::css3TextEnabled()) {
- if (!hasEachLine && value->id == CSSValueEachLine) {
- list->append(cssValuePool().createIdentifierValue(CSSValueEachLine));
- hasEachLine = true;
- continue;
- }
- if (!hasHanging && value->id == CSSValueHanging) {
- list->append(cssValuePool().createIdentifierValue(CSSValueHanging));
- hasHanging = true;
- continue;
- }
- }
- return nullptr;
- }
-
- if (!hasLengthOrPercentage)
- return nullptr;
-
- return list.release();
-}
-
bool CSSPropertyParser::parseCalculation(CSSParserValue* value, ValueRange range)
{
ASSERT(isCalculation(value));
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698