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 2e0e81aaf783874576ef436d2a2eef84090e008e..600f431628037b96cfb3c5c29a823feb3e06febf 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
@@ -2431,6 +2431,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; |
+ AddParsedProperty(longhands[0], shorthand.id(), *start, important); |
+ AddParsedProperty(longhands[1], shorthand.id(), *end, important); |
+ |
+ return range_.AtEnd(); |
+} |
majidvp
2017/07/12 21:04:21
Most of the CSS logic is present in the other patc
sunyunjia
2017/07/19 20:44:12
Yeah, they are no longer needed in this patch.
|
+ |
bool CSSPropertyParser::Consume4Values(const StylePropertyShorthand& shorthand, |
bool important) { |
DCHECK_EQ(shorthand.length(), 4u); |
@@ -3400,6 +3417,8 @@ bool CSSPropertyParser::ParseShorthand(CSSPropertyID unresolved_property, |
return ConsumePlaceItemsShorthand(important); |
case CSSPropertyPlaceSelf: |
return ConsumePlaceSelfShorthand(important); |
+ case CSSPropertyScrollBoundaryBehavior: |
+ return Consume2Values(scrollBoundaryBehaviorShorthand(), important); |
default: |
return false; |
} |