diff options
Diffstat (limited to 'WebCore/svg/SVGUseElement.h')
-rw-r--r-- | WebCore/svg/SVGUseElement.h | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/WebCore/svg/SVGUseElement.h b/WebCore/svg/SVGUseElement.h index 5a11ace..b127450 100644 --- a/WebCore/svg/SVGUseElement.h +++ b/WebCore/svg/SVGUseElement.h @@ -32,94 +32,94 @@ namespace WebCore { -class SVGElementInstance; -class SVGShadowTreeRootElement; + class SVGElementInstance; + class SVGLength; + class SVGShadowTreeRootElement; -class SVGUseElement : public SVGStyledTransformableElement, - public SVGTests, - public SVGLangSpace, - public SVGExternalResourcesRequired, - public SVGURIReference { -public: - static PassRefPtr<SVGUseElement> create(const QualifiedName&, Document*); + class SVGUseElement : public SVGStyledTransformableElement, + public SVGTests, + public SVGLangSpace, + public SVGExternalResourcesRequired, + public SVGURIReference { + public: + static PassRefPtr<SVGUseElement> create(const QualifiedName&, Document*); - SVGElementInstance* instanceRoot() const; - SVGElementInstance* animatedInstanceRoot() const; - SVGElementInstance* instanceForShadowTreeElement(Node*) const; - void invalidateShadowTree(); + SVGElementInstance* instanceRoot() const; + SVGElementInstance* animatedInstanceRoot() const; + SVGElementInstance* instanceForShadowTreeElement(Node*) const; + void invalidateShadowTree(); - RenderObject* rendererClipChild() const; + RenderObject* rendererClipChild() const; -private: - SVGUseElement(const QualifiedName&, Document*); + private: + SVGUseElement(const QualifiedName&, Document*); - virtual bool isValid() const { return SVGTests::isValid(); } + virtual bool isValid() const { return SVGTests::isValid(); } - virtual void insertedIntoDocument(); - virtual void removedFromDocument(); - virtual void buildPendingResource(); + virtual void insertedIntoDocument(); + virtual void removedFromDocument(); + virtual void buildPendingResource(); - virtual void parseMappedAttribute(Attribute*); - virtual void svgAttributeChanged(const QualifiedName&); - virtual void synchronizeProperty(const QualifiedName&); + virtual void parseMappedAttribute(Attribute*); + virtual void svgAttributeChanged(const QualifiedName&); + virtual void synchronizeProperty(const QualifiedName&); - virtual void recalcStyle(StyleChange = NoChange); - virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); - virtual void attach(); - virtual void detach(); + virtual void recalcStyle(StyleChange = NoChange); + virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); + virtual void attach(); + virtual void detach(); - virtual void toClipPath(Path&) const; + virtual void toClipPath(Path&) const; - static void removeDisallowedElementsFromSubtree(Node* element); + static void removeDisallowedElementsFromSubtree(Node* element); - void setUpdatesBlocked(bool blocked) { m_updatesBlocked = blocked; } + void setUpdatesBlocked(bool blocked) { m_updatesBlocked = blocked; } - friend class RenderSVGShadowTreeRootContainer; - bool isPendingResource() const { return m_isPendingResource; } - void buildShadowAndInstanceTree(SVGShadowTreeRootElement*); + friend class RenderSVGShadowTreeRootContainer; + bool isPendingResource() const { return m_isPendingResource; } + void buildShadowAndInstanceTree(SVGShadowTreeRootElement*); - virtual bool selfHasRelativeLengths() const; + virtual bool selfHasRelativeLengths() const; - // Instance tree handling - void buildInstanceTree(SVGElement* target, SVGElementInstance* targetInstance, bool& foundCycle); - void handleDeepUseReferencing(SVGUseElement* use, SVGElementInstance* targetInstance, bool& foundCycle); + DECLARE_ANIMATED_PROPERTY_NEW(SVGUseElement, SVGNames::xAttr, SVGLength, X, x) + DECLARE_ANIMATED_PROPERTY_NEW(SVGUseElement, SVGNames::yAttr, SVGLength, Y, y) + DECLARE_ANIMATED_PROPERTY_NEW(SVGUseElement, SVGNames::widthAttr, SVGLength, Width, width) + DECLARE_ANIMATED_PROPERTY_NEW(SVGUseElement, SVGNames::heightAttr, SVGLength, Height, height) - // Shadow tree handling - void buildShadowTree(SVGShadowTreeRootElement*, SVGElement* target, SVGElementInstance* targetInstance); + // SVGURIReference + DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGUseElement, XLinkNames::hrefAttr, String, Href, href) -#if ENABLE(SVG) && ENABLE(SVG_USE) - void expandUseElementsInShadowTree(SVGShadowTreeRootElement*, Node* element); - void expandSymbolElementsInShadowTree(SVGShadowTreeRootElement*, Node* element); -#endif + // SVGExternalResourcesRequired + DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGUseElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired) - // "Tree connector" - void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstance* targetInstance); - SVGElementInstance* instanceForShadowTreeElement(Node* element, SVGElementInstance* instance) const; + // Instance tree handling + void buildInstanceTree(SVGElement* target, SVGElementInstance* targetInstance, bool& foundCycle); + void handleDeepUseReferencing(SVGUseElement* use, SVGElementInstance* targetInstance, bool& foundCycle); - void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to) const; - void transferEventListenersToShadowTree(SVGElementInstance* target); + // Shadow tree handling + void buildShadowTree(SVGShadowTreeRootElement*, SVGElement* target, SVGElementInstance* targetInstance); - void updateContainerOffsets(); - void updateContainerSizes(); +#if ENABLE(SVG) && ENABLE(SVG_USE) + void expandUseElementsInShadowTree(SVGShadowTreeRootElement*, Node* element); + void expandSymbolElementsInShadowTree(SVGShadowTreeRootElement*, Node* element); +#endif - // Animated property declarations - DECLARE_ANIMATED_LENGTH(X, x) - DECLARE_ANIMATED_LENGTH(Y, y) - DECLARE_ANIMATED_LENGTH(Width, width) - DECLARE_ANIMATED_LENGTH(Height, height) + // "Tree connector" + void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstance* targetInstance); + SVGElementInstance* instanceForShadowTreeElement(Node* element, SVGElementInstance* instance) const; - // SVGURIReference - DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGUseElement, XLinkNames::hrefAttr, String, Href, href) + void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to) const; + void transferEventListenersToShadowTree(SVGElementInstance* target); - // SVGExternalResourcesRequired - DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGUseElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired) + void updateContainerOffsets(); + void updateContainerSizes(); - bool m_updatesBlocked; - bool m_isPendingResource; - bool m_needsShadowTreeRecreation; - String m_resourceId; - RefPtr<SVGElementInstance> m_targetElementInstance; -}; + bool m_updatesBlocked; + bool m_isPendingResource; + bool m_needsShadowTreeRecreation; + String m_resourceId; + RefPtr<SVGElementInstance> m_targetElementInstance; + }; } |