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

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

Issue 723373006: Add CSS parsing support for the scroll-blocks-on property (in place of touch-action-delay) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Apply CR feedback Created 6 years, 1 month 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
« no previous file with comments | « Source/core/css/parser/CSSPropertyParser.h ('k') | Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7feb07b4a48960ea2a2e5239ebe093afee6063c7 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,36 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTouchAction()
return nullptr;
}
+PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseScrollBlocksOn()
+{
+ CSSParserValue* value = m_valueList->current();
+ if (value->id == CSSValueNone) {
+ m_valueList->next();
+ return cssValuePool().createIdentifierValue(CSSValueNone);
+ }
+
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ 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();
+ }
+
+ ASSERT(list->length());
+ return list.release();
+}
+
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.
« no previous file with comments | « Source/core/css/parser/CSSPropertyParser.h ('k') | Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698