summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGStyledElement.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-04-27 16:31:00 +0100
committerSteve Block <steveblock@google.com>2010-05-11 14:42:12 +0100
commitdcc8cf2e65d1aa555cce12431a16547e66b469ee (patch)
tree92a8d65cd5383bca9749f5327fb5e440563926e6 /WebCore/svg/SVGStyledElement.cpp
parentccac38a6b48843126402088a309597e682f40fe6 (diff)
downloadexternal_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.zip
external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.gz
external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.bz2
Merge webkit.org at r58033 : Initial merge by git
Change-Id: If006c38561af287c50cd578d251629b51e4d8cd1
Diffstat (limited to 'WebCore/svg/SVGStyledElement.cpp')
-rw-r--r--WebCore/svg/SVGStyledElement.cpp36
1 files changed, 20 insertions, 16 deletions
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 <wtf/Assertions.h>
@@ -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<RenderSVGResourceMasker>(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)