Chromium Code Reviews| Index: Source/core/svg/SVGViewSpec.h |
| diff --git a/Source/core/svg/SVGViewSpec.h b/Source/core/svg/SVGViewSpec.h |
| index c5d742f5daa023c553a13970d96437f7773f1660..c47e0918eccc7379d10d8d90dadb6e98a6735d9c 100644 |
| --- a/Source/core/svg/SVGViewSpec.h |
| +++ b/Source/core/svg/SVGViewSpec.h |
| @@ -70,10 +70,7 @@ public: |
| SVGTransformList transformBaseValue() const { return m_transform; } |
| // Custom animated 'viewBox' property. |
| - PassRefPtr<SVGAnimatedRect> viewBox(); |
| - SVGRect& viewBoxCurrentValue() { return m_viewBox; } |
| - SVGRect viewBoxBaseValue() const { return m_viewBox; } |
| - void setViewBoxBaseValue(const SVGRect& viewBox) { m_viewBox = viewBox; } |
| + SVGAnimatedRect* viewBox() { return m_contextElement ? m_viewBox.get() : 0; } |
|
haraken
2014/01/16 04:56:43
Isn't it a bit dangerous to allow m_viewBox to hol
kouhei (in TOK)
2014/01/16 05:12:37
Ack. I'll try that.
kouhei (in TOK)
2014/01/16 06:07:59
Chatted offline. WeakPtr do not provide "on-clear"
|
| // Custom animated 'preserveAspectRatio' property. |
| PassRefPtr<SVGAnimatedPreserveAspectRatio> preserveAspectRatio(); |
| @@ -85,15 +82,12 @@ private: |
| explicit SVGViewSpec(WeakPtr<SVGSVGElement>); |
| static const SVGPropertyInfo* transformPropertyInfo(); |
| - static const SVGPropertyInfo* viewBoxPropertyInfo(); |
| static const SVGPropertyInfo* preserveAspectRatioPropertyInfo(); |
| static const AtomicString& transformIdentifier(); |
| - 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); |
| template<typename CharType> |
| @@ -103,7 +97,7 @@ private: |
| SVGZoomAndPanType m_zoomAndPan; |
| SVGTransformList m_transform; |
| - SVGRect m_viewBox; |
| + RefPtr<SVGAnimatedRect> m_viewBox; |
| SVGPreserveAspectRatio m_preserveAspectRatio; |
| String m_viewTargetString; |
| }; |