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

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

Issue 1398553002: Move counter-increment/counter-reset handling into CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Work around ::lowest problem 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 6c21acf77fd859c9fa4822a344fb712091195e07..ed0bab93d0ca7006d76336e05df4913093ec5b7c 100644
--- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
@@ -750,19 +750,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
}
break;
- case CSSPropertyCounterIncrement:
- if (id == CSSValueNone)
- validPrimitive = true;
- else
- parsedValue = parseCounter(1);
- break;
- case CSSPropertyCounterReset:
- if (id == CSSValueNone)
- validPrimitive = true;
- else
- parsedValue = parseCounter(0);
- break;
-
case CSSPropertyTextDecoration:
// Fall through 'text-decoration-line' parsing if CSS 3 Text Decoration
// is disabled to match CSS 2.1 rules for parsing 'text-decoration'.
@@ -1368,6 +1355,8 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyWebkitBorderHorizontalSpacing:
case CSSPropertyWebkitBorderVerticalSpacing:
case CSSPropertyBorderSpacing:
+ case CSSPropertyCounterIncrement:
+ case CSSPropertyCounterReset:
validPrimitive = false;
break;
@@ -5288,34 +5277,6 @@ bool CSSPropertyParser::parseBorderRadius(CSSPropertyID unresolvedProperty, bool
return true;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseCounter(int defaultValue)
-{
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
-
- while (m_valueList->current()) {
- CSSParserValue* val = m_valueList->current();
- if (val->m_unit != CSSParserValue::Identifier)
- return nullptr;
- RefPtrWillBeRawPtr<CSSCustomIdentValue> counterName = createPrimitiveCustomIdentValue(val);
- m_valueList->next();
-
- val = m_valueList->current();
- int i = defaultValue;
- if (val && validUnit(val, FInteger)) {
- i = clampTo<int>(val->fValue);
- m_valueList->next();
- }
-
- list->append(CSSValuePair::create(counterName.release(),
- cssValuePool().createValue(i, CSSPrimitiveValue::UnitType::Number),
- CSSValuePair::DropIdenticalValues));
- }
-
- if (!list->length())
- return nullptr;
- return list.release();
-}
-
// This should go away once we drop support for -webkit-gradient
static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseDeprecatedGradientPoint(CSSParserValue* a, bool horizontal)
{
« 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