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

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: Fix failures 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 b3c499778e0c397f206ba16b56ec554792e2d433..e133907fda044f6f7959d4645ee95e99598d5a2f 100644
--- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
@@ -761,13 +761,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;
@@ -1230,6 +1223,8 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyWebkitTextFillColor:
case CSSPropertyColor:
case CSSPropertyZIndex:
+ case CSSPropertyTextShadow:
+ case CSSPropertyBoxShadow:
validPrimitive = false;
break;
@@ -3872,22 +3867,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;
« 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