| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 29 matching lines...) Expand all Loading... |
| 40 // Tearoff of SVGNumberOptionalNumber is never created. | 40 // Tearoff of SVGNumberOptionalNumber is never created. |
| 41 typedef void TearOffType; | 41 typedef void TearOffType; |
| 42 typedef void PrimitiveType; | 42 typedef void PrimitiveType; |
| 43 | 43 |
| 44 static PassRefPtr<SVGNumberOptionalNumber> create(PassRefPtr<SVGNumber> firs
tNumber, PassRefPtr<SVGNumber> secondNumber) | 44 static PassRefPtr<SVGNumberOptionalNumber> create(PassRefPtr<SVGNumber> firs
tNumber, PassRefPtr<SVGNumber> secondNumber) |
| 45 { | 45 { |
| 46 return adoptRef(new SVGNumberOptionalNumber(firstNumber, secondNumber)); | 46 return adoptRef(new SVGNumberOptionalNumber(firstNumber, secondNumber)); |
| 47 } | 47 } |
| 48 | 48 |
| 49 PassRefPtr<SVGNumberOptionalNumber> clone() const; | 49 PassRefPtr<SVGNumberOptionalNumber> clone() const; |
| 50 virtual PassRefPtr<SVGPropertyBase> cloneForAnimation(const String&) const O
VERRIDE; | 50 virtual PassRefPtr<SVGPropertyBase> cloneForAnimation(const String&) const o
verride; |
| 51 | 51 |
| 52 virtual String valueAsString() const OVERRIDE; | 52 virtual String valueAsString() const override; |
| 53 void setValueAsString(const String&, ExceptionState&); | 53 void setValueAsString(const String&, ExceptionState&); |
| 54 | 54 |
| 55 virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) OVERR
IDE; | 55 virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) overr
ide; |
| 56 virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage,
unsigned repeatCount, PassRefPtr<SVGPropertyBase> from, PassRefPtr<SVGPropertyBa
se> to, PassRefPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement* contextE
lement) OVERRIDE; | 56 virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage,
unsigned repeatCount, PassRefPtr<SVGPropertyBase> from, PassRefPtr<SVGPropertyBa
se> to, PassRefPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement* contextE
lement) override; |
| 57 virtual float calculateDistance(PassRefPtr<SVGPropertyBase> to, SVGElement*
contextElement) OVERRIDE; | 57 virtual float calculateDistance(PassRefPtr<SVGPropertyBase> to, SVGElement*
contextElement) override; |
| 58 | 58 |
| 59 static AnimatedPropertyType classType() { return AnimatedNumberOptionalNumbe
r; } | 59 static AnimatedPropertyType classType() { return AnimatedNumberOptionalNumbe
r; } |
| 60 | 60 |
| 61 PassRefPtr<SVGNumber> firstNumber() { return m_firstNumber; } | 61 PassRefPtr<SVGNumber> firstNumber() { return m_firstNumber; } |
| 62 PassRefPtr<SVGNumber> secondNumber() { return m_secondNumber; } | 62 PassRefPtr<SVGNumber> secondNumber() { return m_secondNumber; } |
| 63 | 63 |
| 64 protected: | 64 protected: |
| 65 SVGNumberOptionalNumber(PassRefPtr<SVGNumber> firstNumber, PassRefPtr<SVGNum
ber> secondNumber); | 65 SVGNumberOptionalNumber(PassRefPtr<SVGNumber> firstNumber, PassRefPtr<SVGNum
ber> secondNumber); |
| 66 | 66 |
| 67 RefPtr<SVGNumber> m_firstNumber; | 67 RefPtr<SVGNumber> m_firstNumber; |
| 68 RefPtr<SVGNumber> m_secondNumber; | 68 RefPtr<SVGNumber> m_secondNumber; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 inline PassRefPtr<SVGNumberOptionalNumber> toSVGNumberOptionalNumber(PassRefPtr<
SVGPropertyBase> passBase) | 71 inline PassRefPtr<SVGNumberOptionalNumber> toSVGNumberOptionalNumber(PassRefPtr<
SVGPropertyBase> passBase) |
| 72 { | 72 { |
| 73 RefPtr<SVGPropertyBase> base = passBase; | 73 RefPtr<SVGPropertyBase> base = passBase; |
| 74 ASSERT(base->type() == SVGNumberOptionalNumber::classType()); | 74 ASSERT(base->type() == SVGNumberOptionalNumber::classType()); |
| 75 return static_pointer_cast<SVGNumberOptionalNumber>(base.release()); | 75 return static_pointer_cast<SVGNumberOptionalNumber>(base.release()); |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace blink | 78 } // namespace blink |
| 79 | 79 |
| 80 #endif // SVGNumberOptionalNumber_h | 80 #endif // SVGNumberOptionalNumber_h |
| OLD | NEW |