| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 CalculationCategory category() const { return m_category; } | 89 CalculationCategory category() const { return m_category; } |
| 90 virtual CSSPrimitiveValue::UnitType typeWithCalcResolved() const = 0; | 90 virtual CSSPrimitiveValue::UnitType typeWithCalcResolved() const = 0; |
| 91 bool isInteger() const { return m_isInteger; } | 91 bool isInteger() const { return m_isInteger; } |
| 92 | 92 |
| 93 DEFINE_INLINE_VIRTUAL_TRACE() {} | 93 DEFINE_INLINE_VIRTUAL_TRACE() {} |
| 94 | 94 |
| 95 protected: | 95 protected: |
| 96 CSSCalcExpressionNode(CalculationCategory category, bool isInteger) | 96 CSSCalcExpressionNode(CalculationCategory category, bool isInteger) |
| 97 : m_category(category), m_isInteger(isInteger) { | 97 : m_category(category), m_isInteger(isInteger) { |
| 98 ASSERT(category != CalcOther); | 98 DCHECK_NE(category, CalcOther); |
| 99 } | 99 } |
| 100 | 100 |
| 101 CalculationCategory m_category; | 101 CalculationCategory m_category; |
| 102 bool m_isInteger; | 102 bool m_isInteger; |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 class CORE_EXPORT CSSCalcValue : public GarbageCollected<CSSCalcValue> { | 105 class CORE_EXPORT CSSCalcValue : public GarbageCollected<CSSCalcValue> { |
| 106 public: | 106 public: |
| 107 static CSSCalcValue* create(const CSSParserTokenRange&, ValueRange); | 107 static CSSCalcValue* create(const CSSParserTokenRange&, ValueRange); |
| 108 static CSSCalcValue* create(CSSCalcExpressionNode*, | 108 static CSSCalcValue* create(CSSCalcExpressionNode*, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 double clampToPermittedRange(double) const; | 150 double clampToPermittedRange(double) const; |
| 151 | 151 |
| 152 const Member<CSSCalcExpressionNode> m_expression; | 152 const Member<CSSCalcExpressionNode> m_expression; |
| 153 const bool m_nonNegative; | 153 const bool m_nonNegative; |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 } // namespace blink | 156 } // namespace blink |
| 157 | 157 |
| 158 #endif // CSSCalculationValue_h | 158 #endif // CSSCalculationValue_h |
| OLD | NEW |