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

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

Issue 2845773002: Make TextDecoration an enum class. (Closed)
Patch Set: Address comments 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
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 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 } 1275 }
1276 1276
1277 NOTREACHED(); 1277 NOTREACHED();
1278 return kTextJustifyAuto; 1278 return kTextJustifyAuto;
1279 } 1279 }
1280 1280
1281 template <> 1281 template <>
1282 inline TextDecoration CSSIdentifierValue::ConvertTo() const { 1282 inline TextDecoration CSSIdentifierValue::ConvertTo() const {
1283 switch (value_id_) { 1283 switch (value_id_) {
1284 case CSSValueNone: 1284 case CSSValueNone:
1285 return kTextDecorationNone; 1285 return TextDecoration::kNone;
1286 case CSSValueUnderline: 1286 case CSSValueUnderline:
1287 return kTextDecorationUnderline; 1287 return TextDecoration::kUnderline;
1288 case CSSValueOverline: 1288 case CSSValueOverline:
1289 return kTextDecorationOverline; 1289 return TextDecoration::kOverline;
1290 case CSSValueLineThrough: 1290 case CSSValueLineThrough:
1291 return kTextDecorationLineThrough; 1291 return TextDecoration::kLineThrough;
1292 case CSSValueBlink: 1292 case CSSValueBlink:
1293 return kTextDecorationBlink; 1293 return TextDecoration::kBlink;
1294 default: 1294 default:
1295 break; 1295 break;
1296 } 1296 }
1297 1297
1298 NOTREACHED(); 1298 NOTREACHED();
1299 return kTextDecorationNone; 1299 return TextDecoration::kNone;
1300 } 1300 }
1301 1301
1302 template <> 1302 template <>
1303 inline TextDecorationStyle CSSIdentifierValue::ConvertTo() const { 1303 inline TextDecorationStyle CSSIdentifierValue::ConvertTo() const {
1304 switch (value_id_) { 1304 switch (value_id_) {
1305 case CSSValueSolid: 1305 case CSSValueSolid:
1306 return kTextDecorationStyleSolid; 1306 return kTextDecorationStyleSolid;
1307 case CSSValueDouble: 1307 case CSSValueDouble:
1308 return kTextDecorationStyleDouble; 1308 return kTextDecorationStyleDouble;
1309 case CSSValueDotted: 1309 case CSSValueDotted:
(...skipping 2102 matching lines...) Expand 10 before | Expand all | Expand 10 after
3412 default: 3412 default:
3413 break; 3413 break;
3414 } 3414 }
3415 NOTREACHED(); 3415 NOTREACHED();
3416 return kContainsNone; 3416 return kContainsNone;
3417 } 3417 }
3418 3418
3419 } // namespace blink 3419 } // namespace blink
3420 3420
3421 #endif 3421 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698