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. (http://www.torchmo
bile.com/) | 4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
5 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> | 5 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 3214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3225 } | 3225 } |
3226 | 3226 |
3227 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontStyle italic) | 3227 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontStyle italic) |
3228 : CSSValue(PrimitiveClass) | 3228 : CSSValue(PrimitiveClass) |
3229 { | 3229 { |
3230 init(UnitType::ValueID); | 3230 init(UnitType::ValueID); |
3231 switch (italic) { | 3231 switch (italic) { |
3232 case FontStyleNormal: | 3232 case FontStyleNormal: |
3233 m_value.valueID = CSSValueNormal; | 3233 m_value.valueID = CSSValueNormal; |
3234 return; | 3234 return; |
| 3235 case FontStyleOblique: |
| 3236 m_value.valueID = CSSValueOblique; |
| 3237 return; |
3235 case FontStyleItalic: | 3238 case FontStyleItalic: |
3236 m_value.valueID = CSSValueItalic; | 3239 m_value.valueID = CSSValueItalic; |
3237 return; | 3240 return; |
3238 } | 3241 } |
3239 | 3242 |
3240 ASSERT_NOT_REACHED(); | 3243 ASSERT_NOT_REACHED(); |
3241 m_value.valueID = CSSValueNormal; | 3244 m_value.valueID = CSSValueNormal; |
3242 } | 3245 } |
3243 | 3246 |
3244 template<> inline CSSPrimitiveValue::operator FontStyle() const | 3247 template<> inline CSSPrimitiveValue::operator FontStyle() const |
3245 { | 3248 { |
3246 ASSERT(isValueID()); | 3249 ASSERT(isValueID()); |
3247 switch (m_value.valueID) { | 3250 switch (m_value.valueID) { |
3248 case CSSValueOblique: | 3251 case CSSValueOblique: |
3249 // FIXME: oblique is the same as italic for the moment... | 3252 return FontStyleOblique; |
3250 case CSSValueItalic: | 3253 case CSSValueItalic: |
3251 return FontStyleItalic; | 3254 return FontStyleItalic; |
3252 case CSSValueNormal: | 3255 case CSSValueNormal: |
3253 return FontStyleNormal; | 3256 return FontStyleNormal; |
3254 default: | 3257 default: |
3255 break; | 3258 break; |
3256 } | 3259 } |
3257 ASSERT_NOT_REACHED(); | 3260 ASSERT_NOT_REACHED(); |
3258 return FontStyleNormal; | 3261 return FontStyleNormal; |
3259 } | 3262 } |
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4658 default: | 4661 default: |
4659 break; | 4662 break; |
4660 } | 4663 } |
4661 ASSERT_NOT_REACHED(); | 4664 ASSERT_NOT_REACHED(); |
4662 return ScrollSnapTypeNone; | 4665 return ScrollSnapTypeNone; |
4663 } | 4666 } |
4664 | 4667 |
4665 } // namespace blink | 4668 } // namespace blink |
4666 | 4669 |
4667 #endif | 4670 #endif |
OLD | NEW |