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

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

Issue 134593005: Update SVG classes to use OVERRIDE / FINAL when needed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « Source/core/svg/SVGUnknownElement.h ('k') | Source/core/svg/SVGVKernElement.h » ('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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 RenderObject* rendererClipChild() const; 49 RenderObject* rendererClipChild() const;
50 50
51 SVGAnimatedLength* x() const { return m_x.get(); } 51 SVGAnimatedLength* x() const { return m_x.get(); }
52 SVGAnimatedLength* y() const { return m_y.get(); } 52 SVGAnimatedLength* y() const { return m_y.get(); }
53 SVGAnimatedLength* width() const { return m_width.get(); } 53 SVGAnimatedLength* width() const { return m_width.get(); }
54 SVGAnimatedLength* height() const { return m_height.get(); } 54 SVGAnimatedLength* height() const { return m_height.get(); }
55 55
56 private: 56 private:
57 SVGUseElement(Document&, bool wasInsertedByParser); 57 SVGUseElement(Document&, bool wasInsertedByParser);
58 58
59 virtual bool isValid() const { return SVGTests::isValid(); } 59 virtual bool isValid() const OVERRIDE { return SVGTests::isValid(); }
60 virtual bool isStructurallyExternal() const { return isExternalURIReference( hrefCurrentValue(), document()); } 60 virtual bool isStructurallyExternal() const OVERRIDE { return isExternalURIR eference(hrefCurrentValue(), document()); }
61 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners( ); } 61 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners( ); }
62 62
63 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 63 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
64 virtual void removedFrom(ContainerNode*) OVERRIDE; 64 virtual void removedFrom(ContainerNode*) OVERRIDE;
65 virtual void buildPendingResource(); 65 virtual void buildPendingResource() OVERRIDE;
66 66
67 bool isSupportedAttribute(const QualifiedName&); 67 bool isSupportedAttribute(const QualifiedName&);
68 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 68 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
69 virtual void svgAttributeChanged(const QualifiedName&); 69 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
70 70
71 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; 71 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE;
72 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE; 72 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE;
73 73
74 virtual RenderObject* createRenderer(RenderStyle*); 74 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE;
75 virtual void toClipPath(Path&); 75 virtual void toClipPath(Path&) OVERRIDE;
76 76
77 void clearResourceReferences(); 77 void clearResourceReferences();
78 void buildShadowAndInstanceTree(SVGElement* target); 78 void buildShadowAndInstanceTree(SVGElement* target);
79 void detachInstance(); 79 void detachInstance();
80 80
81 virtual bool haveLoadedRequiredResources() { return m_haveFiredLoadEvent; } 81 virtual bool haveLoadedRequiredResources() OVERRIDE { return m_haveFiredLoad Event; }
82 82
83 virtual void finishParsingChildren(); 83 virtual void finishParsingChildren() OVERRIDE;
84 virtual bool selfHasRelativeLengths() const; 84 virtual bool selfHasRelativeLengths() const OVERRIDE;
85 85
86 // Instance tree handling 86 // Instance tree handling
87 void buildInstanceTree(SVGElement* target, SVGElementInstance* targetInstanc e, bool& foundCycle, bool foundUse); 87 void buildInstanceTree(SVGElement* target, SVGElementInstance* targetInstanc e, bool& foundCycle, bool foundUse);
88 bool hasCycleUseReferencing(SVGUseElement*, SVGElementInstance* targetInstan ce, SVGElement*& newTarget); 88 bool hasCycleUseReferencing(SVGUseElement*, SVGElementInstance* targetInstan ce, SVGElement*& newTarget);
89 89
90 // Shadow tree handling 90 // Shadow tree handling
91 void buildShadowTree(SVGElement* target, SVGElementInstance* targetInstance) ; 91 void buildShadowTree(SVGElement* target, SVGElementInstance* targetInstance) ;
92 92
93 void expandUseElementsInShadowTree(Node* element); 93 void expandUseElementsInShadowTree(Node* element);
94 void expandSymbolElementsInShadowTree(Node* element); 94 void expandSymbolElementsInShadowTree(Node* element);
95 95
96 // "Tree connector" 96 // "Tree connector"
97 void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstan ce* targetInstance); 97 void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstan ce* targetInstance);
98 SVGElementInstance* instanceForShadowTreeElement(Node* element, SVGElementIn stance* instance) const; 98 SVGElementInstance* instanceForShadowTreeElement(Node* element, SVGElementIn stance* instance) const;
99 99
100 void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to ) const; 100 void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to ) const;
101 void transferEventListenersToShadowTree(SVGElementInstance* target); 101 void transferEventListenersToShadowTree(SVGElementInstance* target);
102 102
103 RefPtr<SVGAnimatedLength> m_x; 103 RefPtr<SVGAnimatedLength> m_x;
104 RefPtr<SVGAnimatedLength> m_y; 104 RefPtr<SVGAnimatedLength> m_y;
105 RefPtr<SVGAnimatedLength> m_width; 105 RefPtr<SVGAnimatedLength> m_width;
106 RefPtr<SVGAnimatedLength> m_height; 106 RefPtr<SVGAnimatedLength> m_height;
107 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGUseElement) 107 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGUseElement)
108 DECLARE_ANIMATED_STRING(Href, href) 108 DECLARE_ANIMATED_STRING(Href, href)
109 END_DECLARE_ANIMATED_PROPERTIES 109 END_DECLARE_ANIMATED_PROPERTIES
110 110
111 bool resourceIsStillLoading(); 111 bool resourceIsStillLoading();
112 Document* externalDocument() const; 112 Document* externalDocument() const;
113 bool instanceTreeIsLoading(SVGElementInstance*); 113 bool instanceTreeIsLoading(SVGElementInstance*);
114 virtual void notifyFinished(Resource*); 114 virtual void notifyFinished(Resource*) OVERRIDE;
115 Document* referencedDocument() const; 115 Document* referencedDocument() const;
116 void setDocumentResource(ResourcePtr<DocumentResource>); 116 void setDocumentResource(ResourcePtr<DocumentResource>);
117 117
118 virtual Timer<SVGElement>* svgLoadEventTimer() OVERRIDE { return &m_svgLoadE ventTimer; } 118 virtual Timer<SVGElement>* svgLoadEventTimer() OVERRIDE { return &m_svgLoadE ventTimer; }
119 119
120 bool m_wasInsertedByParser; 120 bool m_wasInsertedByParser;
121 bool m_haveFiredLoadEvent; 121 bool m_haveFiredLoadEvent;
122 bool m_needsShadowTreeRecreation; 122 bool m_needsShadowTreeRecreation;
123 RefPtr<SVGElementInstance> m_targetElementInstance; 123 RefPtr<SVGElementInstance> m_targetElementInstance;
124 ResourcePtr<DocumentResource> m_resource; 124 ResourcePtr<DocumentResource> m_resource;
125 Timer<SVGElement> m_svgLoadEventTimer; 125 Timer<SVGElement> m_svgLoadEventTimer;
126 }; 126 };
127 127
128 DEFINE_NODE_TYPE_CASTS(SVGUseElement, hasTagName(SVGNames::useTag)); 128 DEFINE_NODE_TYPE_CASTS(SVGUseElement, hasTagName(SVGNames::useTag));
129 129
130 } 130 }
131 131
132 #endif 132 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGUnknownElement.h ('k') | Source/core/svg/SVGVKernElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698