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/LegacyCSSPropertyParser.cpp

Issue 1419223002: Move text-shadow/box-shadow properties into CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
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 15bb12783793ade24b77d430b0ac983d54952504..e488eb80db605f249b889c7fd73ce79fbc82e6d4 100644
--- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
@@ -770,13 +770,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyOutlineOffset:
validPrimitive = validUnit(value, FLength);
break;
- case CSSPropertyTextShadow: // CSS2 property, dropped in CSS2.1, back in CSS3, so treat as CSS3
- case CSSPropertyBoxShadow:
- if (id == CSSValueNone)
- validPrimitive = true;
- else
- parsedValue = parseShadow(m_valueList, propId);
- break;
case CSSPropertyWebkitBoxReflect:
if (id == CSSValueNone)
validPrimitive = true;
@@ -1240,6 +1233,8 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyWebkitTapHighlightColor:
case CSSPropertyWebkitTextFillColor:
case CSSPropertyColor:
+ case CSSPropertyTextShadow:
+ case CSSPropertyBoxShadow:
validPrimitive = false;
break;
@@ -4256,22 +4251,6 @@ bool CSSPropertyParser::parseColorFromValue(const CSSParserValue* value, RGBA32&
return true;
}
-PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseShadow(CSSParserValueList* valueList, CSSPropertyID propID)
-{
- RefPtrWillBeRawPtr<CSSValueList> shadowValueList = CSSValueList::createCommaSeparated();
- const bool isBoxShadowProperty = propID == CSSPropertyBoxShadow;
- while (RefPtrWillBeRawPtr<CSSShadowValue> shadowValue = parseSingleShadow(valueList, isBoxShadowProperty, isBoxShadowProperty)) {
- shadowValueList->append(shadowValue);
- if (!valueList->current())
- break;
- if (!consumeComma(valueList))
- return nullptr;
- }
- if (shadowValueList->length() == 0)
- return nullptr;
- return shadowValueList;
-}
-
PassRefPtrWillBeRawPtr<CSSShadowValue> CSSPropertyParser::parseSingleShadow(CSSParserValueList* valueList, bool allowInset, bool allowSpread)
{
RefPtrWillBeRawPtr<CSSPrimitiveValue> style = nullptr;

Powered by Google App Engine
This is Rietveld 408576698