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 f0012be0fcaa86e9ca0b66a52250b1af3a34eecd..b8c4da4b2f2a63b16a2ba2547c7adfcb0bc34709 100644 |
--- a/third_party/WebKit/Source/platform/fonts/FontDescription.cpp |
+++ b/third_party/WebKit/Source/platform/fonts/FontDescription.cpp |
@@ -224,7 +224,8 @@ FontCacheKey FontDescription::cacheKey( |
static_cast<unsigned>(m_fields.m_subpixelTextPosition); // bit 1 |
return FontCacheKey(creationParams, effectiveFontSize(), |
- options | fontTraits.bitfield() << 8); |
+ options | fontTraits.bitfield() << 8, |
+ m_variationSettings); |
} |
void FontDescription::setDefaultTypesettingFeatures( |
@@ -311,16 +312,9 @@ unsigned FontDescription::styleHashWithoutFamilyList() const { |
addToHash(hash, settings->at(i).value()); |
} |
} |
- const FontVariationSettings* varSettings = variationSettings(); |
- if (varSettings) { |
- unsigned numFeatures = varSettings->size(); |
- for (unsigned i = 0; i < numFeatures; ++i) { |
- const AtomicString& tag = varSettings->at(i).tag(); |
- for (unsigned j = 0; j < tag.length(); j++) |
- stringHasher.addCharacter(tag[j]); |
- addToHash(hash, varSettings->at(i).value()); |
- } |
- } |
+ |
+ if (variationSettings()) |
+ addToHash(hash, variationSettings()->hash()); |
if (m_locale) { |
const AtomicString& locale = m_locale->localeString(); |