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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(); } | 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 virtual void buildPendingResource() OVERRIDE; | 56 virtual void buildPendingResource() OVERRIDE; |
| 57 SVGAnimatedString* href() { return m_href.get(); } |
57 | 58 |
58 private: | 59 private: |
59 SVGUseElement(Document&, bool wasInsertedByParser); | 60 SVGUseElement(Document&, bool wasInsertedByParser); |
60 | 61 |
61 virtual bool isStructurallyExternal() const OVERRIDE { return !hrefCurrentVa
lue().isNull() && isExternalURIReference(hrefCurrentValue(), document()); } | 62 virtual bool isStructurallyExternal() const OVERRIDE { return !m_href->curre
ntValue()->value().isNull() && isExternalURIReference(m_href->currentValue()->va
lue(), document()); } |
62 | 63 |
63 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners(
); } | 64 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners(
); } |
64 | 65 |
65 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 66 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
66 virtual void removedFrom(ContainerNode*) OVERRIDE; | 67 virtual void removedFrom(ContainerNode*) OVERRIDE; |
67 | 68 |
68 bool isSupportedAttribute(const QualifiedName&); | 69 bool isSupportedAttribute(const QualifiedName&); |
69 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 70 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
70 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; | 71 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; |
71 | 72 |
(...skipping 24 matching lines...) Expand all Loading... |
96 void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstan
ce* targetInstance); | 97 void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstan
ce* targetInstance); |
97 SVGElementInstance* instanceForShadowTreeElement(Node* element, SVGElementIn
stance* instance) const; | 98 SVGElementInstance* instanceForShadowTreeElement(Node* element, SVGElementIn
stance* instance) const; |
98 | 99 |
99 void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to
) const; | 100 void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to
) const; |
100 void transferEventListenersToShadowTree(SVGElementInstance* target); | 101 void transferEventListenersToShadowTree(SVGElementInstance* target); |
101 | 102 |
102 RefPtr<SVGAnimatedLength> m_x; | 103 RefPtr<SVGAnimatedLength> m_x; |
103 RefPtr<SVGAnimatedLength> m_y; | 104 RefPtr<SVGAnimatedLength> m_y; |
104 RefPtr<SVGAnimatedLength> m_width; | 105 RefPtr<SVGAnimatedLength> m_width; |
105 RefPtr<SVGAnimatedLength> m_height; | 106 RefPtr<SVGAnimatedLength> m_height; |
| 107 RefPtr<SVGAnimatedString> m_href; |
106 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGUseElement) | 108 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGUseElement) |
107 DECLARE_ANIMATED_STRING(Href, href) | |
108 END_DECLARE_ANIMATED_PROPERTIES | 109 END_DECLARE_ANIMATED_PROPERTIES |
109 | 110 |
110 bool resourceIsStillLoading(); | 111 bool resourceIsStillLoading(); |
111 Document* externalDocument() const; | 112 Document* externalDocument() const; |
112 bool instanceTreeIsLoading(SVGElementInstance*); | 113 bool instanceTreeIsLoading(SVGElementInstance*); |
113 virtual void notifyFinished(Resource*) OVERRIDE; | 114 virtual void notifyFinished(Resource*) OVERRIDE; |
114 Document* referencedDocument() const; | 115 Document* referencedDocument() const; |
115 void setDocumentResource(ResourcePtr<DocumentResource>); | 116 void setDocumentResource(ResourcePtr<DocumentResource>); |
116 | 117 |
117 virtual Timer<SVGElement>* svgLoadEventTimer() OVERRIDE { return &m_svgLoadE
ventTimer; } | 118 virtual Timer<SVGElement>* svgLoadEventTimer() OVERRIDE { return &m_svgLoadE
ventTimer; } |
118 | 119 |
119 bool m_wasInsertedByParser; | 120 bool m_wasInsertedByParser; |
120 bool m_haveFiredLoadEvent; | 121 bool m_haveFiredLoadEvent; |
121 bool m_needsShadowTreeRecreation; | 122 bool m_needsShadowTreeRecreation; |
122 RefPtr<SVGElementInstance> m_targetElementInstance; | 123 RefPtr<SVGElementInstance> m_targetElementInstance; |
123 ResourcePtr<DocumentResource> m_resource; | 124 ResourcePtr<DocumentResource> m_resource; |
124 Timer<SVGElement> m_svgLoadEventTimer; | 125 Timer<SVGElement> m_svgLoadEventTimer; |
125 }; | 126 }; |
126 | 127 |
127 DEFINE_NODE_TYPE_CASTS(SVGUseElement, hasTagName(SVGNames::useTag)); | 128 DEFINE_NODE_TYPE_CASTS(SVGUseElement, hasTagName(SVGNames::useTag)); |
128 | 129 |
129 } | 130 } |
130 | 131 |
131 #endif | 132 #endif |
OLD | NEW |