| 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 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 case CSSValueAbsolute: | 1035 case CSSValueAbsolute: |
| 1036 return AbsolutePosition; | 1036 return AbsolutePosition; |
| 1037 default: | 1037 default: |
| 1038 break; | 1038 break; |
| 1039 } | 1039 } |
| 1040 | 1040 |
| 1041 ASSERT_NOT_REACHED(); | 1041 ASSERT_NOT_REACHED(); |
| 1042 return StaticPosition; | 1042 return StaticPosition; |
| 1043 } | 1043 } |
| 1044 | 1044 |
| 1045 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETableLayout e) | |
| 1046 : CSSValue(PrimitiveClass) | |
| 1047 { | |
| 1048 m_primitiveUnitType = CSS_VALUE_ID; | |
| 1049 switch (e) { | |
| 1050 case TAUTO: | |
| 1051 m_value.valueID = CSSValueAuto; | |
| 1052 break; | |
| 1053 case TFIXED: | |
| 1054 m_value.valueID = CSSValueFixed; | |
| 1055 break; | |
| 1056 } | |
| 1057 } | |
| 1058 | |
| 1059 template<> inline CSSPrimitiveValue::operator ETableLayout() const | |
| 1060 { | |
| 1061 ASSERT(isValueID()); | |
| 1062 switch (m_value.valueID) { | |
| 1063 case CSSValueFixed: | |
| 1064 return TFIXED; | |
| 1065 case CSSValueAuto: | |
| 1066 return TAUTO; | |
| 1067 default: | |
| 1068 break; | |
| 1069 } | |
| 1070 | |
| 1071 ASSERT_NOT_REACHED(); | |
| 1072 return TAUTO; | |
| 1073 } | |
| 1074 | |
| 1075 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextAlign e) | 1045 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextAlign e) |
| 1076 : CSSValue(PrimitiveClass) | 1046 : CSSValue(PrimitiveClass) |
| 1077 { | 1047 { |
| 1078 m_primitiveUnitType = CSS_VALUE_ID; | 1048 m_primitiveUnitType = CSS_VALUE_ID; |
| 1079 switch (e) { | 1049 switch (e) { |
| 1080 case TASTART: | 1050 case TASTART: |
| 1081 m_value.valueID = CSSValueStart; | 1051 m_value.valueID = CSSValueStart; |
| 1082 break; | 1052 break; |
| 1083 case TAEND: | 1053 case TAEND: |
| 1084 m_value.valueID = CSSValueEnd; | 1054 m_value.valueID = CSSValueEnd; |
| (...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2864 default: | 2834 default: |
| 2865 break; | 2835 break; |
| 2866 } | 2836 } |
| 2867 ASSERT_NOT_REACHED(); | 2837 ASSERT_NOT_REACHED(); |
| 2868 return OverflowAlignmentTrue; | 2838 return OverflowAlignmentTrue; |
| 2869 } | 2839 } |
| 2870 | 2840 |
| 2871 } | 2841 } |
| 2872 | 2842 |
| 2873 #endif // SKY_ENGINE_CORE_CSS_CSSPRIMITIVEVALUEMAPPINGS_H_ | 2843 #endif // SKY_ENGINE_CORE_CSS_CSSPRIMITIVEVALUEMAPPINGS_H_ |
| OLD | NEW |