| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 virtual bool isZero() const = 0; | 73 virtual bool isZero() const = 0; |
| 74 virtual double doubleValue() const = 0; | 74 virtual double doubleValue() const = 0; |
| 75 virtual double computeLengthPx(const CSSToLengthConversionData&) const = 0; | 75 virtual double computeLengthPx(const CSSToLengthConversionData&) const = 0; |
| 76 virtual void accumulateLengthArray(CSSLengthArray&, double multiplier) const
= 0; | 76 virtual void accumulateLengthArray(CSSLengthArray&, double multiplier) const
= 0; |
| 77 virtual void accumulatePixelsAndPercent(const CSSToLengthConversionData&, Pi
xelsAndPercent&, float multiplier = 1) const = 0; | 77 virtual void accumulatePixelsAndPercent(const CSSToLengthConversionData&, Pi
xelsAndPercent&, float multiplier = 1) const = 0; |
| 78 virtual String customCSSText() const = 0; | 78 virtual String customCSSText() const = 0; |
| 79 virtual bool equals(const CSSCalcExpressionNode& other) const { return m_cat
egory == other.m_category && m_isInteger == other.m_isInteger; } | 79 virtual bool equals(const CSSCalcExpressionNode& other) const { return m_cat
egory == other.m_category && m_isInteger == other.m_isInteger; } |
| 80 virtual Type getType() const = 0; | 80 virtual Type getType() const = 0; |
| 81 virtual const CSSCalcExpressionNode* getLHS() const = 0; |
| 82 virtual const CSSCalcExpressionNode* getRHS() const = 0; |
| 83 virtual CalcOperator op() const = 0; |
| 81 | 84 |
| 82 CalculationCategory category() const { return m_category; } | 85 CalculationCategory category() const { return m_category; } |
| 83 virtual CSSPrimitiveValue::UnitType typeWithCalcResolved() const = 0; | 86 virtual CSSPrimitiveValue::UnitType typeWithCalcResolved() const = 0; |
| 84 bool isInteger() const { return m_isInteger; } | 87 bool isInteger() const { return m_isInteger; } |
| 85 | 88 |
| 86 DEFINE_INLINE_VIRTUAL_TRACE() { } | 89 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 87 | 90 |
| 88 protected: | 91 protected: |
| 89 CSSCalcExpressionNode(CalculationCategory category, bool isInteger) | 92 CSSCalcExpressionNode(CalculationCategory category, bool isInteger) |
| 90 : m_category(category) | 93 : m_category(category) |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 141 |
| 139 double clampToPermittedRange(double) const; | 142 double clampToPermittedRange(double) const; |
| 140 | 143 |
| 141 const Member<CSSCalcExpressionNode> m_expression; | 144 const Member<CSSCalcExpressionNode> m_expression; |
| 142 const bool m_nonNegative; | 145 const bool m_nonNegative; |
| 143 }; | 146 }; |
| 144 | 147 |
| 145 } // namespace blink | 148 } // namespace blink |
| 146 | 149 |
| 147 #endif // CSSCalculationValue_h | 150 #endif // CSSCalculationValue_h |
| OLD | NEW |