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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h

Issue 2882113002: Make ESpeak an enum class. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Alexey Proskuryakov <ap@nypop.com>. 2 * Copyright (C) 2007 Alexey Proskuryakov <ap@nypop.com>.
3 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
5 * (http://www.torchmobile.com/) 5 * (http://www.torchmobile.com/)
6 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> 6 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com>
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
(...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after
2210 } 2210 }
2211 2211
2212 NOTREACHED(); 2212 NOTREACHED();
2213 return kAutoTextRendering; 2213 return kAutoTextRendering;
2214 } 2214 }
2215 2215
2216 template <> 2216 template <>
2217 inline CSSIdentifierValue::CSSIdentifierValue(ESpeak e) 2217 inline CSSIdentifierValue::CSSIdentifierValue(ESpeak e)
2218 : CSSValue(kIdentifierClass) { 2218 : CSSValue(kIdentifierClass) {
2219 switch (e) { 2219 switch (e) {
2220 case kSpeakNone: 2220 case ESpeak::kNone:
2221 value_id_ = CSSValueNone; 2221 value_id_ = CSSValueNone;
2222 break; 2222 break;
2223 case kSpeakNormal: 2223 case ESpeak::kNormal:
2224 value_id_ = CSSValueNormal; 2224 value_id_ = CSSValueNormal;
2225 break; 2225 break;
2226 case kSpeakSpellOut: 2226 case ESpeak::kSpellOut:
2227 value_id_ = CSSValueSpellOut; 2227 value_id_ = CSSValueSpellOut;
2228 break; 2228 break;
2229 case kSpeakDigits: 2229 case ESpeak::kDigits:
2230 value_id_ = CSSValueDigits; 2230 value_id_ = CSSValueDigits;
2231 break; 2231 break;
2232 case kSpeakLiteralPunctuation: 2232 case ESpeak::kLiteralPunctuation:
2233 value_id_ = CSSValueLiteralPunctuation; 2233 value_id_ = CSSValueLiteralPunctuation;
2234 break; 2234 break;
2235 case kSpeakNoPunctuation: 2235 case ESpeak::kNoPunctuation:
2236 value_id_ = CSSValueNoPunctuation; 2236 value_id_ = CSSValueNoPunctuation;
2237 break; 2237 break;
2238 } 2238 }
2239 } 2239 }
2240 2240
2241 template <> 2241 template <>
2242 inline EOrder CSSIdentifierValue::ConvertTo() const { 2242 inline EOrder CSSIdentifierValue::ConvertTo() const {
2243 switch (value_id_) { 2243 switch (value_id_) {
2244 case CSSValueLogical: 2244 case CSSValueLogical:
2245 return EOrder::kLogical; 2245 return EOrder::kLogical;
(...skipping 17 matching lines...) Expand all
2263 case EOrder::kVisual: 2263 case EOrder::kVisual:
2264 value_id_ = CSSValueVisual; 2264 value_id_ = CSSValueVisual;
2265 break; 2265 break;
2266 } 2266 }
2267 } 2267 }
2268 2268
2269 template <> 2269 template <>
2270 inline ESpeak CSSIdentifierValue::ConvertTo() const { 2270 inline ESpeak CSSIdentifierValue::ConvertTo() const {
2271 switch (value_id_) { 2271 switch (value_id_) {
2272 case CSSValueNone: 2272 case CSSValueNone:
2273 return kSpeakNone; 2273 return ESpeak::kNone;
2274 case CSSValueNormal: 2274 case CSSValueNormal:
2275 return kSpeakNormal; 2275 return ESpeak::kNormal;
2276 case CSSValueSpellOut: 2276 case CSSValueSpellOut:
2277 return kSpeakSpellOut; 2277 return ESpeak::kSpellOut;
2278 case CSSValueDigits: 2278 case CSSValueDigits:
2279 return kSpeakDigits; 2279 return ESpeak::kDigits;
2280 case CSSValueLiteralPunctuation: 2280 case CSSValueLiteralPunctuation:
2281 return kSpeakLiteralPunctuation; 2281 return ESpeak::kLiteralPunctuation;
2282 case CSSValueNoPunctuation: 2282 case CSSValueNoPunctuation:
2283 return kSpeakNoPunctuation; 2283 return ESpeak::kNoPunctuation;
2284 default: 2284 default:
2285 break; 2285 break;
2286 } 2286 }
2287 2287
2288 NOTREACHED(); 2288 NOTREACHED();
2289 return kSpeakNormal; 2289 return ESpeak::kNormal;
2290 } 2290 }
2291 2291
2292 template <> 2292 template <>
2293 inline CSSIdentifierValue::CSSIdentifierValue(WebBlendMode blend_mode) 2293 inline CSSIdentifierValue::CSSIdentifierValue(WebBlendMode blend_mode)
2294 : CSSValue(kIdentifierClass) { 2294 : CSSValue(kIdentifierClass) {
2295 switch (blend_mode) { 2295 switch (blend_mode) {
2296 case kWebBlendModeNormal: 2296 case kWebBlendModeNormal:
2297 value_id_ = CSSValueNormal; 2297 value_id_ = CSSValueNormal;
2298 break; 2298 break;
2299 case kWebBlendModeMultiply: 2299 case kWebBlendModeMultiply:
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
3413 default: 3413 default:
3414 break; 3414 break;
3415 } 3415 }
3416 NOTREACHED(); 3416 NOTREACHED();
3417 return kContainsNone; 3417 return kContainsNone;
3418 } 3418 }
3419 3419
3420 } // namespace blink 3420 } // namespace blink
3421 3421
3422 #endif 3422 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698