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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 57 |
58 private: | 58 private: |
59 SVGUseElement(Document&, bool wasInsertedByParser); | 59 SVGUseElement(Document&, bool wasInsertedByParser); |
60 | 60 |
61 virtual bool isStructurallyExternal() const OVERRIDE { return isExternalURIR
eference(hrefCurrentValue(), document()); } | 61 virtual bool isStructurallyExternal() const OVERRIDE { return !hrefCurrentVa
lue().isNull() && isExternalURIReference(hrefCurrentValue(), document()); } |
| 62 |
62 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners(
); } | 63 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners(
); } |
63 | 64 |
64 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 65 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
65 virtual void removedFrom(ContainerNode*) OVERRIDE; | 66 virtual void removedFrom(ContainerNode*) OVERRIDE; |
66 | 67 |
67 bool isSupportedAttribute(const QualifiedName&); | 68 bool isSupportedAttribute(const QualifiedName&); |
68 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 69 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
69 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; | 70 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; |
70 | 71 |
71 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; | 72 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; |
72 virtual void toClipPath(Path&) OVERRIDE; | 73 virtual void toClipPath(Path&) OVERRIDE; |
73 | 74 |
74 void clearResourceReferences(); | 75 void clearResourceReferences(); |
75 void buildShadowAndInstanceTree(SVGElement* target); | 76 void buildShadowAndInstanceTree(SVGElement* target); |
76 void detachInstance(); | 77 void detachInstance(); |
77 | 78 |
78 void scheduleShadowTreeRecreation(); | 79 void scheduleShadowTreeRecreation(); |
79 | 80 virtual bool haveLoadedRequiredResources() OVERRIDE { return !isStructurally
External() || m_haveFiredLoadEvent; } |
80 virtual bool haveLoadedRequiredResources() OVERRIDE { return m_haveFiredLoad
Event; } | |
81 | 81 |
82 virtual void finishParsingChildren() OVERRIDE; | 82 virtual void finishParsingChildren() OVERRIDE; |
83 virtual bool selfHasRelativeLengths() const OVERRIDE; | 83 virtual bool selfHasRelativeLengths() const OVERRIDE; |
84 | 84 |
85 // Instance tree handling | 85 // Instance tree handling |
86 void buildInstanceTree(SVGElement* target, SVGElementInstance* targetInstanc
e, bool& foundCycle, bool foundUse); | 86 void buildInstanceTree(SVGElement* target, SVGElementInstance* targetInstanc
e, bool& foundCycle, bool foundUse); |
87 bool hasCycleUseReferencing(SVGUseElement*, SVGElementInstance* targetInstan
ce, SVGElement*& newTarget); | 87 bool hasCycleUseReferencing(SVGUseElement*, SVGElementInstance* targetInstan
ce, SVGElement*& newTarget); |
88 | 88 |
89 // Shadow tree handling | 89 // Shadow tree handling |
90 void buildShadowTree(SVGElement* target, SVGElementInstance* targetInstance)
; | 90 void buildShadowTree(SVGElement* target, SVGElementInstance* targetInstance)
; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 RefPtr<SVGElementInstance> m_targetElementInstance; | 122 RefPtr<SVGElementInstance> m_targetElementInstance; |
123 ResourcePtr<DocumentResource> m_resource; | 123 ResourcePtr<DocumentResource> m_resource; |
124 Timer<SVGElement> m_svgLoadEventTimer; | 124 Timer<SVGElement> m_svgLoadEventTimer; |
125 }; | 125 }; |
126 | 126 |
127 DEFINE_NODE_TYPE_CASTS(SVGUseElement, hasTagName(SVGNames::useTag)); | 127 DEFINE_NODE_TYPE_CASTS(SVGUseElement, hasTagName(SVGNames::useTag)); |
128 | 128 |
129 } | 129 } |
130 | 130 |
131 #endif | 131 #endif |
OLD | NEW |