Skip to content
Permalink
Browse files
Remove PassRefPtr from svg/properties classes.
https://bugs.webkit.org/show_bug.cgi?id=142063.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-03-10
Reviewed by Darin Adler.
Source/WebCore:

Remove PassRefPtr from svg/properties classes. All the return types and
the local variables should be RefPtr. If we are sure the pointer can't
be null, we use Ref instead.

* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
(WebCore::SVGMarkerElement::orientTypeAnimated):
* svg/SVGMarkerElement.h:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::lookupOrCreateDWrapper):
(WebCore::SVGPathElement::pathSegList):
(WebCore::SVGPathElement::animatedPathSegList):
* svg/SVGPathElement.h:
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
(WebCore::SVGPolyElement::points):
(WebCore::SVGPolyElement::animatedPoints):
* svg/SVGPolyElement.h:
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
(WebCore::SVGTextContentElement::textLengthAnimated):
* svg/SVGTextContentElement.h:
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::transform):
(WebCore::SVGViewSpec::viewBoxAnimated):
(WebCore::SVGViewSpec::preserveAspectRatioAnimated):
(WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
(WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
(WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
* svg/SVGViewSpec.h:
* svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
(WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
* svg/properties/SVGAnimatedListPropertyTearOff.h:
(WebCore::SVGAnimatedListPropertyTearOff::create):
* svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
(WebCore::SVGAnimatedPathSegListPropertyTearOff::create):
* svg/properties/SVGAnimatedProperty.h:
(WebCore::SVGAnimatedProperty::lookupOrCreateWrapper):
* svg/properties/SVGAnimatedPropertyMacros.h:
* svg/properties/SVGAnimatedPropertyTearOff.h:
(WebCore::SVGAnimatedPropertyTearOff::create):
* svg/properties/SVGAnimatedStaticPropertyTearOff.h:
(WebCore::SVGAnimatedStaticPropertyTearOff::create):
* svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
(WebCore::SVGAnimatedTransformListPropertyTearOff::create):
* svg/properties/SVGListProperty.h:
(WebCore::SVGListProperty::initializeValuesAndWrappers):
(WebCore::SVGListProperty::getItemValuesAndWrappers):
(WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
(WebCore::SVGListProperty::replaceItemValuesAndWrappers):
(WebCore::SVGListProperty::removeItemValuesAndWrappers):
(WebCore::SVGListProperty::appendItemValuesAndWrappers):
* svg/properties/SVGListPropertyTearOff.h:
(WebCore::SVGListPropertyTearOff::create):
(WebCore::SVGListPropertyTearOff::initialize):
(WebCore::SVGListPropertyTearOff::getItem):
(WebCore::SVGListPropertyTearOff::insertItemBefore):
(WebCore::SVGListPropertyTearOff::replaceItem):
(WebCore::SVGListPropertyTearOff::removeItem):
(WebCore::SVGListPropertyTearOff::appendItem):
* svg/properties/SVGPathSegListPropertyTearOff.cpp:
(WebCore::SVGPathSegListPropertyTearOff::getItem):
(WebCore::SVGPathSegListPropertyTearOff::replaceItem):
(WebCore::SVGPathSegListPropertyTearOff::removeItem):
* svg/properties/SVGPathSegListPropertyTearOff.h:
(WebCore::SVGPathSegListPropertyTearOff::create):
(WebCore::SVGPathSegListPropertyTearOff::initialize):
(WebCore::SVGPathSegListPropertyTearOff::insertItemBefore):
(WebCore::SVGPathSegListPropertyTearOff::appendItem):
* svg/properties/SVGPropertyInfo.h:
* svg/properties/SVGStaticListPropertyTearOff.h:
(WebCore::SVGStaticListPropertyTearOff::create):
* svg/properties/SVGStaticPropertyTearOff.h:
(WebCore::SVGStaticPropertyTearOff::create):
* svg/properties/SVGTransformListPropertyTearOff.h:
(WebCore::SVGTransformListPropertyTearOff::create):
(WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
(WebCore::SVGTransformListPropertyTearOff::consolidate):

Source/WTF:

* wtf/Ref.h:
(WTF::static_reference_cast): Add a stat_cast function to Ref<>.

Canonical link: https://commits.webkit.org/160585@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Said Abou-Hallawa authored and webkit-commit-queue committed Mar 10, 2015
1 parent 9b15b21 commit ecd5a3eb7288ba263d94bd53b2f9e38285ead8af
Showing 29 changed files with 237 additions and 138 deletions.
@@ -1,3 +1,13 @@
2015-03-10 Said Abou-Hallawa <sabouhallawa@apple.com>

Remove PassRefPtr from svg/properties classes.
https://bugs.webkit.org/show_bug.cgi?id=142063.

Reviewed by Darin Adler.

* wtf/Ref.h:
(WTF::static_reference_cast): Add a stat_cast function to Ref<>.

2015-03-10 Mark Lam <mark.lam@apple.com>

[Win] JSC Build Warnings Need to be Resolved.
@@ -148,6 +148,16 @@ template<typename T> template<typename U> inline Ref<T> Ref<T>::replace(Ref<U>&&
return oldReference;
}

template<typename T, typename U> inline Ref<T> static_reference_cast(Ref<U>& reference)
{
return Ref<T>(static_cast<T&>(reference.get()));
}

template<typename T, typename U> inline Ref<T> static_reference_cast(const Ref<U>& reference)
{
return Ref<T>(static_cast<T&>(reference.copyRef().get()));
}

template <typename T>
struct GetPtrHelper<Ref<T>> {
typedef T* PtrType;
@@ -166,5 +176,6 @@ inline Ref<T> adoptRef(T& reference)

using WTF::Ref;
using WTF::adoptRef;
using WTF::static_reference_cast;

#endif // WTF_Ref_h
@@ -1,3 +1,89 @@
2015-03-10 Said Abou-Hallawa <sabouhallawa@apple.com>

Remove PassRefPtr from svg/properties classes.
https://bugs.webkit.org/show_bug.cgi?id=142063.

Reviewed by Darin Adler.

Remove PassRefPtr from svg/properties classes. All the return types and
the local variables should be RefPtr. If we are sure the pointer can't
be null, we use Ref instead.

* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
(WebCore::SVGMarkerElement::orientTypeAnimated):
* svg/SVGMarkerElement.h:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::lookupOrCreateDWrapper):
(WebCore::SVGPathElement::pathSegList):
(WebCore::SVGPathElement::animatedPathSegList):
* svg/SVGPathElement.h:
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
(WebCore::SVGPolyElement::points):
(WebCore::SVGPolyElement::animatedPoints):
* svg/SVGPolyElement.h:
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
(WebCore::SVGTextContentElement::textLengthAnimated):
* svg/SVGTextContentElement.h:
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::transform):
(WebCore::SVGViewSpec::viewBoxAnimated):
(WebCore::SVGViewSpec::preserveAspectRatioAnimated):
(WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
(WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
(WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
* svg/SVGViewSpec.h:
* svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
(WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
* svg/properties/SVGAnimatedListPropertyTearOff.h:
(WebCore::SVGAnimatedListPropertyTearOff::create):
* svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
(WebCore::SVGAnimatedPathSegListPropertyTearOff::create):
* svg/properties/SVGAnimatedProperty.h:
(WebCore::SVGAnimatedProperty::lookupOrCreateWrapper):
* svg/properties/SVGAnimatedPropertyMacros.h:
* svg/properties/SVGAnimatedPropertyTearOff.h:
(WebCore::SVGAnimatedPropertyTearOff::create):
* svg/properties/SVGAnimatedStaticPropertyTearOff.h:
(WebCore::SVGAnimatedStaticPropertyTearOff::create):
* svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
(WebCore::SVGAnimatedTransformListPropertyTearOff::create):
* svg/properties/SVGListProperty.h:
(WebCore::SVGListProperty::initializeValuesAndWrappers):
(WebCore::SVGListProperty::getItemValuesAndWrappers):
(WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
(WebCore::SVGListProperty::replaceItemValuesAndWrappers):
(WebCore::SVGListProperty::removeItemValuesAndWrappers):
(WebCore::SVGListProperty::appendItemValuesAndWrappers):
* svg/properties/SVGListPropertyTearOff.h:
(WebCore::SVGListPropertyTearOff::create):
(WebCore::SVGListPropertyTearOff::initialize):
(WebCore::SVGListPropertyTearOff::getItem):
(WebCore::SVGListPropertyTearOff::insertItemBefore):
(WebCore::SVGListPropertyTearOff::replaceItem):
(WebCore::SVGListPropertyTearOff::removeItem):
(WebCore::SVGListPropertyTearOff::appendItem):
* svg/properties/SVGPathSegListPropertyTearOff.cpp:
(WebCore::SVGPathSegListPropertyTearOff::getItem):
(WebCore::SVGPathSegListPropertyTearOff::replaceItem):
(WebCore::SVGPathSegListPropertyTearOff::removeItem):
* svg/properties/SVGPathSegListPropertyTearOff.h:
(WebCore::SVGPathSegListPropertyTearOff::create):
(WebCore::SVGPathSegListPropertyTearOff::initialize):
(WebCore::SVGPathSegListPropertyTearOff::insertItemBefore):
(WebCore::SVGPathSegListPropertyTearOff::appendItem):
* svg/properties/SVGPropertyInfo.h:
* svg/properties/SVGStaticListPropertyTearOff.h:
(WebCore::SVGStaticListPropertyTearOff::create):
* svg/properties/SVGStaticPropertyTearOff.h:
(WebCore::SVGStaticPropertyTearOff::create):
* svg/properties/SVGTransformListPropertyTearOff.h:
(WebCore::SVGTransformListPropertyTearOff::create):
(WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
(WebCore::SVGTransformListPropertyTearOff::consolidate):

2015-03-10 Timothy Horton <timothy_horton@apple.com>

Fix the build
@@ -239,7 +239,7 @@ void SVGMarkerElement::synchronizeOrientType(SVGElement* contextElement)
ownerType.m_orientType.synchronize(&ownerType, orientTypePropertyInfo()->attributeName, autoString);
}

PassRefPtr<SVGAnimatedProperty> SVGMarkerElement::lookupOrCreateOrientTypeWrapper(SVGElement* contextElement)
Ref<SVGAnimatedProperty> SVGMarkerElement::lookupOrCreateOrientTypeWrapper(SVGElement* contextElement)
{
ASSERT(contextElement);
SVGMarkerElement& ownerType = downcast<SVGMarkerElement>(*contextElement);
@@ -258,10 +258,10 @@ SVGMarkerOrientType& SVGMarkerElement::orientType() const
return m_orientType.value;
}

PassRefPtr<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType>> SVGMarkerElement::orientTypeAnimated()
Ref<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType>> SVGMarkerElement::orientTypeAnimated()
{
m_orientType.shouldSynchronize = true;
return static_pointer_cast<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType>>(lookupOrCreateOrientTypeWrapper(this));
return static_reference_cast<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType>>(lookupOrCreateOrientTypeWrapper(this));
}

}
@@ -157,11 +157,11 @@ class SVGMarkerElement final : public SVGElement,
public:
// Custom 'orientType' property.
static void synchronizeOrientType(SVGElement* contextElement);
static PassRefPtr<SVGAnimatedProperty> lookupOrCreateOrientTypeWrapper(SVGElement* contextElement);
static Ref<SVGAnimatedProperty> lookupOrCreateOrientTypeWrapper(SVGElement* contextElement);
SVGMarkerOrientType& orientType() const;
SVGMarkerOrientType& orientTypeBaseValue() const { return m_orientType.value; }
void setOrientTypeBaseValue(const SVGMarkerOrientType& type) { m_orientType.value = type; }
PassRefPtr<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType>> orientTypeAnimated();
Ref<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType>> orientTypeAnimated();

private:
mutable SVGSynchronizableAnimatedProperty<SVGMarkerOrientType> m_orientType;
@@ -311,13 +311,13 @@ SVGPathByteStream* SVGPathElement::pathByteStream() const
return static_cast<SVGAnimatedPathSegListPropertyTearOff*>(property)->animatedPathByteStream();
}

PassRefPtr<SVGAnimatedProperty> SVGPathElement::lookupOrCreateDWrapper(SVGElement* contextElement)
Ref<SVGAnimatedProperty> SVGPathElement::lookupOrCreateDWrapper(SVGElement* contextElement)
{
ASSERT(contextElement);
SVGPathElement& ownerType = downcast<SVGPathElement>(*contextElement);

if (SVGAnimatedProperty* property = SVGAnimatedProperty::lookupWrapper<SVGPathElement, SVGAnimatedPathSegListPropertyTearOff>(&ownerType, dPropertyInfo()))
return property;
return *property;

// Build initial SVGPathSegList.
buildSVGPathSegListFromByteStream(ownerType.m_pathByteStream.get(), &ownerType, ownerType.m_pathSegList.value, UnalteredParsing);
@@ -338,7 +338,7 @@ void SVGPathElement::synchronizeD(SVGElement* contextElement)
SVGPathSegListPropertyTearOff* SVGPathElement::pathSegList()
{
m_pathSegList.shouldSynchronize = true;
return static_cast<SVGPathSegListPropertyTearOff*>(static_pointer_cast<SVGAnimatedPathSegListPropertyTearOff>(lookupOrCreateDWrapper(this))->baseVal());
return static_cast<SVGPathSegListPropertyTearOff*>(static_reference_cast<SVGAnimatedPathSegListPropertyTearOff>(lookupOrCreateDWrapper(this))->baseVal());
}

SVGPathSegListPropertyTearOff* SVGPathElement::normalizedPathSegList()
@@ -351,7 +351,7 @@ SVGPathSegListPropertyTearOff* SVGPathElement::animatedPathSegList()
{
m_pathSegList.shouldSynchronize = true;
m_isAnimValObserved = true;
return static_cast<SVGPathSegListPropertyTearOff*>(static_pointer_cast<SVGAnimatedPathSegListPropertyTearOff>(lookupOrCreateDWrapper(this))->animVal());
return static_cast<SVGPathSegListPropertyTearOff*>(static_reference_cast<SVGAnimatedPathSegListPropertyTearOff>(lookupOrCreateDWrapper(this))->animVal());
}

SVGPathSegListPropertyTearOff* SVGPathElement::animatedNormalizedPathSegList()
@@ -109,7 +109,7 @@ class SVGPathElement final : public SVGGraphicsElement,

// Custom 'd' property
static void synchronizeD(SVGElement* contextElement);
static PassRefPtr<SVGAnimatedProperty> lookupOrCreateDWrapper(SVGElement* contextElement);
static Ref<SVGAnimatedProperty> lookupOrCreateDWrapper(SVGElement* contextElement);

BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGPathElement)
DECLARE_ANIMATED_NUMBER(PathLength, pathLength)
@@ -137,7 +137,7 @@ void SVGPolyElement::synchronizePoints(SVGElement* contextElement)
ownerType.m_points.synchronize(&ownerType, pointsPropertyInfo()->attributeName, ownerType.m_points.value.valueAsString());
}

PassRefPtr<SVGAnimatedProperty> SVGPolyElement::lookupOrCreatePointsWrapper(SVGElement* contextElement)
Ref<SVGAnimatedProperty> SVGPolyElement::lookupOrCreatePointsWrapper(SVGElement* contextElement)
{
ASSERT(contextElement);
SVGPolyElement& ownerType = downcast<SVGPolyElement>(*contextElement);
@@ -148,13 +148,13 @@ PassRefPtr<SVGAnimatedProperty> SVGPolyElement::lookupOrCreatePointsWrapper(SVGE
SVGListPropertyTearOff<SVGPointList>* SVGPolyElement::points()
{
m_points.shouldSynchronize = true;
return static_cast<SVGListPropertyTearOff<SVGPointList>*>(static_pointer_cast<SVGAnimatedPointList>(lookupOrCreatePointsWrapper(this))->baseVal());
return static_cast<SVGListPropertyTearOff<SVGPointList>*>(static_reference_cast<SVGAnimatedPointList>(lookupOrCreatePointsWrapper(this))->baseVal());
}

SVGListPropertyTearOff<SVGPointList>* SVGPolyElement::animatedPoints()
{
m_points.shouldSynchronize = true;
return static_cast<SVGListPropertyTearOff<SVGPointList>*>(static_pointer_cast<SVGAnimatedPointList>(lookupOrCreatePointsWrapper(this))->animVal());
return static_cast<SVGListPropertyTearOff<SVGPointList>*>(static_reference_cast<SVGAnimatedPointList>(lookupOrCreatePointsWrapper(this))->animVal());
}

}
@@ -52,7 +52,7 @@ class SVGPolyElement : public SVGGraphicsElement, public SVGExternalResourcesReq

// Custom 'points' property
static void synchronizePoints(SVGElement* contextElement);
static PassRefPtr<SVGAnimatedProperty> lookupOrCreatePointsWrapper(SVGElement* contextElement);
static Ref<SVGAnimatedProperty> lookupOrCreatePointsWrapper(SVGElement* contextElement);

BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGPolyElement)
DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired)
@@ -81,22 +81,22 @@ void SVGTextContentElement::synchronizeTextLength(SVGElement* contextElement)
ownerType.m_textLength.synchronize(&ownerType, textLengthPropertyInfo()->attributeName, value);
}

PassRefPtr<SVGAnimatedProperty> SVGTextContentElement::lookupOrCreateTextLengthWrapper(SVGElement* contextElement)
Ref<SVGAnimatedProperty> SVGTextContentElement::lookupOrCreateTextLengthWrapper(SVGElement* contextElement)
{
ASSERT(contextElement);
SVGTextContentElement& ownerType = downcast<SVGTextContentElement>(*contextElement);
return SVGAnimatedProperty::lookupOrCreateWrapper<SVGTextContentElement, SVGAnimatedLength, SVGLength>
(&ownerType, textLengthPropertyInfo(), ownerType.m_textLength.value);
}

PassRefPtr<SVGAnimatedLength> SVGTextContentElement::textLengthAnimated()
Ref<SVGAnimatedLength> SVGTextContentElement::textLengthAnimated()
{
static NeverDestroyed<SVGLength> defaultTextLength(LengthModeOther);
if (m_specifiedTextLength == defaultTextLength)
m_textLength.value.newValueSpecifiedUnits(LengthTypeNumber, getComputedTextLength(), ASSERT_NO_EXCEPTION);

m_textLength.shouldSynchronize = true;
return static_pointer_cast<SVGAnimatedLength>(lookupOrCreateTextLengthWrapper(this));
return static_reference_cast<SVGAnimatedLength>(lookupOrCreateTextLengthWrapper(this));

}

@@ -88,7 +88,7 @@ class SVGTextContentElement : public SVGGraphicsElement, public SVGExternalResou
// textLength is not declared using the standard DECLARE_ANIMATED_LENGTH macro
// as its getter needs special handling (return getComputedTextLength(), instead of m_textLength).
SVGLength& specifiedTextLength() { return m_specifiedTextLength; }
PassRefPtr<SVGAnimatedLength> textLengthAnimated();
Ref<SVGAnimatedLength> textLengthAnimated();
static const SVGPropertyInfo* textLengthPropertyInfo();

protected:
@@ -109,7 +109,7 @@ class SVGTextContentElement : public SVGGraphicsElement, public SVGExternalResou

// Custom 'textLength' property
static void synchronizeTextLength(SVGElement* contextElement);
static PassRefPtr<SVGAnimatedProperty> lookupOrCreateTextLengthWrapper(SVGElement* contextElement);
static Ref<SVGAnimatedProperty> lookupOrCreateTextLengthWrapper(SVGElement* contextElement);
mutable SVGSynchronizableAnimatedProperty<SVGLength> m_textLength;
SVGLength m_specifiedTextLength;

@@ -148,40 +148,40 @@ SVGElement* SVGViewSpec::viewTarget() const
SVGTransformListPropertyTearOff* SVGViewSpec::transform()
{
if (!m_contextElement)
return 0;
return nullptr;
// Return the animVal here, as its readonly by default - which is exactly what we want here.
return static_cast<SVGTransformListPropertyTearOff*>(static_pointer_cast<SVGAnimatedTransformList>(lookupOrCreateTransformWrapper(this))->animVal());
return static_cast<SVGTransformListPropertyTearOff*>(static_reference_cast<SVGAnimatedTransformList>(lookupOrCreateTransformWrapper(this))->animVal());
}

PassRefPtr<SVGAnimatedRect> SVGViewSpec::viewBoxAnimated()
RefPtr<SVGAnimatedRect> SVGViewSpec::viewBoxAnimated()
{
if (!m_contextElement)
return 0;
return static_pointer_cast<SVGAnimatedRect>(lookupOrCreateViewBoxWrapper(this));
return nullptr;
return static_reference_cast<SVGAnimatedRect>(lookupOrCreateViewBoxWrapper(this));
}

PassRefPtr<SVGAnimatedPreserveAspectRatio> SVGViewSpec::preserveAspectRatioAnimated()
RefPtr<SVGAnimatedPreserveAspectRatio> SVGViewSpec::preserveAspectRatioAnimated()
{
if (!m_contextElement)
return 0;
return static_pointer_cast<SVGAnimatedPreserveAspectRatio>(lookupOrCreatePreserveAspectRatioWrapper(this));
return nullptr;
return static_reference_cast<SVGAnimatedPreserveAspectRatio>(lookupOrCreatePreserveAspectRatioWrapper(this));
}

PassRefPtr<SVGAnimatedProperty> SVGViewSpec::lookupOrCreateViewBoxWrapper(SVGViewSpec* ownerType)
Ref<SVGAnimatedProperty> SVGViewSpec::lookupOrCreateViewBoxWrapper(SVGViewSpec* ownerType)
{
ASSERT(ownerType);
ASSERT(ownerType->contextElement());
return SVGAnimatedProperty::lookupOrCreateWrapper<SVGElement, SVGAnimatedRect, FloatRect>(ownerType->contextElement(), viewBoxPropertyInfo(), ownerType->m_viewBox);
}

PassRefPtr<SVGAnimatedProperty> SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper(SVGViewSpec* ownerType)
Ref<SVGAnimatedProperty> SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper(SVGViewSpec* ownerType)
{
ASSERT(ownerType);
ASSERT(ownerType->contextElement());
return SVGAnimatedProperty::lookupOrCreateWrapper<SVGElement, SVGAnimatedPreserveAspectRatio, SVGPreserveAspectRatio>(ownerType->contextElement(), preserveAspectRatioPropertyInfo(), ownerType->m_preserveAspectRatio);
}

PassRefPtr<SVGAnimatedProperty> SVGViewSpec::lookupOrCreateTransformWrapper(SVGViewSpec* ownerType)
Ref<SVGAnimatedProperty> SVGViewSpec::lookupOrCreateTransformWrapper(SVGViewSpec* ownerType)
{
ASSERT(ownerType);
ASSERT(ownerType->contextElement());
@@ -72,13 +72,13 @@ class SVGViewSpec : public RefCounted<SVGViewSpec>
SVGTransformList transformBaseValue() const { return m_transform; }

// Custom animated 'viewBox' property.
PassRefPtr<SVGAnimatedRect> viewBoxAnimated();
RefPtr<SVGAnimatedRect> viewBoxAnimated();
FloatRect& viewBox() { return m_viewBox; }
FloatRect viewBoxBaseValue() const { return m_viewBox; }
void setViewBoxBaseValue(const FloatRect& viewBox) { m_viewBox = viewBox; }

// Custom animated 'preserveAspectRatio' property.
PassRefPtr<SVGAnimatedPreserveAspectRatio> preserveAspectRatioAnimated();
RefPtr<SVGAnimatedPreserveAspectRatio> preserveAspectRatioAnimated();
SVGPreserveAspectRatio& preserveAspectRatio() { return m_preserveAspectRatio; }
SVGPreserveAspectRatio preserveAspectRatioBaseValue() const { return m_preserveAspectRatio; }
void setPreserveAspectRatioBaseValue(const SVGPreserveAspectRatio& preserveAspectRatio) { m_preserveAspectRatio = preserveAspectRatio; }
@@ -94,9 +94,9 @@ class SVGViewSpec : public RefCounted<SVGViewSpec>
static const AtomicString& viewBoxIdentifier();
static const AtomicString& preserveAspectRatioIdentifier();

static PassRefPtr<SVGAnimatedProperty> lookupOrCreateTransformWrapper(SVGViewSpec* contextElement);
static PassRefPtr<SVGAnimatedProperty> lookupOrCreateViewBoxWrapper(SVGViewSpec* contextElement);
static PassRefPtr<SVGAnimatedProperty> lookupOrCreatePreserveAspectRatioWrapper(SVGViewSpec* contextElement);
static Ref<SVGAnimatedProperty> lookupOrCreateTransformWrapper(SVGViewSpec* contextElement);
static Ref<SVGAnimatedProperty> lookupOrCreateViewBoxWrapper(SVGViewSpec* contextElement);
static Ref<SVGAnimatedProperty> lookupOrCreatePreserveAspectRatioWrapper(SVGViewSpec* contextElement);

SVGElement* m_contextElement;
SVGZoomAndPanType m_zoomAndPan;

0 comments on commit ecd5a3e

Please sign in to comment.