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

Unified Diff: Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp

Issue 10885027: Merge 126959 - style->fontMetrics() should be available when setting line-height (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 4 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 | « LayoutTests/fast/canvas/crash-set-font.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
===================================================================
--- Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (revision 126960)
+++ Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (working copy)
@@ -2014,11 +2014,12 @@
styleResolver->applyPropertyToCurrentStyle(CSSPropertyFontVariant, parsedStyle->getPropertyCSSValue(CSSPropertyFontVariant).get());
styleResolver->applyPropertyToCurrentStyle(CSSPropertyFontWeight, parsedStyle->getPropertyCSSValue(CSSPropertyFontWeight).get());
- // As described in BUG66291, setting font-size on a font may entail a CSSPrimitiveValue::computeLengthDouble call,
+ // As described in BUG66291, setting font-size and line-height on a font may entail a CSSPrimitiveValue::computeLengthDouble call,
// which assumes the fontMetrics are available for the affected font, otherwise a crash occurs (see http://trac.webkit.org/changeset/96122).
- // The updateFont() call below updates the fontMetrics and ensures the proper setting of font-size.
+ // The updateFont() calls below update the fontMetrics and ensure the proper setting of font-size and line-height.
styleResolver->updateFont();
styleResolver->applyPropertyToCurrentStyle(CSSPropertyFontSize, parsedStyle->getPropertyCSSValue(CSSPropertyFontSize).get());
+ styleResolver->updateFont();
styleResolver->applyPropertyToCurrentStyle(CSSPropertyLineHeight, parsedStyle->getPropertyCSSValue(CSSPropertyLineHeight).get());
modifiableState().m_font = newStyle->font();
« no previous file with comments | « LayoutTests/fast/canvas/crash-set-font.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698