Index: third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h |
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h |
index 35b69468ba6d2f5076aeac1fb39f6e41de379a5b..50f96796534925e9b2274aa1e5495d7dfc79552c 100644 |
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h |
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h |
@@ -2684,6 +2684,39 @@ inline ScrollBehavior CSSIdentifierValue::ConvertTo() const { |
return kScrollBehaviorAuto; |
} |
+template <> |
+inline CSSIdentifierValue::CSSIdentifierValue( |
+ EScrollBoundaryBehavior boundary_behavior) |
+ : CSSValue(kIdentifierClass) { |
+ switch (boundary_behavior) { |
+ case EScrollBoundaryBehavior::kAuto: |
+ value_id_ = CSSValueAuto; |
+ break; |
+ case EScrollBoundaryBehavior::kContain: |
+ value_id_ = CSSValueContain; |
+ break; |
+ case EScrollBoundaryBehavior::kNone: |
+ value_id_ = CSSValueNone; |
+ break; |
+ } |
+} |
+ |
+template <> |
+inline EScrollBoundaryBehavior CSSIdentifierValue::ConvertTo() const { |
+ switch (GetValueID()) { |
+ case CSSValueAuto: |
+ return EScrollBoundaryBehavior::kAuto; |
+ case CSSValueContain: |
+ return EScrollBoundaryBehavior::kContain; |
+ case CSSValueNone: |
+ return EScrollBoundaryBehavior::kNone; |
+ default: |
+ break; |
+ } |
+ NOTREACHED(); |
+ return EScrollBoundaryBehavior::kAuto; |
+} |
+ |
template <> |
inline CSSIdentifierValue::CSSIdentifierValue(ScrollSnapType snap_type) |
: CSSValue(kIdentifierClass) { |