From dcc8cf2e65d1aa555cce12431a16547e66b469ee Mon Sep 17 00:00:00 2001 From: Steve Block Date: Tue, 27 Apr 2010 16:31:00 +0100 Subject: Merge webkit.org at r58033 : Initial merge by git Change-Id: If006c38561af287c50cd578d251629b51e4d8cd1 --- WebCore/svg/SVGStyledElement.cpp | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'WebCore/svg/SVGStyledElement.cpp') diff --git a/WebCore/svg/SVGStyledElement.cpp b/WebCore/svg/SVGStyledElement.cpp index ff94c7d..22c2008 100644 --- a/WebCore/svg/SVGStyledElement.cpp +++ b/WebCore/svg/SVGStyledElement.cpp @@ -26,21 +26,22 @@ #include "Attr.h" #include "CSSParser.h" #include "CSSStyleSelector.h" -#include "CString.h" #include "Document.h" #include "HTMLNames.h" #include "MappedAttribute.h" #include "PlatformString.h" #include "RenderObject.h" #include "RenderSVGResource.h" +#include "RenderSVGResourceClipper.h" +#include "RenderSVGResourceFilter.h" #include "RenderSVGResourceMasker.h" #include "SVGElement.h" #include "SVGElementInstance.h" #include "SVGElementRareData.h" #include "SVGNames.h" #include "SVGRenderStyle.h" -#include "SVGResourceClipper.h" -#include "SVGResourceFilter.h" +#include "SVGRenderSupport.h" +#include "SVGResource.h" #include "SVGSVGElement.h" #include @@ -199,6 +200,14 @@ void SVGStyledElement::svgAttributeChanged(const QualifiedName& attrName) if (attrName.matches(HTMLNames::classAttr)) classAttributeChanged(className()); + if (attrName == idAttributeName()) { + // Notify resources about id changes, this is important as we cache resources by id in SVGDocumentExtensions + if (renderer() && renderer()->isSVGResource()) { + RenderSVGResource* resource = renderer()->toRenderSVGResource(); + resource->idChanged(); + } + } + // If we're the child of a resource element, be sure to invalidate it. invalidateResourcesInAncestorChain(); @@ -223,24 +232,12 @@ void SVGStyledElement::invalidateResources() if (!object) return; - const SVGRenderStyle* svgStyle = object->style()->svgStyle(); Document* document = this->document(); if (document->parsing()) return; -#if ENABLE(FILTERS) - SVGResourceFilter* filter = getFilterById(document, svgStyle->filter(), object); - if (filter) - filter->invalidate(); -#endif - - if (RenderSVGResourceMasker* masker = getRenderSVGResourceById(document, svgStyle->maskElement())) - masker->invalidateClient(object); - - SVGResourceClipper* clipper = getClipperById(document, svgStyle->clipPath(), object); - if (clipper) - clipper->invalidate(); + deregisterFromResources(object); } void SVGStyledElement::invalidateResourcesInAncestorChain() const @@ -329,6 +326,13 @@ void SVGStyledElement::setInstanceUpdatesBlocked(bool value) rareSVGData()->setInstanceUpdatesBlocked(value); } +AffineTransform SVGStyledElement::localCoordinateSpaceTransform(SVGLocatable::CTMScope) const +{ + // To be overriden by SVGStyledLocatableElement/SVGStyledTransformableElement (or as special case SVGTextElement) + ASSERT_NOT_REACHED(); + return AffineTransform(); +} + } #endif // ENABLE(SVG) -- cgit v1.1