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

Unified Diff: Source/WebCore/svg/SVGViewSpec.cpp

Issue 12194024: Merge 140975 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/svg/SVGViewSpec.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/svg/SVGViewSpec.cpp
===================================================================
--- Source/WebCore/svg/SVGViewSpec.cpp (revision 141793)
+++ Source/WebCore/svg/SVGViewSpec.cpp (working copy)
@@ -133,13 +133,6 @@
return SVGPropertyTraits<FloatRect>::toString(viewBoxBaseValue());
}
-void SVGViewSpec::setPreserveAspectRatioString(const String& preserve)
-{
- SVGPreserveAspectRatio preserveAspectRatio;
- preserveAspectRatio.parse(preserve);
- setPreserveAspectRatioBaseValue(preserveAspectRatio);
-}
-
String SVGViewSpec::preserveAspectRatioString() const
{
return SVGPropertyTraits<SVGPreserveAspectRatio>::toString(preserveAspectRatioBaseValue());
@@ -154,14 +147,31 @@
SVGTransformListPropertyTearOff* SVGViewSpec::transform()
{
+ if (!m_contextElement)
+ return 0;
// 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());
}
+PassRefPtr<SVGAnimatedRect> SVGViewSpec::viewBoxAnimated()
+{
+ if (!m_contextElement)
+ return 0;
+ return static_pointer_cast<SVGAnimatedRect>(lookupOrCreateViewBoxWrapper(this));
+}
+
+PassRefPtr<SVGAnimatedPreserveAspectRatio> SVGViewSpec::preserveAspectRatioAnimated()
+{
+ if (!m_contextElement)
+ return 0;
+ return static_pointer_cast<SVGAnimatedPreserveAspectRatio>(lookupOrCreatePreserveAspectRatioWrapper(this));
+}
+
PassRefPtr<SVGAnimatedProperty> SVGViewSpec::lookupOrCreateViewBoxWrapper(void* maskedOwnerType)
{
ASSERT(maskedOwnerType);
SVGViewSpec* ownerType = static_cast<SVGViewSpec*>(maskedOwnerType);
+ ASSERT(ownerType->contextElement());
return SVGAnimatedProperty::lookupOrCreateWrapper<SVGElement, SVGAnimatedRect, FloatRect>(ownerType->contextElement(), viewBoxPropertyInfo(), ownerType->m_viewBox);
}
@@ -169,6 +179,7 @@
{
ASSERT(maskedOwnerType);
SVGViewSpec* ownerType = static_cast<SVGViewSpec*>(maskedOwnerType);
+ ASSERT(ownerType->contextElement());
return SVGAnimatedProperty::lookupOrCreateWrapper<SVGElement, SVGAnimatedPreserveAspectRatio, SVGPreserveAspectRatio>(ownerType->contextElement(), preserveAspectRatioPropertyInfo(), ownerType->m_preserveAspectRatio);
}
@@ -176,6 +187,7 @@
{
ASSERT(maskedOwnerType);
SVGViewSpec* ownerType = static_cast<SVGViewSpec*>(maskedOwnerType);
+ ASSERT(ownerType->contextElement());
return SVGAnimatedProperty::lookupOrCreateWrapper<SVGElement, SVGAnimatedTransformList, SVGTransformList>(ownerType->contextElement(), transformPropertyInfo(), ownerType->m_transform);
}
« no previous file with comments | « Source/WebCore/svg/SVGViewSpec.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698