| Index: third_party/WebKit/Source/platform/fonts/FontDescription.cpp
|
| diff --git a/third_party/WebKit/Source/platform/fonts/FontDescription.cpp b/third_party/WebKit/Source/platform/fonts/FontDescription.cpp
|
| index cde54996f91e78b47033a4320ff8b9765813cfd4..4ffcf1fb1a8b4c15eb449ba8ff07d147f0049a11 100644
|
| --- a/third_party/WebKit/Source/platform/fonts/FontDescription.cpp
|
| +++ b/third_party/WebKit/Source/platform/fonts/FontDescription.cpp
|
| @@ -281,9 +281,13 @@ unsigned FontDescription::styleHashWithoutFamilyList() const
|
| SkFontStyle FontDescription::skiaFontStyle() const
|
| {
|
| int width = static_cast<int>(stretch());
|
| - SkFontStyle::Slant slant = style() == FontStyleItalic
|
| - ? SkFontStyle::kItalic_Slant
|
| - : SkFontStyle::kUpright_Slant;
|
| + SkFontStyle::Slant slant = SkFontStyle::kUpright_Slant;
|
| + switch (style()) {
|
| + case FontStyleNormal: slant = SkFontStyle::kUpright_Slant; break;
|
| + case FontStyleItalic: slant = SkFontStyle::kItalic_Slant; break;
|
| + case FontStyleOblique: slant = SkFontStyle::kOblique_Slant; break;
|
| + default: NOTREACHED(); break;
|
| + }
|
| return SkFontStyle(numericFontWeight(weight()), width, slant);
|
| static_assert(
|
| static_cast<int>(FontStretchUltraCondensed) == static_cast<int>(SkFontStyle::kUltraCondensed_Width),
|
|
|