From e2b458f91171bbf19531e243652a88cfa8539658 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Thu, 12 Apr 2012 18:27:03 +0100 Subject: Cherry-pick WebKit change r106251 to fix a LayoutTest crash fast/css/fontsize-unit-rems-crash.html See http://trac.webkit.org/changeset/106251 Bug: 6329315 Change-Id: I2d4208a280f71dcd2d69f5d34fae9604680abb58 --- Source/WebCore/css/CSSPrimitiveValue.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/WebCore/css/CSSPrimitiveValue.cpp') diff --git a/Source/WebCore/css/CSSPrimitiveValue.cpp b/Source/WebCore/css/CSSPrimitiveValue.cpp index 04f1089..237844e 100644 --- a/Source/WebCore/css/CSSPrimitiveValue.cpp +++ b/Source/WebCore/css/CSSPrimitiveValue.cpp @@ -316,7 +316,8 @@ double CSSPrimitiveValue::computeLengthDouble(RenderStyle* style, RenderStyle* r break; case CSS_REMS: applyZoomMultiplier = false; - factor = computingFontSize ? rootStyle->fontDescription().specifiedSize() : rootStyle->fontDescription().computedSize(); + if (rootStyle) + factor = computingFontSize ? rootStyle->fontDescription().specifiedSize() : rootStyle->fontDescription().computedSize(); break; case CSS_PX: break; -- cgit v1.1