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

Unified Diff: Source/core/svg/SVGNumberOptionalNumber.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/SVGNumberOptionalNumber.h ('k') | Source/core/svg/SVGNumberTearOff.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGNumberOptionalNumber.cpp
diff --git a/Source/core/svg/SVGNumberOptionalNumber.cpp b/Source/core/svg/SVGNumberOptionalNumber.cpp
index 9ea6873f4b22e322d971023037476077b8753b9d..866c60e3b968777279bd019e4006dc05acec8b36 100644
--- a/Source/core/svg/SVGNumberOptionalNumber.cpp
+++ b/Source/core/svg/SVGNumberOptionalNumber.cpp
@@ -36,19 +36,26 @@
namespace blink {
-SVGNumberOptionalNumber::SVGNumberOptionalNumber(PassRefPtr<SVGNumber> firstNumber, PassRefPtr<SVGNumber> secondNumber)
+SVGNumberOptionalNumber::SVGNumberOptionalNumber(PassRefPtrWillBeRawPtr<SVGNumber> firstNumber, PassRefPtrWillBeRawPtr<SVGNumber> secondNumber)
: SVGPropertyBase(classType())
, m_firstNumber(firstNumber)
, m_secondNumber(secondNumber)
{
}
-PassRefPtr<SVGNumberOptionalNumber> SVGNumberOptionalNumber::clone() const
+void SVGNumberOptionalNumber::trace(Visitor* visitor)
+{
+ visitor->trace(m_firstNumber);
+ visitor->trace(m_secondNumber);
+ SVGPropertyBase::trace(visitor);
+}
+
+PassRefPtrWillBeRawPtr<SVGNumberOptionalNumber> SVGNumberOptionalNumber::clone() const
{
return SVGNumberOptionalNumber::create(m_firstNumber->clone(), m_secondNumber->clone());
}
-PassRefPtr<SVGPropertyBase> SVGNumberOptionalNumber::cloneForAnimation(const String& value) const
+PassRefPtrWillBeRawPtr<SVGPropertyBase> SVGNumberOptionalNumber::cloneForAnimation(const String& value) const
{
float x, y;
if (!parseNumberOptionalNumber(value, x, y)) {
@@ -81,19 +88,19 @@ void SVGNumberOptionalNumber::setValueAsString(const String& value, ExceptionSta
void SVGNumberOptionalNumber::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement*)
{
- RefPtr<SVGNumberOptionalNumber> otherNumberOptionalNumber = toSVGNumberOptionalNumber(other);
+ RefPtrWillBeRawPtr<SVGNumberOptionalNumber> otherNumberOptionalNumber = toSVGNumberOptionalNumber(other);
m_firstNumber->setValue(m_firstNumber->value() + otherNumberOptionalNumber->m_firstNumber->value());
m_secondNumber->setValue(m_secondNumber->value() + otherNumberOptionalNumber->m_secondNumber->value());
}
-void SVGNumberOptionalNumber::calculateAnimatedValue(SVGAnimationElement* animationElement, float percentage, unsigned repeatCount, PassRefPtr<SVGPropertyBase> from, PassRefPtr<SVGPropertyBase> to, PassRefPtr<SVGPropertyBase> toAtEndOfDuration, SVGElement*)
+void SVGNumberOptionalNumber::calculateAnimatedValue(SVGAnimationElement* animationElement, float percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWillBeRawPtr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDuration, SVGElement*)
{
ASSERT(animationElement);
- RefPtr<SVGNumberOptionalNumber> fromNumber = toSVGNumberOptionalNumber(from);
- RefPtr<SVGNumberOptionalNumber> toNumber = toSVGNumberOptionalNumber(to);
- RefPtr<SVGNumberOptionalNumber> toAtEndOfDurationNumber = toSVGNumberOptionalNumber(toAtEndOfDuration);
+ RefPtrWillBeRawPtr<SVGNumberOptionalNumber> fromNumber = toSVGNumberOptionalNumber(from);
+ RefPtrWillBeRawPtr<SVGNumberOptionalNumber> toNumber = toSVGNumberOptionalNumber(to);
+ RefPtrWillBeRawPtr<SVGNumberOptionalNumber> toAtEndOfDurationNumber = toSVGNumberOptionalNumber(toAtEndOfDuration);
float x = m_firstNumber->value();
float y = m_secondNumber->value();
@@ -103,7 +110,7 @@ void SVGNumberOptionalNumber::calculateAnimatedValue(SVGAnimationElement* animat
m_secondNumber->setValue(y);
}
-float SVGNumberOptionalNumber::calculateDistance(PassRefPtr<SVGPropertyBase> other, SVGElement*)
+float SVGNumberOptionalNumber::calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement*)
{
// FIXME: Distance calculation is not possible for SVGNumberOptionalNumber right now. We need the distance for every single value.
return -1;
« no previous file with comments | « Source/core/svg/SVGNumberOptionalNumber.h ('k') | Source/core/svg/SVGNumberTearOff.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698