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

Side by Side Diff: Source/core/svg/SVGUseElement.h

Issue 112003003: [SVG] SVGLength{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert aggressive svgAttributeChanged, add NeedsRebaseline Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGTextPositioningElement.cpp ('k') | Source/core/svg/SVGUseElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 30 matching lines...) Expand all
41 virtual ~SVGUseElement(); 41 virtual ~SVGUseElement();
42 42
43 SVGElementInstance* instanceRoot(); 43 SVGElementInstance* instanceRoot();
44 SVGElementInstance* animatedInstanceRoot() const; 44 SVGElementInstance* animatedInstanceRoot() const;
45 SVGElementInstance* instanceForShadowTreeElement(Node*) const; 45 SVGElementInstance* instanceForShadowTreeElement(Node*) const;
46 void invalidateShadowTree(); 46 void invalidateShadowTree();
47 void invalidateDependentShadowTrees(); 47 void invalidateDependentShadowTrees();
48 48
49 RenderObject* rendererClipChild() const; 49 RenderObject* rendererClipChild() const;
50 50
51 SVGAnimatedLength* x() const { return m_x.get(); }
52 SVGAnimatedLength* y() const { return m_y.get(); }
53 SVGAnimatedLength* width() const { return m_width.get(); }
54 SVGAnimatedLength* height() const { return m_height.get(); }
55
51 private: 56 private:
52 SVGUseElement(Document&, bool wasInsertedByParser); 57 SVGUseElement(Document&, bool wasInsertedByParser);
53 58
54 virtual bool isValid() const { return SVGTests::isValid(); } 59 virtual bool isValid() const { return SVGTests::isValid(); }
55 virtual bool isStructurallyExternal() const { return isExternalURIReference( hrefCurrentValue(), document()); } 60 virtual bool isStructurallyExternal() const { return isExternalURIReference( hrefCurrentValue(), document()); }
56 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners( ); } 61 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners( ); }
57 62
58 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 63 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
59 virtual void removedFrom(ContainerNode*) OVERRIDE; 64 virtual void removedFrom(ContainerNode*) OVERRIDE;
60 virtual void buildPendingResource(); 65 virtual void buildPendingResource();
(...skipping 27 matching lines...) Expand all
88 void expandUseElementsInShadowTree(Node* element); 93 void expandUseElementsInShadowTree(Node* element);
89 void expandSymbolElementsInShadowTree(Node* element); 94 void expandSymbolElementsInShadowTree(Node* element);
90 95
91 // "Tree connector" 96 // "Tree connector"
92 void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstan ce* targetInstance); 97 void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstan ce* targetInstance);
93 SVGElementInstance* instanceForShadowTreeElement(Node* element, SVGElementIn stance* instance) const; 98 SVGElementInstance* instanceForShadowTreeElement(Node* element, SVGElementIn stance* instance) const;
94 99
95 void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to ) const; 100 void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to ) const;
96 void transferEventListenersToShadowTree(SVGElementInstance* target); 101 void transferEventListenersToShadowTree(SVGElementInstance* target);
97 102
103 RefPtr<SVGAnimatedLength> m_x;
104 RefPtr<SVGAnimatedLength> m_y;
105 RefPtr<SVGAnimatedLength> m_width;
106 RefPtr<SVGAnimatedLength> m_height;
98 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGUseElement) 107 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGUseElement)
99 DECLARE_ANIMATED_LENGTH(X, x)
100 DECLARE_ANIMATED_LENGTH(Y, y)
101 DECLARE_ANIMATED_LENGTH(Width, width)
102 DECLARE_ANIMATED_LENGTH(Height, height)
103 DECLARE_ANIMATED_STRING(Href, href) 108 DECLARE_ANIMATED_STRING(Href, href)
104 END_DECLARE_ANIMATED_PROPERTIES 109 END_DECLARE_ANIMATED_PROPERTIES
105 110
106 bool resourceIsStillLoading(); 111 bool resourceIsStillLoading();
107 Document* externalDocument() const; 112 Document* externalDocument() const;
108 bool instanceTreeIsLoading(SVGElementInstance*); 113 bool instanceTreeIsLoading(SVGElementInstance*);
109 virtual void notifyFinished(Resource*); 114 virtual void notifyFinished(Resource*);
110 Document* referencedDocument() const; 115 Document* referencedDocument() const;
111 void setDocumentResource(ResourcePtr<DocumentResource>); 116 void setDocumentResource(ResourcePtr<DocumentResource>);
112 117
113 virtual Timer<SVGElement>* svgLoadEventTimer() OVERRIDE { return &m_svgLoadE ventTimer; } 118 virtual Timer<SVGElement>* svgLoadEventTimer() OVERRIDE { return &m_svgLoadE ventTimer; }
114 119
115 bool m_wasInsertedByParser; 120 bool m_wasInsertedByParser;
116 bool m_haveFiredLoadEvent; 121 bool m_haveFiredLoadEvent;
117 bool m_needsShadowTreeRecreation; 122 bool m_needsShadowTreeRecreation;
118 RefPtr<SVGElementInstance> m_targetElementInstance; 123 RefPtr<SVGElementInstance> m_targetElementInstance;
119 ResourcePtr<DocumentResource> m_resource; 124 ResourcePtr<DocumentResource> m_resource;
120 Timer<SVGElement> m_svgLoadEventTimer; 125 Timer<SVGElement> m_svgLoadEventTimer;
121 }; 126 };
122 127
123 DEFINE_NODE_TYPE_CASTS(SVGUseElement, hasTagName(SVGNames::useTag)); 128 DEFINE_NODE_TYPE_CASTS(SVGUseElement, hasTagName(SVGNames::useTag));
124 129
125 } 130 }
126 131
127 #endif 132 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGTextPositioningElement.cpp ('k') | Source/core/svg/SVGUseElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698