Index: Source/core/css/parser/CSSPropertyParser.cpp |
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp |
index 043bb21d8ca104410b39cabc06511c0877bf3bdb..7feb07b4a48960ea2a2e5239ebe093afee6063c7 100644 |
--- a/Source/core/css/parser/CSSPropertyParser.cpp |
+++ b/Source/core/css/parser/CSSPropertyParser.cpp |
@@ -1483,6 +1483,10 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId, bool important) |
parsedValue = parseTouchAction(); |
break; |
+ case CSSPropertyScrollBlocksOn: |
+ parsedValue = parseScrollBlocksOn(); |
+ break; |
+ |
case CSSPropertyAlignSelf: |
ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); |
return parseItemPositionOverflowPosition(propId, important); |
@@ -7385,6 +7389,36 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTouchAction() |
return nullptr; |
} |
+PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseScrollBlocksOn() |
+{ |
+ CSSParserValue* value = m_valueList->current(); |
+ if (value->id == CSSValueNone) { |
+ m_valueList->next(); |
+ return cssValuePool().createIdentifierValue(CSSValueNone); |
+ } |
+ |
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); |
+ while (value) { |
+ switch (value->id) { |
+ case CSSValueStartTouch: |
+ case CSSValueWheelEvent: |
+ case CSSValueScrollEvent: { |
+ RefPtrWillBeRawPtr<CSSValue> flagValue = cssValuePool().createIdentifierValue(value->id); |
+ if (list->hasValue(flagValue.get())) |
+ return nullptr; |
+ list->append(flagValue.release()); |
+ break; |
+ } |
+ default: |
+ return nullptr; |
+ } |
+ value = m_valueList->next(); |
+ } |
+ |
+ ASSERT(list->length()); |
+ return list.release(); |
+} |
+ |
void CSSPropertyParser::addTextDecorationProperty(CSSPropertyID propId, PassRefPtrWillBeRawPtr<CSSValue> value, bool important) |
{ |
// The text-decoration-line property takes priority over text-decoration, unless the latter has important priority set. |