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 4068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4079 case CSSValuePreserve3d: | 4079 case CSSValuePreserve3d: |
4080 return TransformStyle3DPreserve3D; | 4080 return TransformStyle3DPreserve3D; |
4081 default: | 4081 default: |
4082 break; | 4082 break; |
4083 } | 4083 } |
4084 | 4084 |
4085 ASSERT_NOT_REACHED(); | 4085 ASSERT_NOT_REACHED(); |
4086 return TransformStyle3DFlat; | 4086 return TransformStyle3DFlat; |
4087 } | 4087 } |
4088 | 4088 |
4089 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(WrapFlow wrapFlow) | |
4090 : CSSValue(PrimitiveClass) | |
4091 { | |
4092 m_primitiveUnitType = CSS_VALUE_ID; | |
4093 switch (wrapFlow) { | |
4094 case WrapFlowAuto: | |
4095 m_value.valueID = CSSValueAuto; | |
4096 break; | |
4097 case WrapFlowBoth: | |
4098 m_value.valueID = CSSValueBoth; | |
4099 break; | |
4100 case WrapFlowStart: | |
4101 m_value.valueID = CSSValueStart; | |
4102 break; | |
4103 case WrapFlowEnd: | |
4104 m_value.valueID = CSSValueEnd; | |
4105 break; | |
4106 case WrapFlowMaximum: | |
4107 m_value.valueID = CSSValueMaximum; | |
4108 break; | |
4109 case WrapFlowClear: | |
4110 m_value.valueID = CSSValueClear; | |
4111 break; | |
4112 } | |
4113 } | |
4114 | |
4115 template<> inline CSSPrimitiveValue::operator WrapFlow() const | |
4116 { | |
4117 ASSERT(isValueID()); | |
4118 switch (m_value.valueID) { | |
4119 case CSSValueAuto: | |
4120 return WrapFlowAuto; | |
4121 case CSSValueBoth: | |
4122 return WrapFlowBoth; | |
4123 case CSSValueStart: | |
4124 return WrapFlowStart; | |
4125 case CSSValueEnd: | |
4126 return WrapFlowEnd; | |
4127 case CSSValueMaximum: | |
4128 return WrapFlowMaximum; | |
4129 case CSSValueClear: | |
4130 return WrapFlowClear; | |
4131 default: | |
4132 break; | |
4133 } | |
4134 | |
4135 ASSERT_NOT_REACHED(); | |
4136 return WrapFlowAuto; | |
4137 } | |
4138 | |
4139 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(WrapThrough wrapThrough) | |
4140 : CSSValue(PrimitiveClass) | |
4141 { | |
4142 m_primitiveUnitType = CSS_VALUE_ID; | |
4143 switch (wrapThrough) { | |
4144 case WrapThroughWrap: | |
4145 m_value.valueID = CSSValueWrap; | |
4146 break; | |
4147 case WrapThroughNone: | |
4148 m_value.valueID = CSSValueNone; | |
4149 break; | |
4150 } | |
4151 } | |
4152 | |
4153 template<> inline CSSPrimitiveValue::operator WrapThrough() const | |
4154 { | |
4155 ASSERT(isValueID()); | |
4156 switch (m_value.valueID) { | |
4157 case CSSValueWrap: | |
4158 return WrapThroughWrap; | |
4159 case CSSValueNone: | |
4160 return WrapThroughNone; | |
4161 default: | |
4162 break; | |
4163 } | |
4164 | |
4165 ASSERT_NOT_REACHED(); | |
4166 return WrapThroughWrap; | |
4167 } | |
4168 | |
4169 template<> inline CSSPrimitiveValue::operator GridAutoFlow() const | 4089 template<> inline CSSPrimitiveValue::operator GridAutoFlow() const |
4170 { | 4090 { |
4171 ASSERT(isValueID()); | 4091 ASSERT(isValueID()); |
4172 switch (m_value.valueID) { | 4092 switch (m_value.valueID) { |
4173 case CSSValueNone: | 4093 case CSSValueNone: |
4174 return AutoFlowNone; | 4094 return AutoFlowNone; |
4175 case CSSValueColumn: | 4095 case CSSValueColumn: |
4176 return AutoFlowColumn; | 4096 return AutoFlowColumn; |
4177 case CSSValueRow: | 4097 case CSSValueRow: |
4178 return AutoFlowRow; | 4098 return AutoFlowRow; |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4891 default: | 4811 default: |
4892 break; | 4812 break; |
4893 } | 4813 } |
4894 ASSERT_NOT_REACHED(); | 4814 ASSERT_NOT_REACHED(); |
4895 return ScrollBehaviorInstant; | 4815 return ScrollBehaviorInstant; |
4896 } | 4816 } |
4897 | 4817 |
4898 } | 4818 } |
4899 | 4819 |
4900 #endif | 4820 #endif |
OLD | NEW |