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

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

Issue 2868783005: Make ETextSecurity 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/editing/EditingUtilities.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 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 } 1365 }
1366 1366
1367 NOTREACHED(); 1367 NOTREACHED();
1368 return kTextDecorationSkipObjects; 1368 return kTextDecorationSkipObjects;
1369 } 1369 }
1370 1370
1371 template <> 1371 template <>
1372 inline CSSIdentifierValue::CSSIdentifierValue(ETextSecurity e) 1372 inline CSSIdentifierValue::CSSIdentifierValue(ETextSecurity e)
1373 : CSSValue(kIdentifierClass) { 1373 : CSSValue(kIdentifierClass) {
1374 switch (e) { 1374 switch (e) {
1375 case TSNONE: 1375 case ETextSecurity::kNone:
1376 value_id_ = CSSValueNone; 1376 value_id_ = CSSValueNone;
1377 break; 1377 break;
1378 case TSDISC: 1378 case ETextSecurity::kDisc:
1379 value_id_ = CSSValueDisc; 1379 value_id_ = CSSValueDisc;
1380 break; 1380 break;
1381 case TSCIRCLE: 1381 case ETextSecurity::kCircle:
1382 value_id_ = CSSValueCircle; 1382 value_id_ = CSSValueCircle;
1383 break; 1383 break;
1384 case TSSQUARE: 1384 case ETextSecurity::kSquare:
1385 value_id_ = CSSValueSquare; 1385 value_id_ = CSSValueSquare;
1386 break; 1386 break;
1387 } 1387 }
1388 } 1388 }
1389 1389
1390 template <> 1390 template <>
1391 inline ETextSecurity CSSIdentifierValue::ConvertTo() const { 1391 inline ETextSecurity CSSIdentifierValue::ConvertTo() const {
1392 switch (value_id_) { 1392 switch (value_id_) {
1393 case CSSValueNone: 1393 case CSSValueNone:
1394 return TSNONE; 1394 return ETextSecurity::kNone;
1395 case CSSValueDisc: 1395 case CSSValueDisc:
1396 return TSDISC; 1396 return ETextSecurity::kDisc;
1397 case CSSValueCircle: 1397 case CSSValueCircle:
1398 return TSCIRCLE; 1398 return ETextSecurity::kCircle;
1399 case CSSValueSquare: 1399 case CSSValueSquare:
1400 return TSSQUARE; 1400 return ETextSecurity::kSquare;
1401 default: 1401 default:
1402 break; 1402 break;
1403 } 1403 }
1404 1404
1405 NOTREACHED(); 1405 NOTREACHED();
1406 return TSNONE; 1406 return ETextSecurity::kNone;
1407 } 1407 }
1408 1408
1409 template <> 1409 template <>
1410 inline CSSIdentifierValue::CSSIdentifierValue(EUserDrag e) 1410 inline CSSIdentifierValue::CSSIdentifierValue(EUserDrag e)
1411 : CSSValue(kIdentifierClass) { 1411 : CSSValue(kIdentifierClass) {
1412 switch (e) { 1412 switch (e) {
1413 case DRAG_AUTO: 1413 case DRAG_AUTO:
1414 value_id_ = CSSValueAuto; 1414 value_id_ = CSSValueAuto;
1415 break; 1415 break;
1416 case DRAG_NONE: 1416 case DRAG_NONE:
(...skipping 1996 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/editing/EditingUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698