Chromium Code Reviews| 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..0fcd2821b25b3927a8482fe3907c906df487c4cd 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,39 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTouchAction() |
| return nullptr; |
| } |
| +PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseScrollBlocksOn() |
| +{ |
| + CSSParserValue* value = m_valueList->current(); |
| + RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); |
| + if (m_valueList->size() == 1 && value && (value->id == CSSValueNone)) { |
|
Timothy Loh
2014/11/14 22:06:41
I'm pretty sure we don't need to check the size (c
Rick Byers
2014/11/18 03:03:08
Done.
|
| + list->append(cssValuePool().createIdentifierValue(CSSValueNone)); |
| + m_valueList->next(); |
| + return list.release(); |
| + } |
| + |
| + 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(); |
| + } |
| + |
| + if (list->length()) |
|
Timothy Loh
2014/11/14 22:06:41
Since value is never null when we get into this fu
Rick Byers
2014/11/18 03:03:08
Done.
|
| + return list.release(); |
| + |
| + return nullptr; |
| +} |
| + |
| 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. |