| Index: Source/core/css/CSSComputedStyleDeclaration.cpp
|
| diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp
|
| index 874bfaa9fd2724a41b81bf2201d196eed4e61a64..80eb38d456871bc9ee3a09667fd78a69d91f6eaa 100644
|
| --- a/Source/core/css/CSSComputedStyleDeclaration.cpp
|
| +++ b/Source/core/css/CSSComputedStyleDeclaration.cpp
|
| @@ -130,6 +130,7 @@ static const CSSPropertyID staticComputableProperties[] = {
|
| CSSPropertyFontFamily,
|
| CSSPropertyFontKerning,
|
| CSSPropertyFontSize,
|
| + CSSPropertyFontStretch,
|
| CSSPropertyFontStyle,
|
| CSSPropertyFontVariant,
|
| CSSPropertyFontVariantLigatures,
|
| @@ -1391,6 +1392,32 @@ static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForFontSize(RenderStyle& s
|
| return zoomAdjustedPixelValue(style.fontDescription().computedPixelSize(), style);
|
| }
|
|
|
| +static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForFontStretch(RenderStyle& style)
|
| +{
|
| + switch (style.fontDescription().stretch()) {
|
| + case FontStretchUltraCondensed:
|
| + return cssValuePool().createIdentifierValue(CSSValueUltraCondensed);
|
| + case FontStretchExtraCondensed:
|
| + return cssValuePool().createIdentifierValue(CSSValueExtraCondensed);
|
| + case FontStretchCondensed:
|
| + return cssValuePool().createIdentifierValue(CSSValueCondensed);
|
| + case FontStretchSemiCondensed:
|
| + return cssValuePool().createIdentifierValue(CSSValueSemiCondensed);
|
| + case FontStretchNormal:
|
| + return cssValuePool().createIdentifierValue(CSSValueNormal);
|
| + case FontStretchSemiExpanded:
|
| + return cssValuePool().createIdentifierValue(CSSValueSemiExpanded);
|
| + case FontStretchExpanded:
|
| + return cssValuePool().createIdentifierValue(CSSValueExpanded);
|
| + case FontStretchExtraExpanded:
|
| + return cssValuePool().createIdentifierValue(CSSValueExtraExpanded);
|
| + case FontStretchUltraExpanded:
|
| + return cssValuePool().createIdentifierValue(CSSValueUltraExpanded);
|
| + }
|
| + ASSERT_NOT_REACHED();
|
| + return cssValuePool().createIdentifierValue(CSSValueNormal);
|
| +}
|
| +
|
| static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForFontStyle(RenderStyle& style)
|
| {
|
| if (style.fontDescription().italic())
|
| @@ -1915,6 +1942,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu
|
| computedFont->style = valueForFontStyle(*style);
|
| computedFont->variant = valueForFontVariant(*style);
|
| computedFont->weight = valueForFontWeight(*style);
|
| + computedFont->stretch = valueForFontStretch(*style);
|
| computedFont->size = valueForFontSize(*style);
|
| computedFont->lineHeight = valueForLineHeight(*style);
|
| computedFont->family = valueForFontFamily(*style);
|
| @@ -1930,6 +1958,8 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu
|
| }
|
| case CSSPropertyFontSize:
|
| return valueForFontSize(*style);
|
| + case CSSPropertyFontStretch:
|
| + return valueForFontStretch(*style);
|
| case CSSPropertyFontStyle:
|
| return valueForFontStyle(*style);
|
| case CSSPropertyFontVariant:
|
| @@ -2769,7 +2799,6 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu
|
| break;
|
|
|
| /* Unimplemented @font-face properties */
|
| - case CSSPropertyFontStretch:
|
| case CSSPropertySrc:
|
| case CSSPropertyUnicodeRange:
|
| break;
|
|
|