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 2283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2294 case CSSValueWebkitAuto: // Legacy -webkit-auto. Eqiuvalent to start. | 2294 case CSSValueWebkitAuto: // Legacy -webkit-auto. Eqiuvalent to start. |
2295 case CSSValueStart: | 2295 case CSSValueStart: |
2296 return TASTART; | 2296 return TASTART; |
2297 case CSSValueEnd: | 2297 case CSSValueEnd: |
2298 return TAEND; | 2298 return TAEND; |
2299 default: | 2299 default: |
2300 return static_cast<ETextAlign>(m_value.valueID - CSSValueLeft); | 2300 return static_cast<ETextAlign>(m_value.valueID - CSSValueLeft); |
2301 } | 2301 } |
2302 } | 2302 } |
2303 | 2303 |
2304 #if ENABLE(CSS3_TEXT) | |
2305 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextAlignLast e) | 2304 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextAlignLast e) |
2306 : CSSValue(PrimitiveClass) | 2305 : CSSValue(PrimitiveClass) |
2307 { | 2306 { |
2308 m_primitiveUnitType = CSS_VALUE_ID; | 2307 m_primitiveUnitType = CSS_VALUE_ID; |
2309 switch (e) { | 2308 switch (e) { |
2310 case TextAlignLastStart: | 2309 case TextAlignLastStart: |
2311 m_value.valueID = CSSValueStart; | 2310 m_value.valueID = CSSValueStart; |
2312 break; | 2311 break; |
2313 case TextAlignLastEnd: | 2312 case TextAlignLastEnd: |
2314 m_value.valueID = CSSValueEnd; | 2313 m_value.valueID = CSSValueEnd; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2348 return TextAlignLastCenter; | 2347 return TextAlignLastCenter; |
2349 case CSSValueJustify: | 2348 case CSSValueJustify: |
2350 return TextAlignLastJustify; | 2349 return TextAlignLastJustify; |
2351 default: | 2350 default: |
2352 break; | 2351 break; |
2353 } | 2352 } |
2354 | 2353 |
2355 ASSERT_NOT_REACHED(); | 2354 ASSERT_NOT_REACHED(); |
2356 return TextAlignLastAuto; | 2355 return TextAlignLastAuto; |
2357 } | 2356 } |
2358 #endif // CSS3_TEXT | |
2359 | 2357 |
2360 template<> inline CSSPrimitiveValue::operator TextDecoration() const | 2358 template<> inline CSSPrimitiveValue::operator TextDecoration() const |
2361 { | 2359 { |
2362 switch (m_value.valueID) { | 2360 switch (m_value.valueID) { |
2363 case CSSValueNone: | 2361 case CSSValueNone: |
2364 return TextDecorationNone; | 2362 return TextDecorationNone; |
2365 case CSSValueUnderline: | 2363 case CSSValueUnderline: |
2366 return TextDecorationUnderline; | 2364 return TextDecorationUnderline; |
2367 case CSSValueOverline: | 2365 case CSSValueOverline: |
2368 return TextDecorationOverline; | 2366 return TextDecorationOverline; |
(...skipping 2313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4682 break; | 4680 break; |
4683 } | 4681 } |
4684 | 4682 |
4685 ASSERT_NOT_REACHED(); | 4683 ASSERT_NOT_REACHED(); |
4686 return TouchActionNone; | 4684 return TouchActionNone; |
4687 } | 4685 } |
4688 | 4686 |
4689 } | 4687 } |
4690 | 4688 |
4691 #endif | 4689 #endif |
OLD | NEW |