diff options
author | Steve Block <steveblock@google.com> | 2010-02-02 14:57:50 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-04 15:06:55 +0000 |
commit | d0825bca7fe65beaee391d30da42e937db621564 (patch) | |
tree | 7461c49eb5844ffd1f35d1ba2c8b7584c1620823 /WebCore/svg/SVGUseElement.h | |
parent | 3db770bd97c5a59b6c7574ca80a39e5a51c1defd (diff) | |
download | external_webkit-d0825bca7fe65beaee391d30da42e937db621564.zip external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.gz external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.bz2 |
Merge webkit.org at r54127 : Initial merge by git
Change-Id: Ib661abb595522f50ea406f72d3a0ce17f7193c82
Diffstat (limited to 'WebCore/svg/SVGUseElement.h')
-rw-r--r-- | WebCore/svg/SVGUseElement.h | 50 |
1 files changed, 28 insertions, 22 deletions
diff --git a/WebCore/svg/SVGUseElement.h b/WebCore/svg/SVGUseElement.h index 45ca783..6fb3925 100644 --- a/WebCore/svg/SVGUseElement.h +++ b/WebCore/svg/SVGUseElement.h @@ -32,6 +32,7 @@ namespace WebCore { class SVGElementInstance; class SVGLength; + class SVGShadowTreeRootElement; class SVGUseElement : public SVGStyledTransformableElement, public SVGTests, @@ -52,11 +53,10 @@ namespace WebCore { virtual void buildPendingResource(); virtual void parseMappedAttribute(MappedAttribute*); - virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); - virtual void svgAttributeChanged(const QualifiedName&); - virtual void recalcStyle(StyleChange = NoChange); + virtual void synchronizeProperty(const QualifiedName&); + virtual void recalcStyle(StyleChange = NoChange); virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); virtual void attach(); virtual void detach(); @@ -65,20 +65,26 @@ namespace WebCore { static void removeDisallowedElementsFromSubtree(Node* element); SVGElementInstance* instanceForShadowTreeElement(Node* element) const; + void invalidateShadowTree(); + + private: + friend class RenderSVGShadowTreeRootContainer; + bool isPendingResource() const { return m_isPendingResource; } + void buildShadowAndInstanceTree(SVGShadowTreeRootElement*); private: - ANIMATED_PROPERTY_DECLARATIONS(SVGUseElement, SVGNames::useTagString, SVGNames::xAttrString, SVGLength, X, x) - ANIMATED_PROPERTY_DECLARATIONS(SVGUseElement, SVGNames::useTagString, SVGNames::yAttrString, SVGLength, Y, y) - ANIMATED_PROPERTY_DECLARATIONS(SVGUseElement, SVGNames::useTagString, SVGNames::widthAttrString, SVGLength, Width, width) - ANIMATED_PROPERTY_DECLARATIONS(SVGUseElement, SVGNames::useTagString, SVGNames::heightAttrString, SVGLength, Height, height) + virtual bool hasRelativeValues() const; + + DECLARE_ANIMATED_PROPERTY(SVGUseElement, SVGNames::xAttr, SVGLength, X, x) + DECLARE_ANIMATED_PROPERTY(SVGUseElement, SVGNames::yAttr, SVGLength, Y, y) + DECLARE_ANIMATED_PROPERTY(SVGUseElement, SVGNames::widthAttr, SVGLength, Width, width) + DECLARE_ANIMATED_PROPERTY(SVGUseElement, SVGNames::heightAttr, SVGLength, Height, height) // SVGURIReference - ANIMATED_PROPERTY_DECLARATIONS(SVGUseElement, SVGURIReferenceIdentifier, XLinkNames::hrefAttrString, String, Href, href) + DECLARE_ANIMATED_PROPERTY(SVGUseElement, XLinkNames::hrefAttr, String, Href, href) // SVGExternalResourcesRequired - ANIMATED_PROPERTY_DECLARATIONS(SVGUseElement, SVGExternalResourcesRequiredIdentifier, - SVGNames::externalResourcesRequiredAttrString, bool, - ExternalResourcesRequired, externalResourcesRequired) + DECLARE_ANIMATED_PROPERTY(SVGUseElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired) private: // Instance tree handling @@ -86,18 +92,13 @@ namespace WebCore { void handleDeepUseReferencing(SVGUseElement* use, SVGElementInstance* targetInstance, bool& foundCycle); // Shadow tree handling - PassRefPtr<SVGSVGElement> buildShadowTreeForSymbolTag(SVGElement* target, SVGElementInstance* targetInstance); - void alterShadowTreeForSVGTag(SVGElement* target); - - void buildShadowTree(SVGElement* target, SVGElementInstance* targetInstance); + void buildShadowTree(SVGShadowTreeRootElement*, SVGElement* target, SVGElementInstance* targetInstance); #if ENABLE(SVG) && ENABLE(SVG_USE) - void expandUseElementsInShadowTree(Node* element); - void expandSymbolElementsInShadowTree(Node* element); + void expandUseElementsInShadowTree(SVGShadowTreeRootElement*, Node* element); + void expandSymbolElementsInShadowTree(SVGShadowTreeRootElement*, Node* element); #endif - void attachShadowTree(); - // "Tree connector" void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstance* targetInstance); SVGElementInstance* instanceForShadowTreeElement(Node* element, SVGElementInstance* instance) const; @@ -105,11 +106,16 @@ namespace WebCore { void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to) const; void transferEventListenersToShadowTree(SVGElementInstance* target); - RefPtr<SVGElement> m_shadowTreeRootElement; + void updateContainerOffsets(); + void updateContainerSizes(); + + bool m_isPendingResource; + bool m_needsShadowTreeRecreation; + String m_resourceId; RefPtr<SVGElementInstance> m_targetElementInstance; }; -} // namespace WebCore +} -#endif // ENABLE(SVG) +#endif #endif |