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

Unified Diff: Source/core/rendering/svg/RenderSVGText.cpp

Issue 176853009: Fix crash in SVGFontFaceElement::associatedFontElement crash when removing SVGFontFaceElement. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed patch conflict Created 6 years, 10 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/core/rendering/svg/RenderSVGText.h ('k') | Source/core/svg/SVGFontFaceElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGText.cpp
diff --git a/Source/core/rendering/svg/RenderSVGText.cpp b/Source/core/rendering/svg/RenderSVGText.cpp
index 0a97525350be48edd22c4cfe7ec0975f2978ab7f..fbe9cdab85f7526fbd78f84a096cba6272f33722 100644
--- a/Source/core/rendering/svg/RenderSVGText.cpp
+++ b/Source/core/rendering/svg/RenderSVGText.cpp
@@ -266,9 +266,8 @@ void RenderSVGText::subtreeChildWasRemoved(const Vector<SVGTextLayoutAttributes*
m_layoutAttributesBuilder.buildLayoutAttributesForTextRenderer(affectedAttributes[i]->context());
}
-void RenderSVGText::subtreeStyleDidChange(RenderSVGInlineText* text)
+void RenderSVGText::subtreeStyleDidChange()
{
- ASSERT(text);
if (!shouldHandleSubtreeMutations() || documentBeingDestroyed())
return;
@@ -277,7 +276,7 @@ void RenderSVGText::subtreeStyleDidChange(RenderSVGInlineText* text)
// Only update the metrics cache, but not the text positioning element cache
// nor the layout attributes cached in the leaf #text renderers.
FontCachePurgePreventer fontCachePurgePreventer;
- for (RenderObject* descendant = text; descendant; descendant = descendant->nextInPreOrder(text)) {
+ for (RenderObject* descendant = firstChild(); descendant; descendant = descendant->nextInPreOrder(this)) {
if (descendant->isSVGInlineText())
m_layoutAttributesBuilder.rebuildMetricsForTextRenderer(toRenderSVGInlineText(descendant));
}
@@ -322,6 +321,9 @@ static inline void updateFontInAllDescendants(RenderObject* start, SVGTextLayout
void RenderSVGText::layout()
{
ASSERT(needsLayout());
+
+ subtreeStyleDidChange();
+
LayoutRectRecorder recorder(*this);
LayoutRepainter repainter(*this, SVGRenderSupport::checkForSVGRepaintDuringLayout(this));
« no previous file with comments | « Source/core/rendering/svg/RenderSVGText.h ('k') | Source/core/svg/SVGFontFaceElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698