DescriptionMerge 126959 - style->fontMetrics() should be available when setting line-height
https://bugs.webkit.org/show_bug.cgi?id=93327
Reviewed by Darin Adler.
Source/WebCore:
Setting line-height assumes the fontMetrics are available for the affected font, but
the fontMetrics won't be available immediately after setting other properties like
font-size. Call styleResolver->updateFont() before setting line-height to update fontMetrics.
Added a test case to fast/canvas/crash-set-font.html.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setFont):
Call styleResolver->updateFont() before styleResolver->applyPropertyToCurrentStyle(CSSPropertyLineHeight,...)
LayoutTests:
* fast/canvas/crash-set-font.html: Add a test case that sets both font-size and line-height.
TBR=bashi@chromium.org
Committed: https://trac.webkit.org/changeset/126978
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|