Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: Source/core/svg/SVGAnimatedIntegerOptionalInteger.cpp

Issue 678163002: Oilpan: move SVG property hierarchy to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased upto r185213 Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 32
33 #include "core/svg/SVGAnimatedIntegerOptionalInteger.h" 33 #include "core/svg/SVGAnimatedIntegerOptionalInteger.h"
34 34
35 #include "core/svg/SVGElement.h"
36
35 namespace blink { 37 namespace blink {
36 38
37 SVGAnimatedIntegerOptionalInteger::SVGAnimatedIntegerOptionalInteger(SVGElement* contextElement, const QualifiedName& attributeName, float initialFirstValue, fl oat initialSecondValue) 39 SVGAnimatedIntegerOptionalInteger::SVGAnimatedIntegerOptionalInteger(SVGElement* contextElement, const QualifiedName& attributeName, float initialFirstValue, fl oat initialSecondValue)
38 : SVGAnimatedPropertyCommon<SVGIntegerOptionalInteger>(contextElement, attri buteName, 40 : SVGAnimatedPropertyCommon<SVGIntegerOptionalInteger>(contextElement, attri buteName,
39 SVGIntegerOptionalInteger::create(SVGInteger::create(initialFirstValue), SVGInteger::create(initialSecondValue))) 41 SVGIntegerOptionalInteger::create(SVGInteger::create(initialFirstValue), SVGInteger::create(initialSecondValue)))
40 , m_firstInteger(SVGAnimatedInteger::create(contextElement, attributeName, b aseValue()->firstInteger())) 42 , m_firstInteger(SVGAnimatedInteger::create(contextElement, attributeName, b aseValue()->firstInteger()))
41 , m_secondInteger(SVGAnimatedInteger::create(contextElement, attributeName, baseValue()->secondInteger())) 43 , m_secondInteger(SVGAnimatedInteger::create(contextElement, attributeName, baseValue()->secondInteger()))
42 { 44 {
43 m_firstInteger->setParentOptionalInteger(this); 45 m_firstInteger->setParentOptionalInteger(this);
44 m_secondInteger->setParentOptionalInteger(this); 46 m_secondInteger->setParentOptionalInteger(this);
45 } 47 }
46 48
47 void SVGAnimatedIntegerOptionalInteger::setAnimatedValue(PassRefPtr<SVGPropertyB ase> value) 49 void SVGAnimatedIntegerOptionalInteger::trace(Visitor* visitor)
50 {
51 visitor->trace(m_firstInteger);
52 visitor->trace(m_secondInteger);
53 SVGAnimatedPropertyCommon<SVGIntegerOptionalInteger>::trace(visitor);
54 }
55
56 void SVGAnimatedIntegerOptionalInteger::setAnimatedValue(PassRefPtrWillBeRawPtr< SVGPropertyBase> value)
48 { 57 {
49 SVGAnimatedPropertyCommon<SVGIntegerOptionalInteger>::setAnimatedValue(value ); 58 SVGAnimatedPropertyCommon<SVGIntegerOptionalInteger>::setAnimatedValue(value );
50 m_firstInteger->setAnimatedValue(currentValue()->firstInteger()); 59 m_firstInteger->setAnimatedValue(currentValue()->firstInteger());
51 m_secondInteger->setAnimatedValue(currentValue()->secondInteger()); 60 m_secondInteger->setAnimatedValue(currentValue()->secondInteger());
52 } 61 }
53 62
54 void SVGAnimatedIntegerOptionalInteger::animationEnded() 63 void SVGAnimatedIntegerOptionalInteger::animationEnded()
55 { 64 {
56 SVGAnimatedPropertyCommon<SVGIntegerOptionalInteger>::animationEnded(); 65 SVGAnimatedPropertyCommon<SVGIntegerOptionalInteger>::animationEnded();
57 m_firstInteger->animationEnded(); 66 m_firstInteger->animationEnded();
58 m_secondInteger->animationEnded(); 67 m_secondInteger->animationEnded();
59 } 68 }
60 69
61 bool SVGAnimatedIntegerOptionalInteger::needsSynchronizeAttribute() 70 bool SVGAnimatedIntegerOptionalInteger::needsSynchronizeAttribute()
62 { 71 {
63 return m_firstInteger->needsSynchronizeAttribute() 72 return m_firstInteger->needsSynchronizeAttribute()
64 || m_secondInteger->needsSynchronizeAttribute(); 73 || m_secondInteger->needsSynchronizeAttribute();
65 } 74 }
66 75
67 } 76 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAnimatedIntegerOptionalInteger.h ('k') | Source/core/svg/SVGAnimatedLength.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698