Index: Source/WebCore/svg/SVGAElement.cpp |
=================================================================== |
--- Source/WebCore/svg/SVGAElement.cpp (revision 112617) |
+++ Source/WebCore/svg/SVGAElement.cpp (working copy) |
@@ -39,6 +39,7 @@ |
#include "MouseEvent.h" |
#include "PlatformMouseEvent.h" |
#include "RenderSVGInline.h" |
+#include "RenderSVGText.h" |
#include "RenderSVGTransformableContainer.h" |
#include "ResourceRequest.h" |
#include "SVGElementInstance.h" |
@@ -236,6 +237,19 @@ |
return SVGElement::childShouldCreateRenderer(child); |
} |
+void SVGAElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) |
+{ |
+ SVGStyledTransformableElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); |
+ |
+ if (changedByParser || !renderer()) |
+ return; |
+ |
+ // Invalidate the TextPosition cache in SVGTextLayoutAttributesBuilder as it may now point |
+ // to no-longer existing SVGTextPositioningElements and thus needs to be rebuilt. |
+ if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(renderer())) |
+ textRenderer->textDOMChanged(); |
+} |
+ |
} // namespace WebCore |
#endif // ENABLE(SVG) |