OLD | NEW |
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 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1139 } | 1139 } |
1140 | 1140 |
1141 NOTREACHED(); | 1141 NOTREACHED(); |
1142 return kTextDecorationStyleSolid; | 1142 return kTextDecorationStyleSolid; |
1143 } | 1143 } |
1144 | 1144 |
1145 template <> | 1145 template <> |
1146 inline CSSIdentifierValue::CSSIdentifierValue(TextUnderlinePosition e) | 1146 inline CSSIdentifierValue::CSSIdentifierValue(TextUnderlinePosition e) |
1147 : CSSValue(kIdentifierClass) { | 1147 : CSSValue(kIdentifierClass) { |
1148 switch (e) { | 1148 switch (e) { |
1149 case kTextUnderlinePositionAuto: | 1149 case TextUnderlinePosition::kAuto: |
1150 value_id_ = CSSValueAuto; | 1150 value_id_ = CSSValueAuto; |
1151 break; | 1151 break; |
1152 case kTextUnderlinePositionUnder: | 1152 case TextUnderlinePosition::kUnder: |
1153 value_id_ = CSSValueUnder; | 1153 value_id_ = CSSValueUnder; |
1154 break; | 1154 break; |
1155 } | 1155 } |
1156 | 1156 |
1157 // FIXME: Implement support for 'under left' and 'under right' values. | 1157 // FIXME: Implement support for 'under left' and 'under right' values. |
1158 } | 1158 } |
1159 | 1159 |
1160 template <> | 1160 template <> |
1161 inline TextUnderlinePosition CSSIdentifierValue::ConvertTo() const { | 1161 inline TextUnderlinePosition CSSIdentifierValue::ConvertTo() const { |
1162 switch (value_id_) { | 1162 switch (value_id_) { |
1163 case CSSValueAuto: | 1163 case CSSValueAuto: |
1164 return kTextUnderlinePositionAuto; | 1164 return TextUnderlinePosition::kAuto; |
1165 case CSSValueUnder: | 1165 case CSSValueUnder: |
1166 return kTextUnderlinePositionUnder; | 1166 return TextUnderlinePosition::kUnder; |
1167 default: | 1167 default: |
1168 break; | 1168 break; |
1169 } | 1169 } |
1170 | 1170 |
1171 // FIXME: Implement support for 'under left' and 'under right' values. | 1171 // FIXME: Implement support for 'under left' and 'under right' values. |
1172 | 1172 |
1173 NOTREACHED(); | 1173 NOTREACHED(); |
1174 return kTextUnderlinePositionAuto; | 1174 return TextUnderlinePosition::kAuto; |
1175 } | 1175 } |
1176 | 1176 |
1177 template <> | 1177 template <> |
1178 inline TextDecorationSkip CSSIdentifierValue::ConvertTo() const { | 1178 inline TextDecorationSkip CSSIdentifierValue::ConvertTo() const { |
1179 switch (value_id_) { | 1179 switch (value_id_) { |
1180 case CSSValueObjects: | 1180 case CSSValueObjects: |
1181 return TextDecorationSkip::kObjects; | 1181 return TextDecorationSkip::kObjects; |
1182 case CSSValueInk: | 1182 case CSSValueInk: |
1183 return TextDecorationSkip::kInk; | 1183 return TextDecorationSkip::kInk; |
1184 default: | 1184 default: |
(...skipping 1895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3080 default: | 3080 default: |
3081 break; | 3081 break; |
3082 } | 3082 } |
3083 NOTREACHED(); | 3083 NOTREACHED(); |
3084 return kContainsNone; | 3084 return kContainsNone; |
3085 } | 3085 } |
3086 | 3086 |
3087 } // namespace blink | 3087 } // namespace blink |
3088 | 3088 |
3089 #endif | 3089 #endif |
OLD | NEW |