| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 } | 175 } |
| 176 | 176 |
| 177 double CSSCalcValue::computeLengthPx(const CSSToLengthConversionData& conversion
Data) const | 177 double CSSCalcValue::computeLengthPx(const CSSToLengthConversionData& conversion
Data) const |
| 178 { | 178 { |
| 179 return clampToPermittedRange(m_expression->computeLengthPx(conversionData)); | 179 return clampToPermittedRange(m_expression->computeLengthPx(conversionData)); |
| 180 } | 180 } |
| 181 | 181 |
| 182 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(CSSCalcExpressionNode) | 182 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(CSSCalcExpressionNode) |
| 183 | 183 |
| 184 class CSSCalcPrimitiveValue final : public CSSCalcExpressionNode { | 184 class CSSCalcPrimitiveValue final : public CSSCalcExpressionNode { |
| 185 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 185 WTF_MAKE_FAST_ALLOCATED; |
| 186 public: | 186 public: |
| 187 | 187 |
| 188 static PassRefPtr<CSSCalcPrimitiveValue> create(PassRefPtr<CSSPrimitiveValue
> value, bool isInteger) | 188 static PassRefPtr<CSSCalcPrimitiveValue> create(PassRefPtr<CSSPrimitiveValue
> value, bool isInteger) |
| 189 { | 189 { |
| 190 return adoptRef(new CSSCalcPrimitiveValue(value, isInteger)); | 190 return adoptRef(new CSSCalcPrimitiveValue(value, isInteger)); |
| 191 } | 191 } |
| 192 | 192 |
| 193 static PassRefPtr<CSSCalcPrimitiveValue> create(double value, CSSPrimitiveVa
lue::UnitType type, bool isInteger) | 193 static PassRefPtr<CSSCalcPrimitiveValue> create(double value, CSSPrimitiveVa
lue::UnitType type, bool isInteger) |
| 194 { | 194 { |
| 195 if (std::isnan(value) || std::isinf(value)) | 195 if (std::isnan(value) || std::isinf(value)) |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 return adoptRef(new CSSCalcValue(expression, range)); | 763 return adoptRef(new CSSCalcValue(expression, range)); |
| 764 } | 764 } |
| 765 | 765 |
| 766 void CSSCalcValue::traceAfterDispatch(Visitor* visitor) | 766 void CSSCalcValue::traceAfterDispatch(Visitor* visitor) |
| 767 { | 767 { |
| 768 visitor->trace(m_expression); | 768 visitor->trace(m_expression); |
| 769 CSSValue::traceAfterDispatch(visitor); | 769 CSSValue::traceAfterDispatch(visitor); |
| 770 } | 770 } |
| 771 | 771 |
| 772 } // namespace blink | 772 } // namespace blink |
| OLD | NEW |