| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 { | 47 { |
| 48 return adoptRefWillBeNoop(new SVGString()); | 48 return adoptRefWillBeNoop(new SVGString()); |
| 49 } | 49 } |
| 50 | 50 |
| 51 static PassRefPtrWillBeRawPtr<SVGString> create(const String& value) | 51 static PassRefPtrWillBeRawPtr<SVGString> create(const String& value) |
| 52 { | 52 { |
| 53 return adoptRefWillBeNoop(new SVGString(value)); | 53 return adoptRefWillBeNoop(new SVGString(value)); |
| 54 } | 54 } |
| 55 | 55 |
| 56 PassRefPtrWillBeRawPtr<SVGString> clone() const { return create(m_value); } | 56 PassRefPtrWillBeRawPtr<SVGString> clone() const { return create(m_value); } |
| 57 virtual PassRefPtrWillBeRawPtr<SVGPropertyBase> cloneForAnimation(const Stri
ng& value) const override | 57 PassRefPtrWillBeRawPtr<SVGPropertyBase> cloneForAnimation(const String& valu
e) const override |
| 58 { | 58 { |
| 59 return create(value); | 59 return create(value); |
| 60 } | 60 } |
| 61 | 61 |
| 62 virtual String valueAsString() const override { return m_value; } | 62 String valueAsString() const override { return m_value; } |
| 63 void setValueAsString(const String& value, ExceptionState&) { m_value = valu
e; } | 63 void setValueAsString(const String& value, ExceptionState&) { m_value = valu
e; } |
| 64 | 64 |
| 65 virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) overr
ide; | 65 void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override; |
| 66 virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage,
unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWi
llBeRawPtr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndO
fDurationValue, SVGElement*) override; | 66 void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned
repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWillBeRawP
tr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDuratio
nValue, SVGElement*) override; |
| 67 virtual float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to,
SVGElement*) override; | 67 float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVGEleme
nt*) override; |
| 68 | 68 |
| 69 const String& value() const { return m_value; } | 69 const String& value() const { return m_value; } |
| 70 void setValue(const String& value) { m_value = value; } | 70 void setValue(const String& value) { m_value = value; } |
| 71 | 71 |
| 72 static AnimatedPropertyType classType() { return AnimatedString; } | 72 static AnimatedPropertyType classType() { return AnimatedString; } |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 SVGString() | 75 SVGString() |
| 76 : SVGPropertyBase(classType()) | 76 : SVGPropertyBase(classType()) |
| 77 { | 77 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 89 inline PassRefPtrWillBeRawPtr<SVGString> toSVGString(PassRefPtrWillBeRawPtr<SVGP
ropertyBase> passBase) | 89 inline PassRefPtrWillBeRawPtr<SVGString> toSVGString(PassRefPtrWillBeRawPtr<SVGP
ropertyBase> passBase) |
| 90 { | 90 { |
| 91 RefPtrWillBeRawPtr<SVGPropertyBase> base = passBase; | 91 RefPtrWillBeRawPtr<SVGPropertyBase> base = passBase; |
| 92 ASSERT(base->type() == SVGString::classType()); | 92 ASSERT(base->type() == SVGString::classType()); |
| 93 return static_pointer_cast<SVGString>(base.release()); | 93 return static_pointer_cast<SVGString>(base.release()); |
| 94 } | 94 } |
| 95 | 95 |
| 96 } // namespace blink | 96 } // namespace blink |
| 97 | 97 |
| 98 #endif // SVGString_h | 98 #endif // SVGString_h |
| OLD | NEW |