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 23 matching lines...) Expand all Loading... |
34 #include "core/svg/SVGAnimatedInteger.h" | 34 #include "core/svg/SVGAnimatedInteger.h" |
35 #include "core/svg/SVGIntegerOptionalInteger.h" | 35 #include "core/svg/SVGIntegerOptionalInteger.h" |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 // SVG Spec: http://www.w3.org/TR/SVG11/types.html <number-optional-number> | 39 // SVG Spec: http://www.w3.org/TR/SVG11/types.html <number-optional-number> |
40 // Unlike other SVGAnimated* class, this class is not exposed to Javascript dire
ctly, | 40 // Unlike other SVGAnimated* class, this class is not exposed to Javascript dire
ctly, |
41 // while DOM attribute and SMIL animations operate on this class. | 41 // while DOM attribute and SMIL animations operate on this class. |
42 // From Javascript, the two SVGAnimatedIntegers |firstInteger| and |secondIntege
r| are used. | 42 // From Javascript, the two SVGAnimatedIntegers |firstInteger| and |secondIntege
r| are used. |
43 // For example, see SVGFEDropShadowElement::stdDeviation{X,Y}() | 43 // For example, see SVGFEDropShadowElement::stdDeviation{X,Y}() |
44 class SVGAnimatedIntegerOptionalInteger : public NewSVGAnimatedPropertyCommon<SV
GIntegerOptionalInteger> { | 44 class SVGAnimatedIntegerOptionalInteger : public SVGAnimatedPropertyCommon<SVGIn
tegerOptionalInteger> { |
45 public: | 45 public: |
46 static PassRefPtr<SVGAnimatedIntegerOptionalInteger> create(SVGElement* cont
extElement, const QualifiedName& attributeName, float initialFirstValue = 0, flo
at initialSecondValue = 0) | 46 static PassRefPtr<SVGAnimatedIntegerOptionalInteger> create(SVGElement* cont
extElement, const QualifiedName& attributeName, float initialFirstValue = 0, flo
at initialSecondValue = 0) |
47 { | 47 { |
48 return adoptRef(new SVGAnimatedIntegerOptionalInteger(contextElement, at
tributeName, initialFirstValue, initialSecondValue)); | 48 return adoptRef(new SVGAnimatedIntegerOptionalInteger(contextElement, at
tributeName, initialFirstValue, initialSecondValue)); |
49 } | 49 } |
50 | 50 |
51 virtual void animationStarted() OVERRIDE; | 51 virtual void animationStarted() OVERRIDE; |
52 virtual void setAnimatedValue(PassRefPtr<NewSVGPropertyBase>) OVERRIDE; | 52 virtual void setAnimatedValue(PassRefPtr<SVGPropertyBase>) OVERRIDE; |
53 virtual bool needsSynchronizeAttribute() OVERRIDE; | 53 virtual bool needsSynchronizeAttribute() OVERRIDE; |
54 virtual void animationEnded() OVERRIDE; | 54 virtual void animationEnded() OVERRIDE; |
55 | 55 |
56 SVGAnimatedInteger* firstInteger() { return m_firstInteger.get(); } | 56 SVGAnimatedInteger* firstInteger() { return m_firstInteger.get(); } |
57 SVGAnimatedInteger* secondInteger() { return m_secondInteger.get(); } | 57 SVGAnimatedInteger* secondInteger() { return m_secondInteger.get(); } |
58 | 58 |
59 protected: | 59 protected: |
60 SVGAnimatedIntegerOptionalInteger(SVGElement* contextElement, const Qualifie
dName& attributeName, float initialFirstValue, float initialSecondValue); | 60 SVGAnimatedIntegerOptionalInteger(SVGElement* contextElement, const Qualifie
dName& attributeName, float initialFirstValue, float initialSecondValue); |
61 | 61 |
62 RefPtr<SVGAnimatedInteger> m_firstInteger; | 62 RefPtr<SVGAnimatedInteger> m_firstInteger; |
63 RefPtr<SVGAnimatedInteger> m_secondInteger; | 63 RefPtr<SVGAnimatedInteger> m_secondInteger; |
64 }; | 64 }; |
65 | 65 |
66 } // namespace WebCore | 66 } // namespace WebCore |
67 | 67 |
68 #endif // SVGAnimatedIntegerOptionalInteger_h | 68 #endif // SVGAnimatedIntegerOptionalInteger_h |
OLD | NEW |