| Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| index 26bf17db0c53a9673d98f5d2ddd5fca4eac0f832..2a14122049ae2a4f5cd9e3527334bb9f70a06ecb 100644
|
| --- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| +++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| @@ -2436,6 +2436,23 @@ bool CSSPropertyParser::ConsumeBorder(bool important) {
|
| return range_.AtEnd();
|
| }
|
|
|
| +bool CSSPropertyParser::Consume2Values(const StylePropertyShorthand& shorthand,
|
| + bool important) {
|
| + DCHECK_EQ(shorthand.length(), 2u);
|
| + const CSSPropertyID* longhands = shorthand.properties();
|
| + const CSSValue* start = ParseSingleValue(longhands[0], shorthand.id());
|
| + if (!start)
|
| + return false;
|
| +
|
| + const CSSValue* end = ParseSingleValue(longhands[1], shorthand.id());
|
| + if (!end)
|
| + end = start;
|
| + AddProperty(longhands[0], shorthand.id(), *start, important);
|
| + AddProperty(longhands[1], shorthand.id(), *end, important);
|
| +
|
| + return range_.AtEnd();
|
| +}
|
| +
|
| bool CSSPropertyParser::Consume4Values(const StylePropertyShorthand& shorthand,
|
| bool important) {
|
| DCHECK_EQ(shorthand.length(), 4u);
|
| @@ -3418,6 +3435,18 @@ bool CSSPropertyParser::ParseShorthand(CSSPropertyID unresolved_property,
|
| return ConsumePlaceItemsShorthand(important);
|
| case CSSPropertyPlaceSelf:
|
| return ConsumePlaceSelfShorthand(important);
|
| + case CSSPropertyScrollPadding:
|
| + return Consume4Values(scrollPaddingShorthand(), important);
|
| + case CSSPropertyScrollPaddingBlock:
|
| + return Consume2Values(scrollPaddingBlockShorthand(), important);
|
| + case CSSPropertyScrollPaddingInline:
|
| + return Consume2Values(scrollPaddingInlineShorthand(), important);
|
| + case CSSPropertyScrollSnapMargin:
|
| + return Consume4Values(scrollSnapMarginShorthand(), important);
|
| + case CSSPropertyScrollSnapMarginBlock:
|
| + return Consume2Values(scrollSnapMarginBlockShorthand(), important);
|
| + case CSSPropertyScrollSnapMarginInline:
|
| + return Consume2Values(scrollSnapMarginInlineShorthand(), important);
|
| default:
|
| return false;
|
| }
|
|
|