OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "core/animation/animatable/AnimatableStrokeDasharrayList.h" | 32 #include "core/animation/animatable/AnimatableStrokeDasharrayList.h" |
33 | 33 |
34 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 34 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
35 #include "core/animation/animatable/AnimatableSVGLength.h" | 35 #include "core/animation/animatable/AnimatableSVGLength.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 AnimatableStrokeDasharrayList::AnimatableStrokeDasharrayList(PassRefPtr<SVGLengt
hList> passLengths) | 39 AnimatableStrokeDasharrayList::AnimatableStrokeDasharrayList(PassRefPtrWillBeRaw
Ptr<SVGLengthList> passLengths) |
40 { | 40 { |
41 RefPtr<SVGLengthList> lengths = passLengths; | 41 RefPtrWillBeRawPtr<SVGLengthList> lengths = passLengths; |
42 SVGLengthList::ConstIterator it = lengths->begin(); | 42 SVGLengthList::ConstIterator it = lengths->begin(); |
43 SVGLengthList::ConstIterator itEnd = lengths->end(); | 43 SVGLengthList::ConstIterator itEnd = lengths->end(); |
44 for (; it != itEnd; ++it) | 44 for (; it != itEnd; ++it) |
45 m_values.append(AnimatableSVGLength::create(*it)); | 45 m_values.append(AnimatableSVGLength::create(*it)); |
46 } | 46 } |
47 | 47 |
48 PassRefPtr<SVGLengthList> AnimatableStrokeDasharrayList::toSVGLengthList() const | 48 PassRefPtrWillBeRawPtr<SVGLengthList> AnimatableStrokeDasharrayList::toSVGLength
List() const |
49 { | 49 { |
50 RefPtr<SVGLengthList> lengths = SVGLengthList::create(); | 50 RefPtrWillBeRawPtr<SVGLengthList> lengths = SVGLengthList::create(); |
51 for (size_t i = 0; i < m_values.size(); ++i) { | 51 for (size_t i = 0; i < m_values.size(); ++i) { |
52 RefPtr<SVGLength> length = toAnimatableSVGLength(m_values[i].get())->toS
VGLength()->clone(); | 52 RefPtrWillBeRawPtr<SVGLength> length = toAnimatableSVGLength(m_values[i]
.get())->toSVGLength()->clone(); |
53 if (length->valueInSpecifiedUnits() < 0) | 53 if (length->valueInSpecifiedUnits() < 0) |
54 length->setValueInSpecifiedUnits(0); | 54 length->setValueInSpecifiedUnits(0); |
55 lengths->append(length); | 55 lengths->append(length); |
56 } | 56 } |
57 return lengths.release(); | 57 return lengths.release(); |
58 } | 58 } |
59 | 59 |
60 bool AnimatableStrokeDasharrayList::usesDefaultInterpolationWith(const Animatabl
eValue* value) const | 60 bool AnimatableStrokeDasharrayList::usesDefaultInterpolationWith(const Animatabl
eValue* value) const |
61 { | 61 { |
62 return false; | 62 return false; |
(...skipping 28 matching lines...) Expand all Loading... |
91 ASSERT_UNUSED(success, success); | 91 ASSERT_UNUSED(success, success); |
92 return adoptRefWillBeNoop(new AnimatableStrokeDasharrayList(interpolatedValu
es)); | 92 return adoptRefWillBeNoop(new AnimatableStrokeDasharrayList(interpolatedValu
es)); |
93 } | 93 } |
94 | 94 |
95 void AnimatableStrokeDasharrayList::trace(Visitor* visitor) | 95 void AnimatableStrokeDasharrayList::trace(Visitor* visitor) |
96 { | 96 { |
97 AnimatableRepeatable::trace(visitor); | 97 AnimatableRepeatable::trace(visitor); |
98 } | 98 } |
99 | 99 |
100 } // namespace blink | 100 } // namespace blink |
OLD | NEW |