| Index: Source/core/css/FontSize.h
|
| diff --git a/Source/core/css/FontSize.h b/Source/core/css/FontSize.h
|
| index a864114419e9bd87da50201fb01054c4cbb63236..79ad500456c9e36fdca17d6b9e6f16cfd3b0802d 100644
|
| --- a/Source/core/css/FontSize.h
|
| +++ b/Source/core/css/FontSize.h
|
| @@ -40,9 +40,19 @@ private:
|
| public:
|
| static float getComputedSizeFromSpecifiedSize(const Document*, float zoomFactor, bool isAbsoluteSize, float specifiedSize, ESmartMinimumForFontSize = UseSmartMinimumForFontFize);
|
|
|
| - // Given a CSS keyword in the range (xx-small to -webkit-xxx-large), this function will return
|
| - // the correct font size scaled relative to the user's default (medium).
|
| - static float fontSizeForKeyword(const Document*, CSSValueID keyword, FixedPitchFontType);
|
| + // Given a CSS keyword in the range (xx-small to -webkit-xxx-large), this function returns
|
| + // values from '1' to '8'.
|
| + static unsigned keywordSize(CSSValueID valueID)
|
| + {
|
| + ASSERT(valueID >= CSSValueXxSmall && valueID <= CSSValueWebkitXxxLarge);
|
| + return valueID - CSSValueXxSmall + 1;
|
| + }
|
| +
|
| + static unsigned initialKeywordSize() { return 4; } // CSSValueMedium
|
| +
|
| + // Given a keyword size in the range (1 to 8), this function will return
|
| + // the correct font size scaled relative to the user's default (4).
|
| + static float fontSizeForKeyword(const Document*, unsigned keyword, FixedPitchFontType);
|
|
|
| // Given a font size in pixel, this function will return legacy font size between 1 and 7.
|
| static int legacyFontSize(const Document*, int pixelFontSize, FixedPitchFontType);
|
|
|