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

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

Issue 2878333002: Make ETextModify 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/css/resolver/StyleAdjuster.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 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1438 } 1438 }
1439 1439
1440 NOTREACHED(); 1440 NOTREACHED();
1441 return DRAG_AUTO; 1441 return DRAG_AUTO;
1442 } 1442 }
1443 1443
1444 template <> 1444 template <>
1445 inline CSSIdentifierValue::CSSIdentifierValue(EUserModify e) 1445 inline CSSIdentifierValue::CSSIdentifierValue(EUserModify e)
1446 : CSSValue(kIdentifierClass) { 1446 : CSSValue(kIdentifierClass) {
1447 switch (e) { 1447 switch (e) {
1448 case READ_ONLY: 1448 case EUserModify::kReadOnly:
1449 value_id_ = CSSValueReadOnly; 1449 value_id_ = CSSValueReadOnly;
1450 break; 1450 break;
1451 case READ_WRITE: 1451 case EUserModify::kReadWrite:
1452 value_id_ = CSSValueReadWrite; 1452 value_id_ = CSSValueReadWrite;
1453 break; 1453 break;
1454 case READ_WRITE_PLAINTEXT_ONLY: 1454 case EUserModify::kReadWritePlaintextOnly:
1455 value_id_ = CSSValueReadWritePlaintextOnly; 1455 value_id_ = CSSValueReadWritePlaintextOnly;
1456 break; 1456 break;
1457 } 1457 }
1458 } 1458 }
1459 1459
1460 template <> 1460 template <>
1461 inline EUserModify CSSIdentifierValue::ConvertTo() const { 1461 inline EUserModify CSSIdentifierValue::ConvertTo() const {
1462 switch (value_id_) { 1462 switch (value_id_) {
1463 case CSSValueReadOnly: 1463 case CSSValueReadOnly:
1464 return READ_ONLY; 1464 return EUserModify::kReadOnly;
1465 case CSSValueReadWrite: 1465 case CSSValueReadWrite:
1466 return READ_WRITE; 1466 return EUserModify::kReadWrite;
1467 case CSSValueReadWritePlaintextOnly: 1467 case CSSValueReadWritePlaintextOnly:
1468 return READ_WRITE_PLAINTEXT_ONLY; 1468 return EUserModify::kReadWritePlaintextOnly;
1469 default: 1469 default:
1470 break; 1470 break;
1471 } 1471 }
1472 1472
1473 NOTREACHED(); 1473 NOTREACHED();
1474 return READ_ONLY; 1474 return EUserModify::kReadOnly;
1475 } 1475 }
1476 1476
1477 template <> 1477 template <>
1478 inline CSSIdentifierValue::CSSIdentifierValue(EUserSelect e) 1478 inline CSSIdentifierValue::CSSIdentifierValue(EUserSelect e)
1479 : CSSValue(kIdentifierClass) { 1479 : CSSValue(kIdentifierClass) {
1480 switch (e) { 1480 switch (e) {
1481 case SELECT_NONE: 1481 case SELECT_NONE:
1482 value_id_ = CSSValueNone; 1482 value_id_ = CSSValueNone;
1483 break; 1483 break;
1484 case SELECT_TEXT: 1484 case SELECT_TEXT:
(...skipping 1928 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/css/resolver/StyleAdjuster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698