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

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

Issue 2911583002: Generate enum/getters/setters/mappings for text-security. (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 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 return kTextDecorationSkipInk; 1269 return kTextDecorationSkipInk;
1270 default: 1270 default:
1271 break; 1271 break;
1272 } 1272 }
1273 1273
1274 NOTREACHED(); 1274 NOTREACHED();
1275 return kTextDecorationSkipObjects; 1275 return kTextDecorationSkipObjects;
1276 } 1276 }
1277 1277
1278 template <> 1278 template <>
1279 inline CSSIdentifierValue::CSSIdentifierValue(ETextSecurity e)
1280 : CSSValue(kIdentifierClass) {
1281 switch (e) {
1282 case ETextSecurity::kNone:
1283 value_id_ = CSSValueNone;
1284 break;
1285 case ETextSecurity::kDisc:
1286 value_id_ = CSSValueDisc;
1287 break;
1288 case ETextSecurity::kCircle:
1289 value_id_ = CSSValueCircle;
1290 break;
1291 case ETextSecurity::kSquare:
1292 value_id_ = CSSValueSquare;
1293 break;
1294 }
1295 }
1296
1297 template <>
1298 inline ETextSecurity CSSIdentifierValue::ConvertTo() const {
1299 switch (value_id_) {
1300 case CSSValueNone:
1301 return ETextSecurity::kNone;
1302 case CSSValueDisc:
1303 return ETextSecurity::kDisc;
1304 case CSSValueCircle:
1305 return ETextSecurity::kCircle;
1306 case CSSValueSquare:
1307 return ETextSecurity::kSquare;
1308 default:
1309 break;
1310 }
1311
1312 NOTREACHED();
1313 return ETextSecurity::kNone;
1314 }
1315
1316 template <>
1317 inline CSSIdentifierValue::CSSIdentifierValue(EUserDrag e) 1279 inline CSSIdentifierValue::CSSIdentifierValue(EUserDrag e)
1318 : CSSValue(kIdentifierClass) { 1280 : CSSValue(kIdentifierClass) {
1319 switch (e) { 1281 switch (e) {
1320 case DRAG_AUTO: 1282 case DRAG_AUTO:
1321 value_id_ = CSSValueAuto; 1283 value_id_ = CSSValueAuto;
1322 break; 1284 break;
1323 case DRAG_NONE: 1285 case DRAG_NONE:
1324 value_id_ = CSSValueNone; 1286 value_id_ = CSSValueNone;
1325 break; 1287 break;
1326 case DRAG_ELEMENT: 1288 case DRAG_ELEMENT:
(...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after
3292 default: 3254 default:
3293 break; 3255 break;
3294 } 3256 }
3295 NOTREACHED(); 3257 NOTREACHED();
3296 return kContainsNone; 3258 return kContainsNone;
3297 } 3259 }
3298 3260
3299 } // namespace blink 3261 } // namespace blink
3300 3262
3301 #endif 3263 #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