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

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

Issue 112003003: [SVG] SVGLength{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaselined Created 7 years 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/SVGTextContentElement.h
diff --git a/Source/core/svg/SVGTextContentElement.h b/Source/core/svg/SVGTextContentElement.h
index db0b622d8b94d20a2541d8d1a26c4330edddeed8..98b89da4434875697e3a55c4f6b1e4305315f9ff 100644
--- a/Source/core/svg/SVGTextContentElement.h
+++ b/Source/core/svg/SVGTextContentElement.h
@@ -66,6 +66,8 @@ struct SVGPropertyTraits<SVGLengthAdjustType> {
}
};
+class SVGAnimatedTextLength;
+
class SVGTextContentElement : public SVGGraphicsElement,
public SVGExternalResourcesRequired {
public:
@@ -88,11 +90,8 @@ public:
static SVGTextContentElement* elementFromRenderer(RenderObject*);
- // 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> textLength();
- static const SVGPropertyInfo* textLengthPropertyInfo();
+ SVGAnimatedLength* textLength() { return m_textLength.get(); }
+ bool textLengthIsSpecifiedByUser() { return m_textLengthIsSpecifiedByUser; }
protected:
SVGTextContentElement(const QualifiedName&, Document&);
@@ -110,12 +109,8 @@ protected:
private:
virtual bool isTextContent() const { return true; }
- // Custom 'textLength' property
- static void synchronizeTextLength(SVGElement* contextElement);
- static PassRefPtr<SVGAnimatedProperty> lookupOrCreateTextLengthWrapper(SVGElement* contextElement);
- mutable SVGSynchronizableAnimatedProperty<SVGLength> m_textLength;
- SVGLength m_specifiedTextLength;
-
+ RefPtr<SVGAnimatedLength> m_textLength;
+ bool m_textLengthIsSpecifiedByUser;
BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGTextContentElement)
DECLARE_ANIMATED_ENUMERATION(LengthAdjust, lengthAdjust, SVGLengthAdjustType)
DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired)

Powered by Google App Engine
This is Rietveld 408576698