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/SVGTransform.h" | 35 #include "core/svg/SVGTransform.h" |
36 #include "core/svg/properties/SVGListPropertyHelper.h" | 36 #include "core/svg/properties/SVGListPropertyHelper.h" |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 class SVGTransformListTearOff; | 40 class SVGTransformListTearOff; |
41 | 41 |
42 class SVGTransformList final : public SVGListPropertyHelper<SVGTransformList, SV
GTransform> { | 42 class SVGTransformList final : public SVGListPropertyHelper<SVGTransformList, SV
GTransform> { |
43 public: | 43 public: |
44 typedef SVGTransformListTearOff TearOffType; | 44 typedef SVGTransformListTearOff TearOffType; |
| 45 typedef SVGTransform ItemPropertyType; |
| 46 typedef SVGListPropertyHelper<SVGTransformList, SVGTransform> Base; |
45 | 47 |
46 static PassRefPtrWillBeRawPtr<SVGTransformList> create() | 48 static PassRefPtrWillBeRawPtr<SVGTransformList> create() |
47 { | 49 { |
48 return adoptRefWillBeNoop(new SVGTransformList()); | 50 return adoptRefWillBeNoop(new SVGTransformList()); |
49 } | 51 } |
50 | 52 |
51 static PassRefPtrWillBeRawPtr<SVGTransformList> create(SVGTransformType, con
st String&); | 53 static PassRefPtrWillBeRawPtr<SVGTransformList> create(SVGTransformType, con
st String&); |
52 | 54 |
53 virtual ~SVGTransformList(); | 55 virtual ~SVGTransformList(); |
54 | 56 |
55 PassRefPtrWillBeRawPtr<SVGTransform> consolidate(); | 57 PassRefPtrWillBeRawPtr<SVGTransform> consolidate(); |
56 | 58 |
57 bool concatenate(AffineTransform& result) const; | 59 bool concatenate(AffineTransform& result) const; |
58 | 60 |
59 // SVGPropertyBase: | 61 // SVGPropertyBase: |
60 virtual PassRefPtrWillBeRawPtr<SVGPropertyBase> cloneForAnimation(const Stri
ng&) const override; | 62 virtual PassRefPtrWillBeRawPtr<SVGPropertyBase> cloneForAnimation(const Stri
ng&) const override; |
61 virtual String valueAsString() const override; | 63 virtual String valueAsString() const override; |
62 void setValueAsString(const String&, ExceptionState&); | 64 void setValueAsString(const String&, ExceptionState&); |
63 bool parse(const UChar*& ptr, const UChar* end); | 65 bool parse(const UChar*& ptr, const UChar* end); |
64 bool parse(const LChar*& ptr, const LChar* end); | 66 bool parse(const LChar*& ptr, const LChar* end); |
65 | 67 |
66 virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) overr
ide; | 68 virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) overr
ide; |
67 virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage,
unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> fromValue, PassRef
PtrWillBeRawPtr<SVGPropertyBase> toValue, PassRefPtrWillBeRawPtr<SVGPropertyBase
> toAtEndOfDurationValue, SVGElement*) override; | 69 virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage,
unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> fromValue, PassRef
PtrWillBeRawPtr<SVGPropertyBase> toValue, PassRefPtrWillBeRawPtr<SVGPropertyBase
> toAtEndOfDurationValue, SVGElement*) override; |
68 virtual float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to,
SVGElement*) override; | 70 virtual float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to,
SVGElement*) override; |
69 | 71 |
| 72 PassRefPtrWillBeRawPtr<ItemPropertyType> initialize(PassRefPtrWillBeRawPtr<I
temPropertyType>); |
| 73 PassRefPtrWillBeRawPtr<ItemPropertyType> appendItem(PassRefPtrWillBeRawPtr<I
temPropertyType> passItem); |
| 74 PassRefPtrWillBeRawPtr<ItemPropertyType> insertItemBefore(PassRefPtrWillBeRa
wPtr<ItemPropertyType>, size_t); |
| 75 PassRefPtrWillBeRawPtr<ItemPropertyType> replaceItem(PassRefPtrWillBeRawPtr<
ItemPropertyType>, size_t, ExceptionState&); |
| 76 |
70 static AnimatedPropertyType classType() { return AnimatedTransformList; } | 77 static AnimatedPropertyType classType() { return AnimatedTransformList; } |
71 | 78 |
72 private: | 79 private: |
73 SVGTransformList(); | 80 SVGTransformList(); |
74 | 81 |
75 template <typename CharType> | 82 template <typename CharType> |
76 bool parseInternal(const CharType*& ptr, const CharType* end); | 83 bool parseInternal(const CharType*& ptr, const CharType* end); |
77 }; | 84 }; |
78 | 85 |
79 } // namespace blink | 86 } // namespace blink |
80 | 87 |
81 #endif // SVGTransformList_h | 88 #endif // SVGTransformList_h |
OLD | NEW |