Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: Source/WebCore/rendering/svg/RenderSVGInlineText.cpp

Issue 10443073: Merge 117225 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/rendering/svg/RenderSVGInlineText.h ('k') | Source/WebCore/rendering/svg/RenderSVGText.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « Source/WebCore/rendering/svg/RenderSVGInlineText.h ('k') | Source/WebCore/rendering/svg/RenderSVGText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698