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 2361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2372 return TextAlignLastCenter; | 2372 return TextAlignLastCenter; |
2373 case CSSValueJustify: | 2373 case CSSValueJustify: |
2374 return TextAlignLastJustify; | 2374 return TextAlignLastJustify; |
2375 default: | 2375 default: |
2376 break; | 2376 break; |
2377 } | 2377 } |
2378 | 2378 |
2379 ASSERT_NOT_REACHED(); | 2379 ASSERT_NOT_REACHED(); |
2380 return TextAlignLastAuto; | 2380 return TextAlignLastAuto; |
2381 } | 2381 } |
| 2382 |
| 2383 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextJustify e) |
| 2384 : CSSValue(PrimitiveClass) |
| 2385 { |
| 2386 m_primitiveUnitType = CSS_VALUE_ID; |
| 2387 switch (e) { |
| 2388 case TextJustifyAuto: |
| 2389 m_value.valueID = CSSValueAuto; |
| 2390 break; |
| 2391 case TextJustifyNone: |
| 2392 m_value.valueID = CSSValueNone; |
| 2393 break; |
| 2394 case TextJustifyInterWord: |
| 2395 m_value.valueID = CSSValueInterWord; |
| 2396 break; |
| 2397 case TextJustifyDistribute: |
| 2398 m_value.valueID = CSSValueDistribute; |
| 2399 break; |
| 2400 } |
| 2401 } |
| 2402 |
| 2403 template<> inline CSSPrimitiveValue::operator TextJustify() const |
| 2404 { |
| 2405 switch (m_value.valueID) { |
| 2406 case CSSValueAuto: |
| 2407 return TextJustifyAuto; |
| 2408 case CSSValueNone: |
| 2409 return TextJustifyNone; |
| 2410 case CSSValueInterWord: |
| 2411 return TextJustifyInterWord; |
| 2412 case CSSValueDistribute: |
| 2413 return TextJustifyDistribute; |
| 2414 default: |
| 2415 break; |
| 2416 } |
| 2417 |
| 2418 ASSERT_NOT_REACHED(); |
| 2419 return TextJustifyAuto; |
| 2420 } |
2382 #endif // CSS3_TEXT | 2421 #endif // CSS3_TEXT |
2383 | 2422 |
2384 template<> inline CSSPrimitiveValue::operator TextDecoration() const | 2423 template<> inline CSSPrimitiveValue::operator TextDecoration() const |
2385 { | 2424 { |
2386 switch (m_value.valueID) { | 2425 switch (m_value.valueID) { |
2387 case CSSValueNone: | 2426 case CSSValueNone: |
2388 return TextDecorationNone; | 2427 return TextDecorationNone; |
2389 case CSSValueUnderline: | 2428 case CSSValueUnderline: |
2390 return TextDecorationUnderline; | 2429 return TextDecorationUnderline; |
2391 case CSSValueOverline: | 2430 case CSSValueOverline: |
(...skipping 2314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4706 break; | 4745 break; |
4707 } | 4746 } |
4708 | 4747 |
4709 ASSERT_NOT_REACHED(); | 4748 ASSERT_NOT_REACHED(); |
4710 return TouchActionNone; | 4749 return TouchActionNone; |
4711 } | 4750 } |
4712 | 4751 |
4713 } | 4752 } |
4714 | 4753 |
4715 #endif | 4754 #endif |
OLD | NEW |