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 3215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3226 } | 3226 } |
3227 | 3227 |
3228 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontStyle italic) | 3228 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontStyle italic) |
3229 : CSSValue(PrimitiveClass) | 3229 : CSSValue(PrimitiveClass) |
3230 { | 3230 { |
3231 init(UnitType::ValueID); | 3231 init(UnitType::ValueID); |
3232 switch (italic) { | 3232 switch (italic) { |
3233 case FontStyleNormal: | 3233 case FontStyleNormal: |
3234 m_value.valueID = CSSValueNormal; | 3234 m_value.valueID = CSSValueNormal; |
3235 return; | 3235 return; |
| 3236 case FontStyleOblique: |
| 3237 m_value.valueID = CSSValueOblique; |
| 3238 return; |
3236 case FontStyleItalic: | 3239 case FontStyleItalic: |
3237 m_value.valueID = CSSValueItalic; | 3240 m_value.valueID = CSSValueItalic; |
3238 return; | 3241 return; |
3239 } | 3242 } |
3240 | 3243 |
3241 ASSERT_NOT_REACHED(); | 3244 ASSERT_NOT_REACHED(); |
3242 m_value.valueID = CSSValueNormal; | 3245 m_value.valueID = CSSValueNormal; |
3243 } | 3246 } |
3244 | 3247 |
3245 template<> inline CSSPrimitiveValue::operator FontStyle() const | 3248 template<> inline CSSPrimitiveValue::operator FontStyle() const |
3246 { | 3249 { |
3247 ASSERT(isValueID()); | 3250 ASSERT(isValueID()); |
3248 switch (m_value.valueID) { | 3251 switch (m_value.valueID) { |
3249 case CSSValueOblique: | 3252 case CSSValueOblique: |
3250 // FIXME: oblique is the same as italic for the moment... | 3253 return FontStyleOblique; |
3251 case CSSValueItalic: | 3254 case CSSValueItalic: |
3252 return FontStyleItalic; | 3255 return FontStyleItalic; |
3253 case CSSValueNormal: | 3256 case CSSValueNormal: |
3254 return FontStyleNormal; | 3257 return FontStyleNormal; |
3255 default: | 3258 default: |
3256 break; | 3259 break; |
3257 } | 3260 } |
3258 ASSERT_NOT_REACHED(); | 3261 ASSERT_NOT_REACHED(); |
3259 return FontStyleNormal; | 3262 return FontStyleNormal; |
3260 } | 3263 } |
(...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4678 default: | 4681 default: |
4679 break; | 4682 break; |
4680 } | 4683 } |
4681 ASSERT_NOT_REACHED(); | 4684 ASSERT_NOT_REACHED(); |
4682 return ScrollSnapTypeNone; | 4685 return ScrollSnapTypeNone; |
4683 } | 4686 } |
4684 | 4687 |
4685 } // namespace blink | 4688 } // namespace blink |
4686 | 4689 |
4687 #endif | 4690 #endif |
OLD | NEW |