Index: Source/core/css/FontSize.cpp |
diff --git a/Source/core/css/FontSize.cpp b/Source/core/css/FontSize.cpp |
index 10d144080f0f95fd09e52585292e2314191e2119..6f482d0f9ffe1b8ba36fa9b7e51aba2968a4b3b7 100644 |
--- a/Source/core/css/FontSize.cpp |
+++ b/Source/core/css/FontSize.cpp |
@@ -128,9 +128,9 @@ static int inline rowFromMediumFontSizeInRange(const Settings* settings, bool qu |
return -1; |
} |
-float FontSize::fontSizeForKeyword(const Document* document, CSSValueID keyword, FixedPitchFontType fixedPitchFontType) |
+float FontSize::fontSizeForKeyword(const Document* document, unsigned keyword, FixedPitchFontType fixedPitchFontType) |
{ |
- ASSERT(keyword >= CSSValueXxSmall && keyword <= CSSValueWebkitXxxLarge); |
+ ASSERT(keyword >= 1 && keyword <= 8); |
const Settings* settings = document->settings(); |
if (!settings) |
return 1.0f; |
@@ -139,13 +139,13 @@ float FontSize::fontSizeForKeyword(const Document* document, CSSValueID keyword, |
int mediumSize = 0; |
int row = rowFromMediumFontSizeInRange(settings, quirksMode, fixedPitchFontType, mediumSize); |
if (row >= 0) { |
- int col = (keyword - CSSValueXxSmall); |
+ int col = (keyword - 1); |
return quirksMode ? quirksFontSizeTable[row][col] : strictFontSizeTable[row][col]; |
} |
// Value is outside the range of the table. Apply the scale factor instead. |
float minLogicalSize = std::max(settings->minimumLogicalFontSize(), 1); |
- return std::max(fontSizeFactors[keyword - CSSValueXxSmall] * mediumSize, minLogicalSize); |
+ return std::max(fontSizeFactors[keyword - 1] * mediumSize, minLogicalSize); |
} |