Index: Source/WebCore/rendering/svg/RenderSVGInlineText.cpp |
=================================================================== |
--- Source/WebCore/rendering/svg/RenderSVGInlineText.cpp (revision 118874) |
+++ Source/WebCore/rendering/svg/RenderSVGInlineText.cpp (working copy) |
@@ -72,37 +72,11 @@ |
{ |
} |
-void RenderSVGInlineText::willBeDestroyed() |
-{ |
- RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(this); |
- if (!textRenderer) { |
- RenderText::willBeDestroyed(); |
- return; |
- } |
- |
- Vector<SVGTextLayoutAttributes*> affectedAttributes; |
- textRenderer->layoutAttributesWillBeDestroyed(this, affectedAttributes); |
- |
- RenderText::willBeDestroyed(); |
- if (affectedAttributes.isEmpty()) |
- return; |
- |
- if (!documentBeingDestroyed()) |
- textRenderer->rebuildLayoutAttributes(affectedAttributes); |
-} |
- |
void RenderSVGInlineText::setTextInternal(PassRefPtr<StringImpl> text) |
{ |
RenderText::setTextInternal(text); |
- |
- // When the underlying text content changes, call both textDOMChanged() & layoutAttributesChanged() |
- // The former will clear the SVGTextPositioningElement cache, which depends on the textLength() of |
- // the RenderSVGInlineText objects, and thus needs to be rebuild. The latter will assure that the |
- // SVGTextLayoutAttributes associated with the RenderSVGInlineText will be updated. |
- if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(this)) { |
- textRenderer->invalidateTextPositioningElements(); |
- textRenderer->layoutAttributesChanged(this); |
- } |
+ if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(this)) |
+ textRenderer->subtreeTextDidChange(this); |
} |
void RenderSVGInlineText::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) |
@@ -127,7 +101,7 @@ |
// The text metrics may be influenced by style changes. |
if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(this)) |
- textRenderer->layoutAttributesChanged(this); |
+ textRenderer->subtreeStyleDidChange(this); |
} |
InlineTextBox* RenderSVGInlineText::createTextBox() |