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 3489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3500 case CSSValueGeometricprecision: | 3500 case CSSValueGeometricprecision: |
3501 return GeometricPrecision; | 3501 return GeometricPrecision; |
3502 default: | 3502 default: |
3503 break; | 3503 break; |
3504 } | 3504 } |
3505 | 3505 |
3506 ASSERT_NOT_REACHED(); | 3506 ASSERT_NOT_REACHED(); |
3507 return AutoTextRendering; | 3507 return AutoTextRendering; |
3508 } | 3508 } |
3509 | 3509 |
3510 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Hyphens hyphens) | |
3511 : CSSValue(PrimitiveClass) | |
3512 { | |
3513 m_primitiveUnitType = CSS_VALUE_ID; | |
3514 switch (hyphens) { | |
3515 case HyphensNone: | |
3516 m_value.valueID = CSSValueNone; | |
3517 break; | |
3518 case HyphensManual: | |
3519 m_value.valueID = CSSValueManual; | |
3520 break; | |
3521 case HyphensAuto: | |
3522 m_value.valueID = CSSValueAuto; | |
3523 break; | |
3524 } | |
3525 } | |
3526 | |
3527 template<> inline CSSPrimitiveValue::operator Hyphens() const | |
3528 { | |
3529 switch (m_value.valueID) { | |
3530 case CSSValueNone: | |
3531 return HyphensNone; | |
3532 case CSSValueManual: | |
3533 return HyphensManual; | |
3534 case CSSValueAuto: | |
3535 return HyphensAuto; | |
3536 default: | |
3537 break; | |
3538 } | |
3539 | |
3540 ASSERT_NOT_REACHED(); | |
3541 return HyphensAuto; | |
3542 } | |
3543 | |
3544 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineSnap gridSnap) | 3510 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineSnap gridSnap) |
3545 : CSSValue(PrimitiveClass) | 3511 : CSSValue(PrimitiveClass) |
3546 { | 3512 { |
3547 m_primitiveUnitType = CSS_VALUE_ID; | 3513 m_primitiveUnitType = CSS_VALUE_ID; |
3548 switch (gridSnap) { | 3514 switch (gridSnap) { |
3549 case LineSnapNone: | 3515 case LineSnapNone: |
3550 m_value.valueID = CSSValueNone; | 3516 m_value.valueID = CSSValueNone; |
3551 break; | 3517 break; |
3552 case LineSnapBaseline: | 3518 case LineSnapBaseline: |
3553 m_value.valueID = CSSValueBaseline; | 3519 m_value.valueID = CSSValueBaseline; |
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4677 break; | 4643 break; |
4678 } | 4644 } |
4679 | 4645 |
4680 ASSERT_NOT_REACHED(); | 4646 ASSERT_NOT_REACHED(); |
4681 return TouchActionNone; | 4647 return TouchActionNone; |
4682 } | 4648 } |
4683 | 4649 |
4684 } | 4650 } |
4685 | 4651 |
4686 #endif | 4652 #endif |
OLD | NEW |