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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: Fixed the comments Created 3 years, 7 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
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 a959114ac27454c303d921671c8b60b7e8be0a18..c50e69d95bed01d133195c27b2f802e7c20af09e 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -2447,6 +2447,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);
@@ -3411,6 +3428,8 @@ bool CSSPropertyParser::ParseShorthand(CSSPropertyID unresolved_property,
return ConsumePlaceItemsShorthand(important);
case CSSPropertyPlaceSelf:
return ConsumePlaceSelfShorthand(important);
+ case CSSPropertyScrollBoundaryBehavior:
+ return Consume2Values(scrollBoundaryBehaviorShorthand(), important);
default:
return false;
}

Powered by Google App Engine
This is Rietveld 408576698