| Index: Source/core/css/CSSPrimitiveValue.cpp
|
| diff --git a/Source/core/css/CSSPrimitiveValue.cpp b/Source/core/css/CSSPrimitiveValue.cpp
|
| index e108efc08326887ce6c5331db99dc44ab69d9e3e..e24c30bea9453937fc4dd521d15c9987bc9cfe39 100644
|
| --- a/Source/core/css/CSSPrimitiveValue.cpp
|
| +++ b/Source/core/css/CSSPrimitiveValue.cpp
|
| @@ -563,7 +563,7 @@ double CSSPrimitiveValue::computeLengthDouble(const CSSToLengthConversionData& c
|
| return m_value.calc->computeLengthPx(conversionData);
|
|
|
| const RenderStyle& style = conversionData.style();
|
| - const RenderStyle& rootStyle = conversionData.rootStyle();
|
| + const RenderStyle* rootStyle = conversionData.rootStyle();
|
| bool computingFontSize = conversionData.computingFontSize();
|
|
|
| double factor;
|
| @@ -582,7 +582,10 @@ double CSSPrimitiveValue::computeLengthDouble(const CSSToLengthConversionData& c
|
| factor = (computingFontSize ? style.fontDescription().specifiedSize() : style.fontDescription().computedSize()) / 2.0;
|
| break;
|
| case CSS_REMS:
|
| - factor = computingFontSize ? rootStyle.fontDescription().specifiedSize() : rootStyle.fontDescription().computedSize();
|
| + if (rootStyle)
|
| + factor = computingFontSize ? rootStyle->fontDescription().specifiedSize() : rootStyle->fontDescription().computedSize();
|
| + else
|
| + factor = 1.0;
|
| break;
|
| case CSS_CHS:
|
| factor = style.fontMetrics().zeroWidth();
|
|
|