Diff
Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog (197102 => 197103)
--- releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog 2016-02-25 13:24:28 UTC (rev 197102)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog 2016-02-25 13:40:58 UTC (rev 197103)
@@ -1,3 +1,13 @@
+2016-02-22 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Font features specified in @font-face blocks don't apply to local() families
+ https://bugs.webkit.org/show_bug.cgi?id=154554
+
+ Reviewed by Dean Jackson.
+
+ * css3/font-feature-font-face-local-expected.html: Added.
+ * css3/font-feature-font-face-local.html: Added.
+
2016-02-22 Chris Dumez <cdu...@apple.com>
REGRESSION (r196563): Images not loading on https://klim.co.nz/blog/paypal-sans-design-information/
Added: releases/WebKitGTK/webkit-2.12/LayoutTests/css3/font-feature-font-face-local-expected.html (0 => 197103)
--- releases/WebKitGTK/webkit-2.12/LayoutTests/css3/font-feature-font-face-local-expected.html (rev 0)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/css3/font-feature-font-face-local-expected.html 2016-02-25 13:40:58 UTC (rev 197103)
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: HigaginoSans-fixed;
+ src: local("Hiragino Sans");
+ font-feature-settings: 'hwid','zero';
+}
+pre {
+ font-family: 'HigaginoSans-fixed';
+}
+</style>
+</head>
+<body>
+<pre><span style="font-feature-settings: 'hwid','zero';">12345678901234567890123456789012345678901234567890123456789012345678901234567890</span>
+<span style="font-feature-settings: 'zero';">1234567890123456789012345678901234567890</span>
+<span style="font-feature-settings: 'hwid','zero';">iiiiii
+WWWWWW</span>
+あいう</pre>
+</body>
+</html>
\ No newline at end of file
Added: releases/WebKitGTK/webkit-2.12/LayoutTests/css3/font-feature-font-face-local.html (0 => 197103)
--- releases/WebKitGTK/webkit-2.12/LayoutTests/css3/font-feature-font-face-local.html (rev 0)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/css3/font-feature-font-face-local.html 2016-02-25 13:40:58 UTC (rev 197103)
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: HigaginoSans-fixed;
+ src: local("Hiragino Sans");
+ font-feature-settings: 'hwid','zero';
+}
+pre {
+ font-family: 'HigaginoSans-fixed';
+}
+</style>
+</head>
+<body>
+<pre>12345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890
+iiiiii
+WWWWWW
+あいう</pre>
+</body>
+</html>
\ No newline at end of file
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (197102 => 197103)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-02-25 13:24:28 UTC (rev 197102)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-02-25 13:40:58 UTC (rev 197103)
@@ -1,3 +1,39 @@
+2016-02-22 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Font features specified in @font-face blocks don't apply to local() families
+ https://bugs.webkit.org/show_bug.cgi?id=154554
+
+ Reviewed by Dean Jackson.
+
+ The correct variables just need to be wired up. In addition, our caches need to be sensitive
+ to the new data.
+
+ Test: css3/font-feature-font-face-local.html
+
+ * css/CSSFontFaceSource.cpp:
+ (WebCore::CSSFontFaceSource::font):
+ * platform/graphics/FontCache.cpp:
+ (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
+ (WebCore::FontPlatformDataCacheKey::operator==):
+ (WebCore::FontPlatformDataCacheKeyHash::hash):
+ (WebCore::FontCache::getCachedFontPlatformData):
+ (WebCore::FontCache::fontForFamily):
+ * platform/graphics/FontCache.h:
+ * platform/graphics/FontFeatureSettings.h:
+ (WebCore::FontFeature::operator!=):
+ (WebCore::FontFeatureSettings::operator!=):
+ * platform/graphics/cocoa/FontCacheCoreText.cpp:
+ (WebCore::fontWithFamily):
+ (WebCore::FontCache::createFontPlatformData):
+ * platform/graphics/mac/ComplexTextControllerCoreText.mm:
+ (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
+ * platform/graphics/mac/FontCacheMac.mm:
+ (WebCore::FontCache::lastResortFallbackFont):
+ * platform/text/TextFlags.h:
+ (WebCore::FontVariantSettings::operator==):
+ (WebCore::FontVariantSettings::operator!=):
+ (WebCore::FontVariantSettings::uniqueValue):
+
2016-02-22 Daniel Bates <daba...@apple.com>
REGRESSION (r196892): Crash in DocumentLoader::startLoadingMainResource()
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/css/CSSFontFaceSource.cpp (197102 => 197103)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/css/CSSFontFaceSource.cpp 2016-02-25 13:24:28 UTC (rev 197102)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/css/CSSFontFaceSource.cpp 2016-02-25 13:40:58 UTC (rev 197103)
@@ -137,7 +137,7 @@
if (!m_font && !fontFaceElement) {
// We're local. Just return a Font from the normal cache.
// We don't want to check alternate font family names here, so pass true as the checkingAlternateName parameter.
- return FontCache::singleton().fontForFamily(fontDescription, m_familyNameOrURI, true);
+ return FontCache::singleton().fontForFamily(fontDescription, m_familyNameOrURI, &fontFaceFeatures, &fontFaceVariantSettings, true);
}
if (m_font) {
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/FontCache.cpp (197102 => 197103)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/FontCache.cpp 2016-02-25 13:24:28 UTC (rev 197102)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/FontCache.cpp 2016-02-25 13:40:58 UTC (rev 197103)
@@ -100,9 +100,11 @@
WTF_MAKE_FAST_ALLOCATED;
public:
FontPlatformDataCacheKey() { }
- FontPlatformDataCacheKey(const AtomicString& family, const FontDescription& description)
+ FontPlatformDataCacheKey(const AtomicString& family, const FontDescription& description, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings)
: m_fontDescriptionKey(description)
, m_family(family)
+ , m_fontFaceFeatures(fontFaceFeatures ? *fontFaceFeatures : FontFeatureSettings())
+ , m_fontFaceVariantSettings(fontFaceVariantSettings ? *fontFaceVariantSettings : FontVariantSettings())
{ }
explicit FontPlatformDataCacheKey(HashTableDeletedValueType t)
@@ -113,7 +115,9 @@
bool operator==(const FontPlatformDataCacheKey& other) const
{
- if (m_fontDescriptionKey != other.m_fontDescriptionKey)
+ if (m_fontDescriptionKey != other.m_fontDescriptionKey
+ || m_fontFaceFeatures != other.m_fontFaceFeatures
+ || m_fontFaceVariantSettings != other.m_fontFaceVariantSettings)
return false;
if (m_family.impl() == other.m_family.impl())
return true;
@@ -124,12 +128,19 @@
FontDescriptionKey m_fontDescriptionKey;
AtomicString m_family;
+ FontFeatureSettings m_fontFaceFeatures;
+ FontVariantSettings m_fontFaceVariantSettings;
};
struct FontPlatformDataCacheKeyHash {
static unsigned hash(const FontPlatformDataCacheKey& fontKey)
{
- return pairIntHash(ASCIICaseInsensitiveHash::hash(fontKey.m_family), fontKey.m_fontDescriptionKey.computeHash());
+ IntegerHasher hasher;
+ hasher.add(ASCIICaseInsensitiveHash::hash(fontKey.m_family));
+ hasher.add(fontKey.m_fontDescriptionKey.computeHash());
+ hasher.add(fontKey.m_fontFaceFeatures.hash());
+ hasher.add(fontKey.m_fontFaceVariantSettings.uniqueValue());
+ return hasher.hash();
}
static bool equal(const FontPlatformDataCacheKey& a, const FontPlatformDataCacheKey& b)
@@ -207,9 +218,8 @@
return nullAtom;
}
-FontPlatformData* FontCache::getCachedFontPlatformData(const FontDescription& fontDescription,
- const AtomicString& passedFamilyName,
- bool checkingAlternateName)
+FontPlatformData* FontCache::getCachedFontPlatformData(const FontDescription& fontDescription, const AtomicString& passedFamilyName,
+ const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, bool checkingAlternateName)
{
#if PLATFORM(IOS)
FontLocker fontLocker;
@@ -231,19 +241,19 @@
initialized = true;
}
- FontPlatformDataCacheKey key(familyName, fontDescription);
+ FontPlatformDataCacheKey key(familyName, fontDescription, fontFaceFeatures, fontFaceVariantSettings);
auto addResult = fontPlatformDataCache().add(key, nullptr);
FontPlatformDataCache::iterator it = addResult.iterator;
if (addResult.isNewEntry) {
- it->value = createFontPlatformData(fontDescription, familyName);
+ it->value = createFontPlatformData(fontDescription, familyName, fontFaceFeatures, fontFaceVariantSettings);
if (!it->value && !checkingAlternateName) {
// We were unable to find a font. We have a small set of fonts that we alias to other names,
// e.g., Arial/Helvetica, Courier/Courier New, etc. Try looking up the font under the aliased name.
const AtomicString alternateName = alternateFamilyName(familyName);
if (!alternateName.isNull()) {
- FontPlatformData* fontPlatformDataForAlternateName = getCachedFontPlatformData(fontDescription, alternateName, true);
+ FontPlatformData* fontPlatformDataForAlternateName = getCachedFontPlatformData(fontDescription, alternateName, fontFaceFeatures, fontFaceVariantSettings, true);
// Lookup the key in the hash table again as the previous iterator may have
// been invalidated by the recursive call to getCachedFontPlatformData().
it = fontPlatformDataCache().find(key);
@@ -364,12 +374,12 @@
const unsigned cMaxUnderMemoryPressureInactiveFontData = 50;
const unsigned cTargetUnderMemoryPressureInactiveFontData = 30;
-RefPtr<Font> FontCache::fontForFamily(const FontDescription& fontDescription, const AtomicString& family, bool checkingAlternateName)
+RefPtr<Font> FontCache::fontForFamily(const FontDescription& fontDescription, const AtomicString& family, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, bool checkingAlternateName)
{
if (!m_purgeTimer.isActive())
m_purgeTimer.startOneShot(std::chrono::milliseconds::zero());
- FontPlatformData* platformData = getCachedFontPlatformData(fontDescription, family, checkingAlternateName);
+ FontPlatformData* platformData = getCachedFontPlatformData(fontDescription, family, fontFaceFeatures, fontFaceVariantSettings, checkingAlternateName);
if (!platformData)
return nullptr;
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/FontCache.h (197102 => 197103)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/FontCache.h 2016-02-25 13:24:28 UTC (rev 197102)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/FontCache.h 2016-02-25 13:40:58 UTC (rev 197103)
@@ -188,7 +188,7 @@
// It comes into play when you create an @font-face which shares a family name as a preinstalled font.
Vector<FontTraitsMask> getTraitsInFamily(const AtomicString&);
- WEBCORE_EXPORT RefPtr<Font> fontForFamily(const FontDescription&, const AtomicString&, bool checkingAlternateName = false);
+ WEBCORE_EXPORT RefPtr<Font> fontForFamily(const FontDescription&, const AtomicString&, const FontFeatureSettings* fontFaceFeatures = nullptr, const FontVariantSettings* fontFaceVariantSettings = nullptr, bool checkingAlternateName = false);
WEBCORE_EXPORT Ref<Font> lastResortFallbackFont(const FontDescription&);
WEBCORE_EXPORT Ref<Font> fontForPlatformData(const FontPlatformData&);
RefPtr<Font> similarFont(const FontDescription&, const AtomicString& family);
@@ -220,13 +220,13 @@
WEBCORE_EXPORT void purgeInactiveFontDataIfNeeded();
// FIXME: This method should eventually be removed.
- FontPlatformData* getCachedFontPlatformData(const FontDescription&, const AtomicString& family, bool checkingAlternateName = false);
+ FontPlatformData* getCachedFontPlatformData(const FontDescription&, const AtomicString& family, const FontFeatureSettings* fontFaceFeatures = nullptr, const FontVariantSettings* fontFaceVariantSettings = nullptr, bool checkingAlternateName = false);
// These methods are implemented by each platform.
#if PLATFORM(COCOA)
FontPlatformData* getCustomFallbackFont(const UInt32, const FontDescription&);
#endif
- std::unique_ptr<FontPlatformData> createFontPlatformData(const FontDescription&, const AtomicString& family);
+ std::unique_ptr<FontPlatformData> createFontPlatformData(const FontDescription&, const AtomicString& family, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings);
Timer m_purgeTimer;
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/FontFeatureSettings.h (197102 => 197103)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/FontFeatureSettings.h 2016-02-25 13:24:28 UTC (rev 197102)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/FontFeatureSettings.h 2016-02-25 13:40:58 UTC (rev 197103)
@@ -60,6 +60,7 @@
FontFeature(FontFeatureTag&&, int value);
bool operator==(const FontFeature& other) const;
+ bool operator!=(const FontFeature& other) const { return !(*this == other); }
bool operator<(const FontFeature& other) const;
const FontFeatureTag& tag() const { return m_tag; }
@@ -75,6 +76,7 @@
public:
void insert(FontFeature&&);
bool operator==(const FontFeatureSettings& other) const { return m_list == other.m_list; }
+ bool operator!=(const FontFeatureSettings& other) const { return !(*this == other); }
size_t size() const { return m_list.size(); }
const FontFeature& operator[](int index) const { return m_list[index]; }
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (197102 => 197103)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2016-02-25 13:24:28 UTC (rev 197102)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2016-02-25 13:40:58 UTC (rev 197103)
@@ -671,7 +671,7 @@
}
#endif
-static RetainPtr<CTFontRef> fontWithFamily(const AtomicString& family, CTFontSymbolicTraits desiredTraits, FontWeight weight, const FontFeatureSettings& featureSettings, const FontVariantSettings& variantSettings, const TextRenderingMode& textRenderingMode, float size)
+static RetainPtr<CTFontRef> fontWithFamily(const AtomicString& family, CTFontSymbolicTraits desiredTraits, FontWeight weight, const FontFeatureSettings& featureSettings, const FontVariantSettings& variantSettings, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, const TextRenderingMode& textRenderingMode, float size)
{
if (family.isEmpty())
return nullptr;
@@ -684,7 +684,7 @@
foundFont = platformFontWithFamily(family, desiredTraits, weight, textRenderingMode, size);
#endif
}
- return preparePlatformFont(foundFont.get(), textRenderingMode, nullptr, nullptr, featureSettings, variantSettings);
+ return preparePlatformFont(foundFont.get(), textRenderingMode, fontFaceFeatures, fontFaceVariantSettings, featureSettings, variantSettings);
}
#if PLATFORM(MAC)
@@ -719,12 +719,12 @@
}
#endif
-std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family)
+std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings)
{
CTFontSymbolicTraits traits = computeTraits(fontDescription);
float size = fontDescription.computedPixelSize();
- RetainPtr<CTFontRef> font = fontWithFamily(family, traits, fontDescription.weight(), fontDescription.featureSettings(), fontDescription.variantSettings(), fontDescription.textRenderingMode(), size);
+ RetainPtr<CTFontRef> font = fontWithFamily(family, traits, fontDescription.weight(), fontDescription.featureSettings(), fontDescription.variantSettings(), fontFaceFeatures, fontFaceVariantSettings, fontDescription.textRenderingMode(), size);
#if PLATFORM(MAC)
if (!font) {
@@ -735,7 +735,7 @@
// Ignore the result because we want to use our own algorithm to actually find the font.
autoActivateFont(family.string(), size);
- font = fontWithFamily(family, traits, fontDescription.weight(), fontDescription.featureSettings(), fontDescription.variantSettings(), fontDescription.textRenderingMode(), size);
+ font = fontWithFamily(family, traits, fontDescription.weight(), fontDescription.featureSettings(), fontDescription.variantSettings(), fontFaceFeatures, fontFaceVariantSettings, fontDescription.textRenderingMode(), size);
}
#endif
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp (197102 => 197103)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp 2016-02-25 13:24:28 UTC (rev 197102)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp 2016-02-25 13:40:58 UTC (rev 197103)
@@ -134,7 +134,7 @@
// We want to return a fallback font here, otherwise the logic preventing FontConfig
// matches for non-fallback fonts might return 0. See isFallbackFontAllowed.
static AtomicString timesStr("serif");
- return *fontForFamily(fontDescription, timesStr, false);
+ return *fontForFamily(fontDescription, timesStr);
}
Vector<FontTraitsMask> FontCache::getTraitsInFamily(const AtomicString&)
@@ -326,7 +326,7 @@
|| equalLettersIgnoringASCIICase(familyNameString, "cursive");
}
-std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family)
+std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family, const FontFeatureSettings*, const FontVariantSettings*)
{
// The CSS font matching algorithm (http://www.w3.org/TR/css3-fonts/#font-matching-algorithm)
// says that we must find an exact match for font family, slant (italic or oblique can be used)
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm (197102 => 197103)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm 2016-02-25 13:24:28 UTC (rev 197102)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm 2016-02-25 13:40:58 UTC (rev 197103)
@@ -120,7 +120,7 @@
Ref<Font> FontCache::lastResortFallbackFont(const FontDescription& fontDescription)
{
- return *fontForFamily(fontDescription, AtomicString(".PhoneFallback", AtomicString::ConstructFromLiteral), false);
+ return *fontForFamily(fontDescription, AtomicString(".PhoneFallback", AtomicString::ConstructFromLiteral));
}
float FontCache::weightOfCTFont(CTFontRef font)
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm (197102 => 197103)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm 2016-02-25 13:24:28 UTC (rev 197102)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm 2016-02-25 13:40:58 UTC (rev 197103)
@@ -286,7 +286,7 @@
continue;
}
auto& fontCache = FontCache::singleton();
- runFont = fontCache.fontForFamily(m_font.fontDescription(), fontName.get(), false).get();
+ runFont = fontCache.fontForFamily(m_font.fontDescription(), fontName.get()).get();
// Core Text may have used a font that our font lookup path cannot find. In that case, fall back on
// using the font as returned.
if (!runFont) {
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/mac/FontCacheMac.mm (197102 => 197103)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/mac/FontCacheMac.mm 2016-02-25 13:24:28 UTC (rev 197102)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/mac/FontCacheMac.mm 2016-02-25 13:40:58 UTC (rev 197103)
@@ -395,14 +395,14 @@
{
// FIXME: Would be even better to somehow get the user's default font here. For now we'll pick
// the default that the user would get without changing any prefs.
- if (RefPtr<Font> font = fontForFamily(fontDescription, AtomicString("Times", AtomicString::ConstructFromLiteral), false))
+ if (RefPtr<Font> font = fontForFamily(fontDescription, AtomicString("Times", AtomicString::ConstructFromLiteral)))
return *font;
// The Times fallback will almost always work, but in the highly unusual case where
// the user doesn't have it, we fall back on Lucida Grande because that's
// guaranteed to be there, according to Nathan Taylor. This is good enough
// to avoid a crash at least.
- return *fontForFamily(fontDescription, AtomicString("Lucida Grande", AtomicString::ConstructFromLiteral), false);
+ return *fontForFamily(fontDescription, AtomicString("Lucida Grande", AtomicString::ConstructFromLiteral), nullptr, nullptr, false);
}
} // namespace WebCore
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/win/FontCacheWin.cpp (197102 => 197103)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/win/FontCacheWin.cpp 2016-02-25 13:24:28 UTC (rev 197102)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/win/FontCacheWin.cpp 2016-02-25 13:40:58 UTC (rev 197103)
@@ -560,7 +560,7 @@
return result;
}
-std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family)
+std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family, const FontFeatureSettings*, const FontVariantSettings*)
{
bool isLucidaGrande = equalLettersIgnoringASCIICase(family, "lucida grande");
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/text/TextFlags.h (197102 => 197103)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/text/TextFlags.h 2016-02-25 13:24:28 UTC (rev 197102)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/text/TextFlags.h 2016-02-25 13:40:58 UTC (rev 197103)
@@ -212,7 +212,7 @@
&& eastAsianRuby == FontVariantEastAsianRuby::Normal;
}
- bool operator==(const FontVariantSettings& other)
+ bool operator==(const FontVariantSettings& other) const
{
return commonLigatures == other.commonLigatures
&& discretionaryLigatures == other.discretionaryLigatures
@@ -231,6 +231,27 @@
&& eastAsianRuby == other.eastAsianRuby;
}
+ bool operator!=(const FontVariantSettings& other) const { return !(*this == other); }
+
+ unsigned uniqueValue() const
+ {
+ return static_cast<unsigned>(commonLigatures) << 26
+ | static_cast<unsigned>(discretionaryLigatures) << 24
+ | static_cast<unsigned>(historicalLigatures) << 22
+ | static_cast<unsigned>(contextualAlternates) << 20
+ | static_cast<unsigned>(position) << 18
+ | static_cast<unsigned>(caps) << 15
+ | static_cast<unsigned>(numericFigure) << 13
+ | static_cast<unsigned>(numericSpacing) << 11
+ | static_cast<unsigned>(numericFraction) << 9
+ | static_cast<unsigned>(numericOrdinal) << 8
+ | static_cast<unsigned>(numericSlashedZero) << 7
+ | static_cast<unsigned>(alternates) << 6
+ | static_cast<unsigned>(eastAsianVariant) << 3
+ | static_cast<unsigned>(eastAsianWidth) << 1
+ | static_cast<unsigned>(eastAsianRuby) << 0;
+ }
+
FontVariantLigatures commonLigatures;
FontVariantLigatures discretionaryLigatures;
FontVariantLigatures historicalLigatures;