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

Unified Diff: Source/core/svg/SVGViewSpec.h

Issue 153883003: [SVG] SVGAnimatedTransform{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: haraken review Created 6 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
Index: Source/core/svg/SVGViewSpec.h
diff --git a/Source/core/svg/SVGViewSpec.h b/Source/core/svg/SVGViewSpec.h
index effdea0af688f1402b845af9f8de30a5cac87d6d..665fb9c17ebbf6e9d5a7cc4a820c42ef4a2bcf9d 100644
--- a/Source/core/svg/SVGViewSpec.h
+++ b/Source/core/svg/SVGViewSpec.h
@@ -23,16 +23,15 @@
#include "bindings/v8/ScriptWrappable.h"
#include "core/svg/SVGAnimatedPreserveAspectRatio.h"
#include "core/svg/SVGAnimatedRect.h"
+#include "core/svg/SVGAnimatedTransformList.h"
#include "core/svg/SVGFitToViewBox.h"
#include "core/svg/SVGSVGElement.h"
-#include "core/svg/SVGTransformList.h"
#include "core/svg/SVGZoomAndPan.h"
#include "wtf/WeakPtr.h"
namespace WebCore {
class ExceptionState;
-class SVGTransformListPropertyTearOff;
class SVGViewSpec FINAL : public RefCounted<SVGViewSpec>, public ScriptWrappable, public SVGZoomAndPan, public SVGFitToViewBox {
public:
@@ -52,10 +51,7 @@ public:
String preserveAspectRatioString() const;
- void setTransformString(const String&);
String transformString() const;
-
- void setViewTargetString(const String& string) { m_viewTargetString = string; }
String viewTargetString() const { return m_viewTargetString; }
SVGZoomAndPanType zoomAndPan() const { return m_zoomAndPan; }
@@ -66,22 +62,14 @@ public:
SVGElement* contextElement() const { return m_contextElement; }
void detachContextElement();
- // Custom non-animated 'transform' property.
- SVGTransformListPropertyTearOff* transform();
- SVGTransformList transformBaseValue() const { return m_transform; }
-
+ SVGTransformList* transform() { return m_transform ? m_transform->baseValue() : 0; }
+ PassRefPtr<SVGTransformListTearOff> transformFromJavascript() { return m_transform ? m_transform->baseVal() : 0; }
SVGAnimatedRect* viewBox() { return m_viewBox.get(); }
SVGAnimatedPreserveAspectRatio* preserveAspectRatio() { return m_preserveAspectRatio.get(); }
private:
explicit SVGViewSpec(SVGSVGElement*);
- static const SVGPropertyInfo* transformPropertyInfo();
-
- static const AtomicString& transformIdentifier();
-
- static PassRefPtr<SVGAnimatedProperty> lookupOrCreateTransformWrapper(SVGViewSpec* contextElement);
-
template<typename CharType>
bool parseViewSpecInternal(const CharType* ptr, const CharType* end);
@@ -89,7 +77,7 @@ private:
SVGSVGElement* m_contextElement;
SVGZoomAndPanType m_zoomAndPan;
- SVGTransformList m_transform;
+ RefPtr<SVGAnimatedTransformList> m_transform;
RefPtr<SVGAnimatedRect> m_viewBox;
RefPtr<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio;
String m_viewTargetString;

Powered by Google App Engine
This is Rietveld 408576698