Title: [118877] branches/chromium/1132/Source/WebCore/rendering/svg/RenderSVGText.cpp
- Revision
- 118877
- Author
- [email protected]
- Date
- 2012-05-29 18:52:13 -0700 (Tue, 29 May 2012)
Log Message
Merge 117977
BUG=128800
Review URL: https://chromiumcodereview.appspot.com/10448069
Modified Paths
Diff
Modified: branches/chromium/1132/Source/WebCore/rendering/svg/RenderSVGText.cpp (118876 => 118877)
--- branches/chromium/1132/Source/WebCore/rendering/svg/RenderSVGText.cpp 2012-05-30 01:51:04 UTC (rev 118876)
+++ branches/chromium/1132/Source/WebCore/rendering/svg/RenderSVGText.cpp 2012-05-30 01:52:13 UTC (rev 118877)
@@ -168,7 +168,6 @@
void RenderSVGText::subtreeChildWasAdded(RenderObject* child)
{
ASSERT(child);
- ASSERT(child->isSVGInlineText() || child->isSVGInline());
if (!shouldHandleSubtreeMutations() || documentBeingDestroyed())
return;
@@ -176,6 +175,9 @@
// cache, as the next buildLayoutAttributesForTextRenderer() call rebuilds it.
m_layoutAttributesBuilder.clearTextPositioningElements();
+ if (!child->isSVGInlineText() && !child->isSVGInline())
+ return;
+
// Detect changes in layout attributes and only measure those text parts that have changed!
Vector<SVGTextLayoutAttributes*> newLayoutAttributes;
collectLayoutAttributes(this, newLayoutAttributes);
@@ -238,7 +240,6 @@
void RenderSVGText::subtreeChildWillBeRemoved(RenderObject* child, Vector<SVGTextLayoutAttributes*, 2>& affectedAttributes)
{
ASSERT(child);
- ASSERT(child->isSVGInlineText() || child->isSVGInline());
if (!shouldHandleSubtreeMutations())
return;
@@ -247,7 +248,7 @@
// The positioning elements cache depends on the size of each text renderer in the
// subtree. If this changes, clear the cache. It's going to be rebuilt below.
m_layoutAttributesBuilder.clearTextPositioningElements();
- if (m_layoutAttributes.isEmpty() || child->isSVGInline())
+ if (m_layoutAttributes.isEmpty() || !child->isSVGInlineText())
return;
// This logic requires that the 'text' child is still inserted in the tree.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes