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

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: Update the test Created 3 years, 6 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 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;
}

Powered by Google App Engine
This is Rietveld 408576698