| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 enum CalculationCategory { | 50 enum CalculationCategory { |
| 51 CalcNumber = 0, | 51 CalcNumber = 0, |
| 52 CalcLength, | 52 CalcLength, |
| 53 CalcPercent, | 53 CalcPercent, |
| 54 CalcPercentNumber, | 54 CalcPercentNumber, |
| 55 CalcPercentLength, | 55 CalcPercentLength, |
| 56 CalcOther | 56 CalcOther |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 class CSSCalcExpressionNode : public RefCountedWillBeGarbageCollected<CSSCalcExp
ressionNode> { | 59 class CSSCalcExpressionNode : public RefCountedWillBeGarbageCollectedFinalized<C
SSCalcExpressionNode> { |
| 60 public: | 60 public: |
| 61 enum Type { | 61 enum Type { |
| 62 CssCalcPrimitiveValue = 1, | 62 CssCalcPrimitiveValue = 1, |
| 63 CssCalcBinaryOperation | 63 CssCalcBinaryOperation |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 virtual ~CSSCalcExpressionNode() = 0; | 66 virtual ~CSSCalcExpressionNode() = 0; |
| 67 virtual bool isZero() const = 0; | 67 virtual bool isZero() const = 0; |
| 68 virtual PassOwnPtr<CalcExpressionNode> toCalcValue(const CSSToLengthConversi
onData&) const = 0; | 68 virtual PassOwnPtr<CalcExpressionNode> toCalcValue(const CSSToLengthConversi
onData&) const = 0; |
| 69 virtual double doubleValue() const = 0; | 69 virtual double doubleValue() const = 0; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |