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

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

Issue 1137483003: Implement direction-specific touch-action values (blink side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix minor nit from patch set 1 Created 5 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
« no previous file with comments | « Source/core/css/ComputedStyleCSSValueMapping.cpp ('k') | Source/core/style/ComputedStyleConstants.h » ('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 2a75bc4104411f8f2a1f5c336bd56bf570699492..d7af1ae8fb1a4a2b82fa484d8bf875a34d2a609a 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -7307,13 +7307,32 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTouchAction()
return list.release();
}
+ bool xSet = false;
+ bool ySet = false;
while (value) {
switch (value->id) {
case CSSValuePanX:
- case CSSValuePanY: {
+ case CSSValuePanRight:
+ case CSSValuePanLeft: {
+ if (xSet)
+ return nullptr;
+ xSet = true;
+ if (value->id != CSSValuePanX && !RuntimeEnabledFeatures::cssTouchActionPanDirectionsEnabled())
+ return nullptr;
+
RefPtrWillBeRawPtr<CSSValue> panValue = cssValuePool().createIdentifierValue(value->id);
- if (list->hasValue(panValue.get()))
+ list->append(panValue.release());
+ break;
+ }
+ case CSSValuePanY:
+ case CSSValuePanDown:
+ case CSSValuePanUp: {
+ if (ySet)
return nullptr;
+ ySet = true;
+ if (value->id != CSSValuePanY && !RuntimeEnabledFeatures::cssTouchActionPanDirectionsEnabled())
+ return nullptr;
+ RefPtrWillBeRawPtr<CSSValue> panValue = cssValuePool().createIdentifierValue(value->id);
list->append(panValue.release());
break;
}
« no previous file with comments | « Source/core/css/ComputedStyleCSSValueMapping.cpp ('k') | Source/core/style/ComputedStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698