| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } | 86 } |
| 87 | 87 |
| 88 CalculationCategory m_category; | 88 CalculationCategory m_category; |
| 89 bool m_isInteger; | 89 bool m_isInteger; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 class CSSCalcValue : public CSSValue { | 92 class CSSCalcValue : public CSSValue { |
| 93 public: | 93 public: |
| 94 static PassRefPtrWillBeRawPtr<CSSCalcValue> create(CSSParserString name, CSS
ParserValueList*, ValueRange); | 94 static PassRefPtrWillBeRawPtr<CSSCalcValue> create(CSSParserString name, CSS
ParserValueList*, ValueRange); |
| 95 static PassRefPtrWillBeRawPtr<CSSCalcValue> create(PassRefPtrWillBeRawPtr<CS
SCalcExpressionNode>, ValueRange = ValueRangeAll); | 95 static PassRefPtrWillBeRawPtr<CSSCalcValue> create(PassRefPtrWillBeRawPtr<CS
SCalcExpressionNode>, ValueRange = ValueRangeAll); |
| 96 static PassRefPtrWillBeRawPtr<CSSCalcValue> create(const CalculationValue* v
alue, float zoom) { return adoptRefCountedWillBeRefCountedGarbageCollected(new C
SSCalcValue(value, zoom)); } | 96 static PassRefPtrWillBeRawPtr<CSSCalcValue> create(const CalculationValue* v
alue, float zoom) { return adoptRefWillBeRefCountedGarbageCollected(new CSSCalcV
alue(value, zoom)); } |
| 97 | 97 |
| 98 static PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> createExpressionNode(Pa
ssRefPtrWillBeRawPtr<CSSPrimitiveValue>, bool isInteger = false); | 98 static PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> createExpressionNode(Pa
ssRefPtrWillBeRawPtr<CSSPrimitiveValue>, bool isInteger = false); |
| 99 static PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> createExpressionNode(Pa
ssRefPtrWillBeRawPtr<CSSCalcExpressionNode>, PassRefPtrWillBeRawPtr<CSSCalcExpre
ssionNode>, CalcOperator); | 99 static PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> createExpressionNode(Pa
ssRefPtrWillBeRawPtr<CSSCalcExpressionNode>, PassRefPtrWillBeRawPtr<CSSCalcExpre
ssionNode>, CalcOperator); |
| 100 static PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> createExpressionNode(co
nst CalcExpressionNode*, float zoom); | 100 static PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> createExpressionNode(co
nst CalcExpressionNode*, float zoom); |
| 101 static PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> createExpressionNode(co
nst Length&, float zoom); | 101 static PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> createExpressionNode(co
nst Length&, float zoom); |
| 102 | 102 |
| 103 PassRefPtr<CalculationValue> toCalcValue(const CSSToLengthConversionData& co
nversionData) const | 103 PassRefPtr<CalculationValue> toCalcValue(const CSSToLengthConversionData& co
nversionData) const |
| 104 { | 104 { |
| 105 return CalculationValue::create(m_expression->toCalcValue(conversionData
), m_nonNegative ? ValueRangeNonNegative : ValueRangeAll); | 105 return CalculationValue::create(m_expression->toCalcValue(conversionData
), m_nonNegative ? ValueRangeNonNegative : ValueRangeAll); |
| 106 } | 106 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 136 const RefPtrWillBeMember<CSSCalcExpressionNode> m_expression; | 136 const RefPtrWillBeMember<CSSCalcExpressionNode> m_expression; |
| 137 const bool m_nonNegative; | 137 const bool m_nonNegative; |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCalcValue, isCalcValue()); | 140 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCalcValue, isCalcValue()); |
| 141 | 141 |
| 142 } // namespace WebCore | 142 } // namespace WebCore |
| 143 | 143 |
| 144 | 144 |
| 145 #endif // CSSCalculationValue_h | 145 #endif // CSSCalculationValue_h |
| OLD | NEW |