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

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

Issue 2915683002: Generate enum/getters/setters/mappings for ruby-position. (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 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 return kTextCombineAll; 1380 return kTextCombineAll;
1381 default: 1381 default:
1382 break; 1382 break;
1383 } 1383 }
1384 1384
1385 NOTREACHED(); 1385 NOTREACHED();
1386 return kTextCombineNone; 1386 return kTextCombineNone;
1387 } 1387 }
1388 1388
1389 template <> 1389 template <>
1390 inline CSSIdentifierValue::CSSIdentifierValue(RubyPosition position)
1391 : CSSValue(kIdentifierClass) {
1392 switch (position) {
1393 case RubyPosition::kBefore:
1394 value_id_ = CSSValueBefore;
1395 break;
1396 case RubyPosition::kAfter:
1397 value_id_ = CSSValueAfter;
1398 break;
1399 }
1400 }
1401
1402 template <>
1403 inline RubyPosition CSSIdentifierValue::ConvertTo() const {
1404 switch (value_id_) {
1405 case CSSValueBefore:
1406 return RubyPosition::kBefore;
1407 case CSSValueAfter:
1408 return RubyPosition::kAfter;
1409 default:
1410 break;
1411 }
1412
1413 NOTREACHED();
1414 return RubyPosition::kBefore;
1415 }
1416
1417 template <>
1418 inline CSSIdentifierValue::CSSIdentifierValue(TextEmphasisPosition position) 1390 inline CSSIdentifierValue::CSSIdentifierValue(TextEmphasisPosition position)
1419 : CSSValue(kIdentifierClass) { 1391 : CSSValue(kIdentifierClass) {
1420 switch (position) { 1392 switch (position) {
1421 case TextEmphasisPosition::kOver: 1393 case TextEmphasisPosition::kOver:
1422 value_id_ = CSSValueOver; 1394 value_id_ = CSSValueOver;
1423 break; 1395 break;
1424 case TextEmphasisPosition::kUnder: 1396 case TextEmphasisPosition::kUnder:
1425 value_id_ = CSSValueUnder; 1397 value_id_ = CSSValueUnder;
1426 break; 1398 break;
1427 } 1399 }
(...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after
3080 default: 3052 default:
3081 break; 3053 break;
3082 } 3054 }
3083 NOTREACHED(); 3055 NOTREACHED();
3084 return kContainsNone; 3056 return kContainsNone;
3085 } 3057 }
3086 3058
3087 } // namespace blink 3059 } // namespace blink
3088 3060
3089 #endif 3061 #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