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

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

Issue 2882093002: Make EUserSelect an enum class. (Closed)
Patch Set: Rebase 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/dom/Node.cpp » ('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 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 } 1415 }
1416 1416
1417 NOTREACHED(); 1417 NOTREACHED();
1418 return EUserModify::kReadOnly; 1418 return EUserModify::kReadOnly;
1419 } 1419 }
1420 1420
1421 template <> 1421 template <>
1422 inline CSSIdentifierValue::CSSIdentifierValue(EUserSelect e) 1422 inline CSSIdentifierValue::CSSIdentifierValue(EUserSelect e)
1423 : CSSValue(kIdentifierClass) { 1423 : CSSValue(kIdentifierClass) {
1424 switch (e) { 1424 switch (e) {
1425 case SELECT_NONE: 1425 case EUserSelect::kNone:
1426 value_id_ = CSSValueNone; 1426 value_id_ = CSSValueNone;
1427 break; 1427 break;
1428 case SELECT_TEXT: 1428 case EUserSelect::kText:
1429 value_id_ = CSSValueText; 1429 value_id_ = CSSValueText;
1430 break; 1430 break;
1431 case SELECT_ALL: 1431 case EUserSelect::kAll:
1432 value_id_ = CSSValueAll; 1432 value_id_ = CSSValueAll;
1433 break; 1433 break;
1434 } 1434 }
1435 } 1435 }
1436 1436
1437 template <> 1437 template <>
1438 inline EUserSelect CSSIdentifierValue::ConvertTo() const { 1438 inline EUserSelect CSSIdentifierValue::ConvertTo() const {
1439 switch (value_id_) { 1439 switch (value_id_) {
1440 case CSSValueAuto: 1440 case CSSValueAuto:
1441 return SELECT_TEXT; 1441 return EUserSelect::kText;
1442 case CSSValueNone: 1442 case CSSValueNone:
1443 return SELECT_NONE; 1443 return EUserSelect::kNone;
1444 case CSSValueText: 1444 case CSSValueText:
1445 return SELECT_TEXT; 1445 return EUserSelect::kText;
1446 case CSSValueAll: 1446 case CSSValueAll:
1447 return SELECT_ALL; 1447 return EUserSelect::kAll;
1448 default: 1448 default:
1449 break; 1449 break;
1450 } 1450 }
1451 1451
1452 NOTREACHED(); 1452 NOTREACHED();
1453 return SELECT_TEXT; 1453 return EUserSelect::kText;
1454 } 1454 }
1455 1455
1456 template <> 1456 template <>
1457 inline CSSIdentifierValue::CSSIdentifierValue(EVerticalAlign a) 1457 inline CSSIdentifierValue::CSSIdentifierValue(EVerticalAlign a)
1458 : CSSValue(kIdentifierClass) { 1458 : CSSValue(kIdentifierClass) {
1459 switch (a) { 1459 switch (a) {
1460 case EVerticalAlign::kTop: 1460 case EVerticalAlign::kTop:
1461 value_id_ = CSSValueTop; 1461 value_id_ = CSSValueTop;
1462 break; 1462 break;
1463 case EVerticalAlign::kBottom: 1463 case EVerticalAlign::kBottom:
(...skipping 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after
3357 default: 3357 default:
3358 break; 3358 break;
3359 } 3359 }
3360 NOTREACHED(); 3360 NOTREACHED();
3361 return kContainsNone; 3361 return kContainsNone;
3362 } 3362 }
3363 3363
3364 } // namespace blink 3364 } // namespace blink
3365 3365
3366 #endif 3366 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698