OLD | NEW |
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 Loading... |
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 |
OLD | NEW |