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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 class SVGUseElement FINAL : public SVGGraphicsElement, | 36 class SVGUseElement FINAL : public SVGGraphicsElement, |
37 public SVGURIReference, | 37 public SVGURIReference, |
38 public DocumentResourceClient { | 38 public DocumentResourceClient { |
39 public: | 39 public: |
40 static PassRefPtrWillBeRawPtr<SVGUseElement> create(Document&); | 40 static PassRefPtrWillBeRawPtr<SVGUseElement> create(Document&); |
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; | |
46 void invalidateShadowTree(); | 45 void invalidateShadowTree(); |
47 void invalidateDependentShadowTrees(); | 46 void invalidateDependentShadowTrees(); |
48 | 47 |
49 RenderObject* rendererClipChild() const; | 48 RenderObject* rendererClipChild() const; |
50 | 49 |
51 SVGAnimatedLength* x() const { return m_x.get(); } | 50 SVGAnimatedLength* x() const { return m_x.get(); } |
52 SVGAnimatedLength* y() const { return m_y.get(); } | 51 SVGAnimatedLength* y() const { return m_y.get(); } |
53 SVGAnimatedLength* width() const { return m_width.get(); } | 52 SVGAnimatedLength* width() const { return m_width.get(); } |
54 SVGAnimatedLength* height() const { return m_height.get(); } | 53 SVGAnimatedLength* height() const { return m_height.get(); } |
55 | 54 |
(...skipping 29 matching lines...) Expand all Loading... |
85 bool hasCycleUseReferencing(SVGUseElement*, SVGElementInstance* targetInstan
ce, SVGElement*& newTarget); | 84 bool hasCycleUseReferencing(SVGUseElement*, SVGElementInstance* targetInstan
ce, SVGElement*& newTarget); |
86 | 85 |
87 // Shadow tree handling | 86 // Shadow tree handling |
88 void buildShadowTree(SVGElement* target, SVGElementInstance* targetInstance,
ShadowRoot* shadowTreeRootElement); | 87 void buildShadowTree(SVGElement* target, SVGElementInstance* targetInstance,
ShadowRoot* shadowTreeRootElement); |
89 | 88 |
90 void expandUseElementsInShadowTree(Node* element); | 89 void expandUseElementsInShadowTree(Node* element); |
91 void expandSymbolElementsInShadowTree(Node* element); | 90 void expandSymbolElementsInShadowTree(Node* element); |
92 | 91 |
93 // "Tree connector" | 92 // "Tree connector" |
94 void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstan
ce* targetInstance); | 93 void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstan
ce* targetInstance); |
95 SVGElementInstance* instanceForShadowTreeElement(Node* element, SVGElementIn
stance* instance) const; | |
96 | 94 |
97 void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to
) const; | 95 void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to
) const; |
98 void transferEventListenersToShadowTree(SVGElement* shadowTreeTargetElement)
; | 96 void transferEventListenersToShadowTree(SVGElement* shadowTreeTargetElement)
; |
99 | 97 |
100 RefPtr<SVGAnimatedLength> m_x; | 98 RefPtr<SVGAnimatedLength> m_x; |
101 RefPtr<SVGAnimatedLength> m_y; | 99 RefPtr<SVGAnimatedLength> m_y; |
102 RefPtr<SVGAnimatedLength> m_width; | 100 RefPtr<SVGAnimatedLength> m_width; |
103 RefPtr<SVGAnimatedLength> m_height; | 101 RefPtr<SVGAnimatedLength> m_height; |
104 | 102 |
105 bool resourceIsStillLoading(); | 103 bool resourceIsStillLoading(); |
106 Document* externalDocument() const; | 104 Document* externalDocument() const; |
107 bool instanceTreeIsLoading(SVGElementInstance*); | 105 bool instanceTreeIsLoading(SVGElementInstance*); |
108 virtual void notifyFinished(Resource*) OVERRIDE; | 106 virtual void notifyFinished(Resource*) OVERRIDE; |
109 TreeScope* referencedScope() const; | 107 TreeScope* referencedScope() const; |
110 void setDocumentResource(ResourcePtr<DocumentResource>); | 108 void setDocumentResource(ResourcePtr<DocumentResource>); |
111 | 109 |
112 virtual Timer<SVGElement>* svgLoadEventTimer() OVERRIDE { return &m_svgLoadE
ventTimer; } | 110 virtual Timer<SVGElement>* svgLoadEventTimer() OVERRIDE { return &m_svgLoadE
ventTimer; } |
113 | 111 |
114 bool m_haveFiredLoadEvent; | 112 bool m_haveFiredLoadEvent; |
115 bool m_needsShadowTreeRecreation; | 113 bool m_needsShadowTreeRecreation; |
116 RefPtrWillBeMember<SVGElementInstance> m_targetElementInstance; | 114 RefPtrWillBeMember<SVGElementInstance> m_targetElementInstance; |
117 ResourcePtr<DocumentResource> m_resource; | 115 ResourcePtr<DocumentResource> m_resource; |
118 Timer<SVGElement> m_svgLoadEventTimer; | 116 Timer<SVGElement> m_svgLoadEventTimer; |
119 }; | 117 }; |
120 | 118 |
121 } | 119 } |
122 | 120 |
123 #endif | 121 #endif |
OLD | NEW |