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 4063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4074 case CSSValuePreserve3d: | 4074 case CSSValuePreserve3d: |
4075 return TransformStyle3DPreserve3D; | 4075 return TransformStyle3DPreserve3D; |
4076 default: | 4076 default: |
4077 break; | 4077 break; |
4078 } | 4078 } |
4079 | 4079 |
4080 ASSERT_NOT_REACHED(); | 4080 ASSERT_NOT_REACHED(); |
4081 return TransformStyle3DFlat; | 4081 return TransformStyle3DFlat; |
4082 } | 4082 } |
4083 | 4083 |
4084 template<> inline CSSPrimitiveValue::operator GridAutoFlow() const | |
4085 { | |
4086 ASSERT(isValueID()); | |
4087 switch (m_value.valueID) { | |
4088 case CSSValueNone: | |
4089 return AutoFlowNone; | |
4090 case CSSValueColumn: | |
4091 return AutoFlowColumn; | |
4092 case CSSValueRow: | |
4093 return AutoFlowRow; | |
4094 default: | |
4095 break; | |
4096 } | |
4097 | |
4098 ASSERT_NOT_REACHED(); | |
4099 return AutoFlowNone; | |
4100 | |
4101 } | |
4102 | |
4103 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(GridAutoFlow flow) | |
4104 : CSSValue(PrimitiveClass) | |
4105 { | |
4106 m_primitiveUnitType = CSS_VALUE_ID; | |
4107 switch (flow) { | |
4108 case AutoFlowNone: | |
4109 m_value.valueID = CSSValueNone; | |
4110 break; | |
4111 case AutoFlowColumn: | |
4112 m_value.valueID = CSSValueColumn; | |
4113 break; | |
4114 case AutoFlowRow: | |
4115 m_value.valueID = CSSValueRow; | |
4116 break; | |
4117 } | |
4118 } | |
4119 | |
4120 enum LengthConversion { | 4084 enum LengthConversion { |
4121 AnyConversion = ~0, | 4085 AnyConversion = ~0, |
4122 FixedConversion = 1 << 0, | 4086 FixedConversion = 1 << 0, |
4123 AutoConversion = 1 << 1, | 4087 AutoConversion = 1 << 1, |
4124 PercentConversion = 1 << 2, | 4088 PercentConversion = 1 << 2, |
4125 }; | 4089 }; |
4126 | 4090 |
4127 template<int supported> Length CSSPrimitiveValue::convertToLength(const CSSToLen
gthConversionData& conversionData) | 4091 template<int supported> Length CSSPrimitiveValue::convertToLength(const CSSToLen
gthConversionData& conversionData) |
4128 { | 4092 { |
4129 if ((supported & FixedConversion) && isLength()) | 4093 if ((supported & FixedConversion) && isLength()) |
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4806 default: | 4770 default: |
4807 break; | 4771 break; |
4808 } | 4772 } |
4809 ASSERT_NOT_REACHED(); | 4773 ASSERT_NOT_REACHED(); |
4810 return ScrollBehaviorInstant; | 4774 return ScrollBehaviorInstant; |
4811 } | 4775 } |
4812 | 4776 |
4813 } | 4777 } |
4814 | 4778 |
4815 #endif | 4779 #endif |
OLD | NEW |