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 2d164d9cda42f5c8ccc4a7659162653c56b87843..cd6c4f58e38c53a8b57941302253d31842339933 100644 |
--- a/third_party/WebKit/Source/platform/fonts/FontDescription.cpp |
+++ b/third_party/WebKit/Source/platform/fonts/FontDescription.cpp |
@@ -42,7 +42,7 @@ struct SameSizeAsFontDescription { |
RefPtr<FontFeatureSettings> m_featureSettings; |
AtomicString locale; |
float sizes[6]; |
- uint32_t bitfields[2]; |
+ FieldsAsUnsignedType bitfields; |
}; |
static_assert(sizeof(FontDescription) == sizeof(SameSizeAsFontDescription), "FontDescription should stay small"); |
@@ -154,6 +154,13 @@ void FontDescription::setVariantLigatures(const VariantLigatures& ligatures) |
updateTypesettingFeatures(); |
} |
+void FontDescription::setVariantNumeric(const FontVariantNumeric& variantNumeric) |
+{ |
+ m_fields.m_variantNumeric = variantNumeric.m_fieldsAsUnsigned; |
+ |
+ updateTypesettingFeatures(); |
+} |
+ |
float FontDescription::effectiveFontSize() const |
{ |
// Ensure that the effective precision matches the font-cache precision. |
@@ -271,8 +278,8 @@ unsigned FontDescription::styleHashWithoutFamilyList() const |
addFloatToHash(hash, m_sizeAdjust); |
addFloatToHash(hash, m_letterSpacing); |
addFloatToHash(hash, m_wordSpacing); |
- addToHash(hash, m_fieldsAsUnsigned[0]); |
- addToHash(hash, m_fieldsAsUnsigned[1]); |
+ addToHash(hash, m_fieldsAsUnsigned.f[0]); |
+ addToHash(hash, m_fieldsAsUnsigned.f[1]); |
return hash; |
} |