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

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

Issue 7947002: Merge 95301 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 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') | no next file » | 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 95426)
+++ Source/WebCore/rendering/svg/RenderSVGInlineText.cpp (working copy)
@@ -87,8 +87,6 @@
// The text metrics may be influenced by style changes.
if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(this))
textRenderer->setNeedsPositioningValuesUpdate();
-
- updateScaledFont();
}
const RenderStyle* newStyle = style();
@@ -223,6 +221,19 @@
return createVisiblePosition(offset + closestDistanceBox->start(), offset > 0 ? VP_UPSTREAM_IF_POSSIBLE : DOWNSTREAM);
}
+void RenderSVGInlineText::setStyle(PassRefPtr<RenderStyle> style)
+{
+ RenderText::setStyle(style);
+
+ // The cached scaledFont needs to be updated on every style set call. It
+ // is not similar to m_style which can get derived from parent's style and
+ // hence will get automatically updated on ancestor's style change. This is
+ // required, otherwise we will maintain stale font list in cached scaledFont
+ // when custom fonts are retired on Document::recalcStyle. See webkit bug
+ // https://bugs.webkit.org/show_bug.cgi?id=68060.
+ updateScaledFont();
+}
+
void RenderSVGInlineText::updateScaledFont()
{
computeNewScaledFontForStyle(this, style(), m_scalingFactor, m_scaledFont);
« no previous file with comments | « Source/WebCore/rendering/svg/RenderSVGInlineText.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698