| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 class CalcExpressionNode; | 47 class CalcExpressionNode; |
| 48 class Length; | 48 class Length; |
| 49 | 49 |
| 50 enum CalcOperator { | 50 enum CalcOperator { |
| 51 CalcAdd = '+', | 51 CalcAdd = '+', |
| 52 CalcSubtract = '-', | 52 CalcSubtract = '-', |
| 53 CalcMultiply = '*', | 53 CalcMultiply = '*', |
| 54 CalcDivide = '/' | 54 CalcDivide = '/' |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 // The order of this enum should not change since its elements are used as indic
es |
| 58 // in the addSubtractResult matrix. |
| 57 enum CalculationCategory { | 59 enum CalculationCategory { |
| 58 CalcNumber = 0, | 60 CalcNumber = 0, |
| 59 CalcLength, | 61 CalcLength, |
| 60 CalcPercent, | 62 CalcPercent, |
| 61 CalcPercentNumber, | 63 CalcPercentNumber, |
| 62 CalcPercentLength, | 64 CalcPercentLength, |
| 65 CalcAngle, |
| 66 CalcTime, |
| 67 CalcFrequency, |
| 63 CalcOther | 68 CalcOther |
| 64 }; | 69 }; |
| 65 | 70 |
| 66 class CSSCalcExpressionNode : public RefCountedWillBeGarbageCollected<CSSCalcExp
ressionNode> { | 71 class CSSCalcExpressionNode : public RefCountedWillBeGarbageCollected<CSSCalcExp
ressionNode> { |
| 67 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(CSSCalcExpressionNode); | 72 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(CSSCalcExpressionNode); |
| 68 public: | 73 public: |
| 69 enum Type { | 74 enum Type { |
| 70 CssCalcPrimitiveValue = 1, | 75 CssCalcPrimitiveValue = 1, |
| 71 CssCalcBinaryOperation | 76 CssCalcBinaryOperation |
| 72 }; | 77 }; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 const RefPtrWillBeMember<CSSCalcExpressionNode> m_expression; | 145 const RefPtrWillBeMember<CSSCalcExpressionNode> m_expression; |
| 141 const bool m_nonNegative; | 146 const bool m_nonNegative; |
| 142 }; | 147 }; |
| 143 | 148 |
| 144 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCalcValue, isCalcValue()); | 149 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCalcValue, isCalcValue()); |
| 145 | 150 |
| 146 } // namespace blink | 151 } // namespace blink |
| 147 | 152 |
| 148 | 153 |
| 149 #endif // CSSCalculationValue_h | 154 #endif // CSSCalculationValue_h |
| OLD | NEW |