Ignore:
Timestamp:
Nov 21, 2019, 7:56:06 PM (5 years ago)
Author:
[email protected]
Message:

Remove font-variant @font-face descriptor
https://bugs.webkit.org/show_bug.cgi?id=203179

Reviewed by Simon Fraser.

Source/WebCore:

As per https://github.com/w3c/csswg-drafts/issues/2531

Deleted relevant tests.

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::font):
(WebCore::CSSFontFace::setVariantLigatures): Deleted.
(WebCore::CSSFontFace::setVariantPosition): Deleted.
(WebCore::CSSFontFace::setVariantCaps): Deleted.
(WebCore::CSSFontFace::setVariantNumeric): Deleted.
(WebCore::CSSFontFace::setVariantAlternates): Deleted.
(WebCore::CSSFontFace::setVariantEastAsian): Deleted.

  • css/CSSFontFace.h:
  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::load):
(WebCore::CSSFontFaceSource::font):

  • css/CSSFontFaceSource.h:
  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::addFontFaceRule):

  • css/FontFace.cpp:

(WebCore::FontFace::create):
(WebCore::FontFace::setVariant): Deleted.
(WebCore::FontFace::variant const): Deleted.

  • css/FontFace.h:
  • css/FontFace.idl:
  • loader/cache/CachedFont.cpp:

(WebCore::CachedFont::createFont):
(WebCore::CachedFont::platformDataFromCustomData):

  • loader/cache/CachedFont.h:
  • loader/cache/CachedSVGFont.cpp:

(WebCore::CachedSVGFont::createFont):
(WebCore::CachedSVGFont::platformDataFromCustomData):

  • loader/cache/CachedSVGFont.h:
  • platform/graphics/FontCache.cpp:

(WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
(WebCore::FontPlatformDataCacheKey::operator== const):
(WebCore::FontPlatformDataCacheKeyHash::hash):
(WebCore::FontCache::getCachedFontPlatformData):
(WebCore::FontCache::fontForFamily):

  • platform/graphics/FontCache.h:

(WebCore::FontCache::fontForFamily):
(WebCore::FontCache::getCachedFontPlatformData):
(WebCore::FontCache::createFontPlatformDataForTesting):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::preparePlatformFont):
(WebCore::fontWithFamily):
(WebCore::FontCache::createFontPlatformData):
(WebCore::FontCache::systemFallbackForCharacters):

  • platform/graphics/cocoa/FontCacheCoreText.h:
  • platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:

(WebCore::FontFamilySpecificationCoreText::fontRanges const):

  • platform/graphics/mac/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData):

  • platform/graphics/mac/FontCustomPlatformData.h:

LayoutTests:

Delete tests for the removed feature.

  • css3/font-variant-font-face-all-expected.html: Deleted.
  • css3/font-variant-font-face-all.html: Deleted.
  • css3/font-variant-font-face-override-expected.html:
  • css3/font-variant-font-face-override.html:
  • fast/text/font-face-empty-string-expected.txt:
  • fast/text/font-face-empty-string.html:
  • fast/text/font-face-javascript-expected.txt:
  • fast/text/font-face-javascript.html:
File:
1 edited

Legend:

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

    r251413 r252760  
    180180            fontDescription.setComputedSize(1);
    181181            fontDescription.setShouldAllowUserInstalledFonts(m_face.allowUserInstalledFonts());
    182             success = FontCache::singleton().fontForFamily(fontDescription, m_familyNameOrURI, nullptr, nullptr, FontSelectionSpecifiedCapabilities(), true);
     182            success = FontCache::singleton().fontForFamily(fontDescription, m_familyNameOrURI, nullptr, FontSelectionSpecifiedCapabilities(), true);
    183183            if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled()) {
    184184                if (auto* document = fontSelector->document())
     
    190190}
    191191
    192 RefPtr<Font> CSSFontFaceSource::font(const FontDescription& fontDescription, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings& fontFaceFeatures, const FontVariantSettings& fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
     192RefPtr<Font> CSSFontFaceSource::font(const FontDescription& fontDescription, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings& fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
    193193{
    194194    ASSERT(status() == Status::Success);
     
    204204            if (!m_immediateFontCustomPlatformData)
    205205                return nullptr;
    206             return Font::create(CachedFont::platformDataFromCustomData(*m_immediateFontCustomPlatformData, fontDescription, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities), Font::Origin::Remote);
     206            return Font::create(CachedFont::platformDataFromCustomData(*m_immediateFontCustomPlatformData, fontDescription, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceCapabilities), Font::Origin::Remote);
    207207        }
    208208
    209209        // We're local. Just return a Font from the normal cache.
    210210        // We don't want to check alternate font family names here, so pass true as the checkingAlternateName parameter.
    211         return FontCache::singleton().fontForFamily(fontDescription, m_familyNameOrURI, &fontFaceFeatures, &fontFaceVariantSettings, fontFaceCapabilities, true);
     211        return FontCache::singleton().fontForFamily(fontDescription, m_familyNameOrURI, &fontFaceFeatures, fontFaceCapabilities, true);
    212212    }
    213213
     
    217217
    218218        ASSERT(status() == Status::Success);
    219         auto result = m_font->createFont(fontDescription, m_familyNameOrURI, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities);
     219        auto result = m_font->createFont(fontDescription, m_familyNameOrURI, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceCapabilities);
    220220        ASSERT(result);
    221221        return result;
     
    230230    if (!m_inDocumentCustomPlatformData)
    231231        return nullptr;
    232     return Font::create(m_inDocumentCustomPlatformData->fontPlatformData(fontDescription, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities), Font::Origin::Remote);
     232    return Font::create(m_inDocumentCustomPlatformData->fontPlatformData(fontDescription, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceCapabilities), Font::Origin::Remote);
    233233#endif
    234234
Note: See TracChangeset for help on using the changeset viewer.