| 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 24 matching lines...) Expand all Loading... |
| 35 #include "core/svg/SVGParsingError.h" | 35 #include "core/svg/SVGParsingError.h" |
| 36 #include "core/svg/SVGPathByteStream.h" | 36 #include "core/svg/SVGPathByteStream.h" |
| 37 #include "core/svg/properties/SVGProperty.h" | 37 #include "core/svg/properties/SVGProperty.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class SVGPath : public SVGPropertyBase { | 41 class SVGPath : public SVGPropertyBase { |
| 42 public: | 42 public: |
| 43 typedef void TearOffType; | 43 typedef void TearOffType; |
| 44 | 44 |
| 45 static PassRefPtrWillBeRawPtr<SVGPath> create() | 45 static RawPtr<SVGPath> create() |
| 46 { | 46 { |
| 47 return adoptRefWillBeNoop(new SVGPath()); | 47 return (new SVGPath()); |
| 48 } | 48 } |
| 49 static PassRefPtrWillBeRawPtr<SVGPath> create(PassRefPtrWillBeRawPtr<CSSPath
Value> pathValue) | 49 static RawPtr<SVGPath> create(RawPtr<CSSPathValue> pathValue) |
| 50 { | 50 { |
| 51 return adoptRefWillBeNoop(new SVGPath(pathValue)); | 51 return (new SVGPath(pathValue)); |
| 52 } | 52 } |
| 53 | 53 |
| 54 ~SVGPath() override; | 54 ~SVGPath() override; |
| 55 | 55 |
| 56 const SVGPathByteStream& byteStream() const { return m_pathValue->byteStream
(); } | 56 const SVGPathByteStream& byteStream() const { return m_pathValue->byteStream
(); } |
| 57 CSSPathValue* pathValue() const { return m_pathValue.get(); } | 57 CSSPathValue* pathValue() const { return m_pathValue.get(); } |
| 58 | 58 |
| 59 // SVGPropertyBase: | 59 // SVGPropertyBase: |
| 60 PassRefPtrWillBeRawPtr<SVGPath> clone() const; | 60 RawPtr<SVGPath> clone() const; |
| 61 PassRefPtrWillBeRawPtr<SVGPropertyBase> cloneForAnimation(const String&) con
st override; | 61 RawPtr<SVGPropertyBase> cloneForAnimation(const String&) const override; |
| 62 String valueAsString() const override; | 62 String valueAsString() const override; |
| 63 SVGParsingError setValueAsString(const String&); | 63 SVGParsingError setValueAsString(const String&); |
| 64 | 64 |
| 65 void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override; | 65 void add(RawPtr<SVGPropertyBase>, SVGElement*) override; |
| 66 void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned
repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> fromValue, PassRefPtrWillB
eRawPtr<SVGPropertyBase> toValue, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEn
dOfDurationValue, SVGElement*) override; | 66 void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned
repeatCount, RawPtr<SVGPropertyBase> fromValue, RawPtr<SVGPropertyBase> toValue
, RawPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement*) override; |
| 67 float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVGEleme
nt*) override; | 67 float calculateDistance(RawPtr<SVGPropertyBase> to, SVGElement*) override; |
| 68 | 68 |
| 69 static AnimatedPropertyType classType() { return AnimatedPath; } | 69 static AnimatedPropertyType classType() { return AnimatedPath; } |
| 70 | 70 |
| 71 DECLARE_VIRTUAL_TRACE(); | 71 DECLARE_VIRTUAL_TRACE(); |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 SVGPath(); | 74 SVGPath(); |
| 75 explicit SVGPath(PassRefPtrWillBeRawPtr<CSSPathValue>); | 75 explicit SVGPath(RawPtr<CSSPathValue>); |
| 76 | 76 |
| 77 RefPtrWillBeMember<CSSPathValue> m_pathValue; | 77 Member<CSSPathValue> m_pathValue; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGPath); | 80 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGPath); |
| 81 | 81 |
| 82 } // namespace blink | 82 } // namespace blink |
| 83 | 83 |
| 84 #endif | 84 #endif |
| OLD | NEW |