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

Unified Diff: third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h

Issue 2880573002: Store border-*-style on SurroundData in ComputedStyle (Closed)
Patch Set: Merge branch 'enumClass' into borderStyle Created 3 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 | « no previous file | third_party/WebKit/Source/core/css/CSSProperties.json5 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d1a33bc3e91ef4a9d9fb2e60429502283145bf06..8bfa8ece61880e22430d5976c12590d5b779d0f7 100644
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
@@ -194,47 +194,10 @@ inline ColumnSpan CSSIdentifierValue::ConvertTo() const {
}
template <>
-inline CSSIdentifierValue::CSSIdentifierValue(EBorderStyle e)
- : CSSValue(kIdentifierClass) {
- switch (e) {
- case EBorderStyle::kNone:
- value_id_ = CSSValueNone;
- break;
- case EBorderStyle::kHidden:
- value_id_ = CSSValueHidden;
- break;
- case EBorderStyle::kInset:
- value_id_ = CSSValueInset;
- break;
- case EBorderStyle::kGroove:
- value_id_ = CSSValueGroove;
- break;
- case EBorderStyle::kRidge:
- value_id_ = CSSValueRidge;
- break;
- case EBorderStyle::kOutset:
- value_id_ = CSSValueOutset;
- break;
- case EBorderStyle::kDotted:
- value_id_ = CSSValueDotted;
- break;
- case EBorderStyle::kDashed:
- value_id_ = CSSValueDashed;
- break;
- case EBorderStyle::kSolid:
- value_id_ = CSSValueSolid;
- break;
- case EBorderStyle::kDouble:
- value_id_ = CSSValueDouble;
- break;
- }
-}
-
-template <>
inline EBorderStyle CSSIdentifierValue::ConvertTo() const {
if (value_id_ == CSSValueAuto) // Valid for CSS outline-style
return EBorderStyle::kDotted;
- return (EBorderStyle)(value_id_ - CSSValueNone);
+ return detail::cssValueIDToPlatformEnumGenerated<EBorderStyle>(value_id_);
}
template <>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSProperties.json5 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698