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

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

Issue 2915543002: Generate enum/getters/setters/mappings for text-align-last. (Closed)
Patch Set: Rebase 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 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 return ETableLayout::kAuto; 1056 return ETableLayout::kAuto;
1057 default: 1057 default:
1058 break; 1058 break;
1059 } 1059 }
1060 1060
1061 NOTREACHED(); 1061 NOTREACHED();
1062 return ETableLayout::kAuto; 1062 return ETableLayout::kAuto;
1063 } 1063 }
1064 1064
1065 template <> 1065 template <>
1066 inline CSSIdentifierValue::CSSIdentifierValue(TextAlignLast e)
1067 : CSSValue(kIdentifierClass) {
1068 switch (e) {
1069 case TextAlignLast::kStart:
1070 value_id_ = CSSValueStart;
1071 break;
1072 case TextAlignLast::kEnd:
1073 value_id_ = CSSValueEnd;
1074 break;
1075 case TextAlignLast::kLeft:
1076 value_id_ = CSSValueLeft;
1077 break;
1078 case TextAlignLast::kRight:
1079 value_id_ = CSSValueRight;
1080 break;
1081 case TextAlignLast::kCenter:
1082 value_id_ = CSSValueCenter;
1083 break;
1084 case TextAlignLast::kJustify:
1085 value_id_ = CSSValueJustify;
1086 break;
1087 case TextAlignLast::kAuto:
1088 value_id_ = CSSValueAuto;
1089 break;
1090 }
1091 }
1092
1093 template <>
1094 inline TextAlignLast CSSIdentifierValue::ConvertTo() const {
1095 switch (value_id_) {
1096 case CSSValueAuto:
1097 return TextAlignLast::kAuto;
1098 case CSSValueStart:
1099 return TextAlignLast::kStart;
1100 case CSSValueEnd:
1101 return TextAlignLast::kEnd;
1102 case CSSValueLeft:
1103 return TextAlignLast::kLeft;
1104 case CSSValueRight:
1105 return TextAlignLast::kRight;
1106 case CSSValueCenter:
1107 return TextAlignLast::kCenter;
1108 case CSSValueJustify:
1109 return TextAlignLast::kJustify;
1110 default:
1111 break;
1112 }
1113
1114 NOTREACHED();
1115 return TextAlignLast::kAuto;
1116 }
1117
1118 template <>
1119 inline CSSIdentifierValue::CSSIdentifierValue(TextJustify e) 1066 inline CSSIdentifierValue::CSSIdentifierValue(TextJustify e)
1120 : CSSValue(kIdentifierClass) { 1067 : CSSValue(kIdentifierClass) {
1121 switch (e) { 1068 switch (e) {
1122 case kTextJustifyAuto: 1069 case kTextJustifyAuto:
1123 value_id_ = CSSValueAuto; 1070 value_id_ = CSSValueAuto;
1124 break; 1071 break;
1125 case kTextJustifyNone: 1072 case kTextJustifyNone:
1126 value_id_ = CSSValueNone; 1073 value_id_ = CSSValueNone;
1127 break; 1074 break;
1128 case kTextJustifyInterWord: 1075 case kTextJustifyInterWord:
(...skipping 2004 matching lines...) Expand 10 before | Expand all | Expand 10 after
3133 default: 3080 default:
3134 break; 3081 break;
3135 } 3082 }
3136 NOTREACHED(); 3083 NOTREACHED();
3137 return kContainsNone; 3084 return kContainsNone;
3138 } 3085 }
3139 3086
3140 } // namespace blink 3087 } // namespace blink
3141 3088
3142 #endif 3089 #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