| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 if (m_primitiveUnitType == CSS_VALUE_ID) { | 120 if (m_primitiveUnitType == CSS_VALUE_ID) { |
| 121 if (m_value.valueID == CSSValueBalance) | 121 if (m_value.valueID == CSSValueBalance) |
| 122 return ColumnFillBalance; | 122 return ColumnFillBalance; |
| 123 if (m_value.valueID == CSSValueAuto) | 123 if (m_value.valueID == CSSValueAuto) |
| 124 return ColumnFillAuto; | 124 return ColumnFillAuto; |
| 125 } | 125 } |
| 126 ASSERT_NOT_REACHED(); | 126 ASSERT_NOT_REACHED(); |
| 127 return ColumnFillBalance; | 127 return ColumnFillBalance; |
| 128 } | 128 } |
| 129 | 129 |
| 130 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(PrintColorAdjust value) | |
| 131 : CSSValue(PrimitiveClass) | |
| 132 { | |
| 133 m_primitiveUnitType = CSS_VALUE_ID; | |
| 134 switch (value) { | |
| 135 case PrintColorAdjustExact: | |
| 136 m_value.valueID = CSSValueExact; | |
| 137 break; | |
| 138 case PrintColorAdjustEconomy: | |
| 139 m_value.valueID = CSSValueEconomy; | |
| 140 break; | |
| 141 } | |
| 142 } | |
| 143 | |
| 144 template<> inline CSSPrimitiveValue::operator PrintColorAdjust() const | |
| 145 { | |
| 146 ASSERT(isValueID()); | |
| 147 switch (m_value.valueID) { | |
| 148 case CSSValueEconomy: | |
| 149 return PrintColorAdjustEconomy; | |
| 150 case CSSValueExact: | |
| 151 return PrintColorAdjustExact; | |
| 152 default: | |
| 153 break; | |
| 154 } | |
| 155 | |
| 156 ASSERT_NOT_REACHED(); | |
| 157 return PrintColorAdjustEconomy; | |
| 158 } | |
| 159 | |
| 160 | |
| 161 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBorderStyle e) | 130 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBorderStyle e) |
| 162 : CSSValue(PrimitiveClass) | 131 : CSSValue(PrimitiveClass) |
| 163 { | 132 { |
| 164 m_primitiveUnitType = CSS_VALUE_ID; | 133 m_primitiveUnitType = CSS_VALUE_ID; |
| 165 switch (e) { | 134 switch (e) { |
| 166 case BNONE: | 135 case BNONE: |
| 167 m_value.valueID = CSSValueNone; | 136 m_value.valueID = CSSValueNone; |
| 168 break; | 137 break; |
| 169 case BHIDDEN: | 138 case BHIDDEN: |
| 170 m_value.valueID = CSSValueHidden; | 139 m_value.valueID = CSSValueHidden; |
| (...skipping 3335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3506 default: | 3475 default: |
| 3507 break; | 3476 break; |
| 3508 } | 3477 } |
| 3509 ASSERT_NOT_REACHED(); | 3478 ASSERT_NOT_REACHED(); |
| 3510 return ScrollBehaviorInstant; | 3479 return ScrollBehaviorInstant; |
| 3511 } | 3480 } |
| 3512 | 3481 |
| 3513 } | 3482 } |
| 3514 | 3483 |
| 3515 #endif // SKY_ENGINE_CORE_CSS_CSSPRIMITIVEVALUEMAPPINGS_H_ | 3484 #endif // SKY_ENGINE_CORE_CSS_CSSPRIMITIVEVALUEMAPPINGS_H_ |
| OLD | NEW |