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

Side by Side Diff: Source/core/animation/animatable/AnimatableSVGPaint.cpp

Issue 1276183004: Oilpan: Unship oilpan from temporary animation objects (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 months 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) 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 22 matching lines...) Expand all
33 33
34 namespace blink { 34 namespace blink {
35 35
36 bool AnimatableSVGPaint::usesDefaultInterpolationWith(const AnimatableValue* val ue) const 36 bool AnimatableSVGPaint::usesDefaultInterpolationWith(const AnimatableValue* val ue) const
37 { 37 {
38 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value); 38 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value);
39 return (paintType() != SVG_PAINTTYPE_RGBCOLOR || svgPaint->paintType() != SV G_PAINTTYPE_RGBCOLOR) 39 return (paintType() != SVG_PAINTTYPE_RGBCOLOR || svgPaint->paintType() != SV G_PAINTTYPE_RGBCOLOR)
40 && (visitedLinkPaintType() != SVG_PAINTTYPE_RGBCOLOR || svgPaint->visite dLinkPaintType() != SVG_PAINTTYPE_RGBCOLOR); 40 && (visitedLinkPaintType() != SVG_PAINTTYPE_RGBCOLOR || svgPaint->visite dLinkPaintType() != SVG_PAINTTYPE_RGBCOLOR);
41 } 41 }
42 42
43 PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableSVGPaint::interpolateTo(const AnimatableValue* value, double fraction) const 43 PassRefPtr<AnimatableValue> AnimatableSVGPaint::interpolateTo(const AnimatableVa lue* value, double fraction) const
44 { 44 {
45 if (usesDefaultInterpolationWith(value)) 45 if (usesDefaultInterpolationWith(value))
46 return defaultInterpolateTo(this, value, fraction); 46 return defaultInterpolateTo(this, value, fraction);
47 47
48 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value); 48 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value);
49 RefPtrWillBeRawPtr<AnimatableColor> color = toAnimatableColor(AnimatableValu e::interpolate(m_color.get(), svgPaint->m_color.get(), fraction).get()); 49 RefPtrWillBeRawPtr<AnimatableColor> color = toAnimatableColor(AnimatableValu e::interpolate(m_color.get(), svgPaint->m_color.get(), fraction).get());
50 if (fraction < 0.5) 50 if (fraction < 0.5)
51 return create(paintType(), visitedLinkPaintType(), color, uri(), visited LinkURI()); 51 return create(paintType(), visitedLinkPaintType(), color, uri(), visited LinkURI());
52 return create(svgPaint->paintType(), svgPaint->visitedLinkPaintType(), color , svgPaint->uri(), svgPaint->visitedLinkURI()); 52 return create(svgPaint->paintType(), svgPaint->visitedLinkPaintType(), color , svgPaint->uri(), svgPaint->visitedLinkURI());
53 } 53 }
54 54
55 bool AnimatableSVGPaint::equalTo(const AnimatableValue* value) const 55 bool AnimatableSVGPaint::equalTo(const AnimatableValue* value) const
56 { 56 {
57 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value); 57 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value);
58 return paintType() == svgPaint->paintType() 58 return paintType() == svgPaint->paintType()
59 && visitedLinkPaintType() == svgPaint->visitedLinkPaintType() 59 && visitedLinkPaintType() == svgPaint->visitedLinkPaintType()
60 && color() == svgPaint->color() 60 && color() == svgPaint->color()
61 && uri() == svgPaint->uri() 61 && uri() == svgPaint->uri()
62 && visitedLinkURI() == svgPaint->visitedLinkURI(); 62 && visitedLinkURI() == svgPaint->visitedLinkURI();
63 } 63 }
64 64
65 } 65 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698