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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 double CSSCalcValue::doubleValue() const | 167 double CSSCalcValue::doubleValue() const |
168 { | 168 { |
169 return clampToPermittedRange(m_expression->doubleValue()); | 169 return clampToPermittedRange(m_expression->doubleValue()); |
170 } | 170 } |
171 | 171 |
172 double CSSCalcValue::computeLengthPx(const CSSToLengthConversionData& conversion
Data) const | 172 double CSSCalcValue::computeLengthPx(const CSSToLengthConversionData& conversion
Data) const |
173 { | 173 { |
174 return clampToPermittedRange(m_expression->computeLengthPx(conversionData)); | 174 return clampToPermittedRange(m_expression->computeLengthPx(conversionData)); |
175 } | 175 } |
176 | 176 |
177 CSSCalcExpressionNode::~CSSCalcExpressionNode() | |
178 { | |
179 } | |
180 | |
181 class CSSCalcPrimitiveValue FINAL : public CSSCalcExpressionNode { | 177 class CSSCalcPrimitiveValue FINAL : public CSSCalcExpressionNode { |
182 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 178 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
183 public: | 179 public: |
184 | 180 |
185 static PassRefPtrWillBeRawPtr<CSSCalcPrimitiveValue> create(PassRefPtrWillBe
RawPtr<CSSPrimitiveValue> value, bool isInteger) | 181 static PassRefPtrWillBeRawPtr<CSSCalcPrimitiveValue> create(PassRefPtrWillBe
RawPtr<CSSPrimitiveValue> value, bool isInteger) |
186 { | 182 { |
187 return adoptRefWillBeNoop(new CSSCalcPrimitiveValue(value, isInteger)); | 183 return adoptRefWillBeNoop(new CSSCalcPrimitiveValue(value, isInteger)); |
188 } | 184 } |
189 | 185 |
190 static PassRefPtrWillBeRawPtr<CSSCalcPrimitiveValue> create(double value, CS
SPrimitiveValue::UnitTypes type, bool isInteger) | 186 static PassRefPtrWillBeRawPtr<CSSCalcPrimitiveValue> create(double value, CS
SPrimitiveValue::UnitTypes type, bool isInteger) |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 return adoptRefWillBeRefCountedGarbageCollected(new CSSCalcValue(expression,
range)); | 756 return adoptRefWillBeRefCountedGarbageCollected(new CSSCalcValue(expression,
range)); |
761 } | 757 } |
762 | 758 |
763 void CSSCalcValue::traceAfterDispatch(Visitor* visitor) | 759 void CSSCalcValue::traceAfterDispatch(Visitor* visitor) |
764 { | 760 { |
765 visitor->trace(m_expression); | 761 visitor->trace(m_expression); |
766 CSSValue::traceAfterDispatch(visitor); | 762 CSSValue::traceAfterDispatch(visitor); |
767 } | 763 } |
768 | 764 |
769 } // namespace WebCore | 765 } // namespace WebCore |
OLD | NEW |