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

Unified Diff: Source/core/svg/SVGIntegerOptionalInteger.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/SVGIntegerOptionalInteger.h ('k') | Source/core/svg/SVGLength.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGIntegerOptionalInteger.cpp
diff --git a/Source/core/svg/SVGIntegerOptionalInteger.cpp b/Source/core/svg/SVGIntegerOptionalInteger.cpp
index 98415a4cbf07ef4879ba51be425be625fc3078e7..195a95545d65c1bc8e9ee411fb563cbc130332a9 100644
--- a/Source/core/svg/SVGIntegerOptionalInteger.cpp
+++ b/Source/core/svg/SVGIntegerOptionalInteger.cpp
@@ -36,19 +36,26 @@
namespace blink {
-SVGIntegerOptionalInteger::SVGIntegerOptionalInteger(PassRefPtr<SVGInteger> firstInteger, PassRefPtr<SVGInteger> secondInteger)
+SVGIntegerOptionalInteger::SVGIntegerOptionalInteger(PassRefPtrWillBeRawPtr<SVGInteger> firstInteger, PassRefPtrWillBeRawPtr<SVGInteger> secondInteger)
: SVGPropertyBase(classType())
, m_firstInteger(firstInteger)
, m_secondInteger(secondInteger)
{
}
-PassRefPtr<SVGIntegerOptionalInteger> SVGIntegerOptionalInteger::clone() const
+void SVGIntegerOptionalInteger::trace(Visitor* visitor)
+{
+ visitor->trace(m_firstInteger);
+ visitor->trace(m_secondInteger);
+ SVGPropertyBase::trace(visitor);
+}
+
+PassRefPtrWillBeRawPtr<SVGIntegerOptionalInteger> SVGIntegerOptionalInteger::clone() const
{
return SVGIntegerOptionalInteger::create(m_firstInteger->clone(), m_secondInteger->clone());
}
-PassRefPtr<SVGPropertyBase> SVGIntegerOptionalInteger::cloneForAnimation(const String& value) const
+PassRefPtrWillBeRawPtr<SVGPropertyBase> SVGIntegerOptionalInteger::cloneForAnimation(const String& value) const
{
float floatX, floatY;
if (!parseNumberOptionalNumber(value, floatX, floatY)) {
@@ -84,19 +91,19 @@ void SVGIntegerOptionalInteger::setValueAsString(const String& value, ExceptionS
void SVGIntegerOptionalInteger::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement*)
{
- RefPtr<SVGIntegerOptionalInteger> otherIntegerOptionalInteger = toSVGIntegerOptionalInteger(other);
+ RefPtrWillBeRawPtr<SVGIntegerOptionalInteger> otherIntegerOptionalInteger = toSVGIntegerOptionalInteger(other);
m_firstInteger->setValue(m_firstInteger->value() + otherIntegerOptionalInteger->m_firstInteger->value());
m_secondInteger->setValue(m_secondInteger->value() + otherIntegerOptionalInteger->m_secondInteger->value());
}
-void SVGIntegerOptionalInteger::calculateAnimatedValue(SVGAnimationElement* animationElement, float percentage, unsigned repeatCount, PassRefPtr<SVGPropertyBase> from, PassRefPtr<SVGPropertyBase> to, PassRefPtr<SVGPropertyBase> toAtEndOfDuration, SVGElement*)
+void SVGIntegerOptionalInteger::calculateAnimatedValue(SVGAnimationElement* animationElement, float percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWillBeRawPtr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDuration, SVGElement*)
{
ASSERT(animationElement);
- RefPtr<SVGIntegerOptionalInteger> fromInteger = toSVGIntegerOptionalInteger(from);
- RefPtr<SVGIntegerOptionalInteger> toInteger = toSVGIntegerOptionalInteger(to);
- RefPtr<SVGIntegerOptionalInteger> toAtEndOfDurationInteger = toSVGIntegerOptionalInteger(toAtEndOfDuration);
+ RefPtrWillBeRawPtr<SVGIntegerOptionalInteger> fromInteger = toSVGIntegerOptionalInteger(from);
+ RefPtrWillBeRawPtr<SVGIntegerOptionalInteger> toInteger = toSVGIntegerOptionalInteger(to);
+ RefPtrWillBeRawPtr<SVGIntegerOptionalInteger> toAtEndOfDurationInteger = toSVGIntegerOptionalInteger(toAtEndOfDuration);
float x = m_firstInteger->value();
float y = m_secondInteger->value();
@@ -106,7 +113,7 @@ void SVGIntegerOptionalInteger::calculateAnimatedValue(SVGAnimationElement* anim
m_secondInteger->setValue(static_cast<int>(roundf(y)));
}
-float SVGIntegerOptionalInteger::calculateDistance(PassRefPtr<SVGPropertyBase> other, SVGElement*)
+float SVGIntegerOptionalInteger::calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement*)
{
// FIXME: Distance calculation is not possible for SVGIntegerOptionalInteger right now. We need the distance for every single value.
return -1;
« no previous file with comments | « Source/core/svg/SVGIntegerOptionalInteger.h ('k') | Source/core/svg/SVGLength.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698