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() | 177 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(CSSCalcExpressionNode) |
178 { | |
179 } | |
180 | 178 |
181 class CSSCalcPrimitiveValue FINAL : public CSSCalcExpressionNode { | 179 class CSSCalcPrimitiveValue FINAL : public CSSCalcExpressionNode { |
182 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 180 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
183 public: | 181 public: |
184 | 182 |
185 static PassRefPtrWillBeRawPtr<CSSCalcPrimitiveValue> create(PassRefPtrWillBe
RawPtr<CSSPrimitiveValue> value, bool isInteger) | 183 static PassRefPtrWillBeRawPtr<CSSCalcPrimitiveValue> create(PassRefPtrWillBe
RawPtr<CSSPrimitiveValue> value, bool isInteger) |
186 { | 184 { |
187 return adoptRefWillBeNoop(new CSSCalcPrimitiveValue(value, isInteger)); | 185 return adoptRefWillBeNoop(new CSSCalcPrimitiveValue(value, isInteger)); |
188 } | 186 } |
189 | 187 |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 return adoptRefWillBeRefCountedGarbageCollected(new CSSCalcValue(expression,
range)); | 758 return adoptRefWillBeRefCountedGarbageCollected(new CSSCalcValue(expression,
range)); |
761 } | 759 } |
762 | 760 |
763 void CSSCalcValue::traceAfterDispatch(Visitor* visitor) | 761 void CSSCalcValue::traceAfterDispatch(Visitor* visitor) |
764 { | 762 { |
765 visitor->trace(m_expression); | 763 visitor->trace(m_expression); |
766 CSSValue::traceAfterDispatch(visitor); | 764 CSSValue::traceAfterDispatch(visitor); |
767 } | 765 } |
768 | 766 |
769 } // namespace WebCore | 767 } // namespace WebCore |
OLD | NEW |