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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 virtual void accumulateLengthArray(CSSLengthArray&, | 75 virtual void accumulateLengthArray(CSSLengthArray&, |
76 double multiplier) const = 0; | 76 double multiplier) const = 0; |
77 virtual void accumulatePixelsAndPercent(const CSSToLengthConversionData&, | 77 virtual void accumulatePixelsAndPercent(const CSSToLengthConversionData&, |
78 PixelsAndPercent&, | 78 PixelsAndPercent&, |
79 float multiplier = 1) const = 0; | 79 float multiplier = 1) const = 0; |
80 virtual String customCSSText() const = 0; | 80 virtual String customCSSText() const = 0; |
81 virtual bool equals(const CSSCalcExpressionNode& other) const { | 81 virtual bool equals(const CSSCalcExpressionNode& other) const { |
82 return m_category == other.m_category && m_isInteger == other.m_isInteger; | 82 return m_category == other.m_category && m_isInteger == other.m_isInteger; |
83 } | 83 } |
84 virtual Type getType() const = 0; | 84 virtual Type getType() const = 0; |
| 85 virtual const CSSCalcExpressionNode* leftExpressionNode() const = 0; |
| 86 virtual const CSSCalcExpressionNode* rightExpressionNode() const = 0; |
| 87 virtual CalcOperator operatorType() const = 0; |
85 | 88 |
86 CalculationCategory category() const { return m_category; } | 89 CalculationCategory category() const { return m_category; } |
87 virtual CSSPrimitiveValue::UnitType typeWithCalcResolved() const = 0; | 90 virtual CSSPrimitiveValue::UnitType typeWithCalcResolved() const = 0; |
88 bool isInteger() const { return m_isInteger; } | 91 bool isInteger() const { return m_isInteger; } |
89 | 92 |
90 DEFINE_INLINE_VIRTUAL_TRACE() {} | 93 DEFINE_INLINE_VIRTUAL_TRACE() {} |
91 | 94 |
92 protected: | 95 protected: |
93 CSSCalcExpressionNode(CalculationCategory category, bool isInteger) | 96 CSSCalcExpressionNode(CalculationCategory category, bool isInteger) |
94 : m_category(category), m_isInteger(isInteger) { | 97 : m_category(category), m_isInteger(isInteger) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 149 |
147 double clampToPermittedRange(double) const; | 150 double clampToPermittedRange(double) const; |
148 | 151 |
149 const Member<CSSCalcExpressionNode> m_expression; | 152 const Member<CSSCalcExpressionNode> m_expression; |
150 const bool m_nonNegative; | 153 const bool m_nonNegative; |
151 }; | 154 }; |
152 | 155 |
153 } // namespace blink | 156 } // namespace blink |
154 | 157 |
155 #endif // CSSCalculationValue_h | 158 #endif // CSSCalculationValue_h |
OLD | NEW |