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; |
} |