Ignore:
Timestamp:
Feb 22, 2016, 11:17:29 PM (9 years ago)
Author:
[email protected]
Message:

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.

Source/WebCore:

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):

LayoutTests:

  • css3/font-feature-font-face-local-expected.html: Added.
  • css3/font-feature-font-face-local.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSFontFaceSource.cpp

    r196835 r196969  
    138138        // We're local. Just return a Font from the normal cache.
    139139        // We don't want to check alternate font family names here, so pass true as the checkingAlternateName parameter.
    140         return FontCache::singleton().fontForFamily(fontDescription, m_familyNameOrURI, true);
     140        return FontCache::singleton().fontForFamily(fontDescription, m_familyNameOrURI, &fontFaceFeatures, &fontFaceVariantSettings, true);
    141141    }
    142142
Note: See TracChangeset for help on using the changeset viewer.