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

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

Issue 2914753002: Make TextCombine an enum class. (Closed)
Patch Set: Created 3 years, 6 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/css/CSSProperties.json5 » ('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 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 } 1354 }
1355 1355
1356 NOTREACHED(); 1356 NOTREACHED();
1357 return EVerticalAlign::kTop; 1357 return EVerticalAlign::kTop;
1358 } 1358 }
1359 1359
1360 template <> 1360 template <>
1361 inline CSSIdentifierValue::CSSIdentifierValue(TextCombine e) 1361 inline CSSIdentifierValue::CSSIdentifierValue(TextCombine e)
1362 : CSSValue(kIdentifierClass) { 1362 : CSSValue(kIdentifierClass) {
1363 switch (e) { 1363 switch (e) {
1364 case kTextCombineNone: 1364 case TextCombine::kNone:
1365 value_id_ = CSSValueNone; 1365 value_id_ = CSSValueNone;
1366 break; 1366 break;
1367 case kTextCombineAll: 1367 case TextCombine::kAll:
1368 value_id_ = CSSValueAll; 1368 value_id_ = CSSValueAll;
1369 break; 1369 break;
1370 } 1370 }
1371 } 1371 }
1372 1372
1373 template <> 1373 template <>
1374 inline TextCombine CSSIdentifierValue::ConvertTo() const { 1374 inline TextCombine CSSIdentifierValue::ConvertTo() const {
1375 switch (value_id_) { 1375 switch (value_id_) {
1376 case CSSValueNone: 1376 case CSSValueNone:
1377 return kTextCombineNone; 1377 return TextCombine::kNone;
1378 case CSSValueAll: 1378 case CSSValueAll:
1379 case CSSValueHorizontal: // -webkit-text-combine 1379 case CSSValueHorizontal: // -webkit-text-combine
1380 return kTextCombineAll; 1380 return TextCombine::kAll;
1381 default: 1381 default:
1382 break; 1382 break;
1383 } 1383 }
1384 1384
1385 NOTREACHED(); 1385 NOTREACHED();
1386 return kTextCombineNone; 1386 return TextCombine::kNone;
1387 } 1387 }
1388 1388
1389 template <> 1389 template <>
1390 inline CSSIdentifierValue::CSSIdentifierValue(RubyPosition position) 1390 inline CSSIdentifierValue::CSSIdentifierValue(RubyPosition position)
1391 : CSSValue(kIdentifierClass) { 1391 : CSSValue(kIdentifierClass) {
1392 switch (position) { 1392 switch (position) {
1393 case RubyPosition::kBefore: 1393 case RubyPosition::kBefore:
1394 value_id_ = CSSValueBefore; 1394 value_id_ = CSSValueBefore;
1395 break; 1395 break;
1396 case RubyPosition::kAfter: 1396 case RubyPosition::kAfter:
(...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after
3080 default: 3080 default:
3081 break; 3081 break;
3082 } 3082 }
3083 NOTREACHED(); 3083 NOTREACHED();
3084 return kContainsNone; 3084 return kContainsNone;
3085 } 3085 }
3086 3086
3087 } // namespace blink 3087 } // namespace blink
3088 3088
3089 #endif 3089 #endif
OLDNEW
« 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