⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 236013 in webkit


Ignore:
Timestamp:
Sep 14, 2018, 11:33:44 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Bug 189541 - Build error in FontDescriptionKey::computeHash when compiling FontTaggedSettings and FontCascadeFonts together
​https://bugs.webkit.org/show_bug.cgi?id=189541

Patch by Frederic Wang <​fwang@igalia.com> on 2018-09-14
Reviewed by Alex Christensen.

FontDescriptionKey::computeHash() from In FontCache.h requires implicit instantiation of the
FontTaggedSettings::hash() template function. This instantiation may happen before
FontTaggedSettings::hash() is actually fully specialized in FontTaggedSettings.cpp. To avoid
compiler errors when FontCache.h and FontTaggedSettings.cpp are in the same translation unit,
we declare full specialization of the hash() functions in FontTaggedSettings.h.

No new tests, behavior unchanged.

  • platform/graphics/FontCache.h: Explicitly include FontTaggedSettings to avoid possible future breakage.
  • platform/graphics/FontTaggedSettings.h: Declare full specialization of FontTaggedSettings::hash().
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r236011 r236013  
     12018-09-14  Frederic Wang  <fwang@igalia.com>
     2
     3        Bug 189541 - Build error in FontDescriptionKey::computeHash when compiling FontTaggedSettings and FontCascadeFonts together
     4        https://bugs.webkit.org/show_bug.cgi?id=189541
     5
     6        Reviewed by Alex Christensen.
     7
     8        FontDescriptionKey::computeHash() from In FontCache.h requires implicit instantiation of the
     9        FontTaggedSettings::hash() template function. This instantiation may happen before
     10        FontTaggedSettings::hash() is actually fully specialized in FontTaggedSettings.cpp. To avoid
     11        compiler errors when FontCache.h and FontTaggedSettings.cpp are in the same translation unit,
     12        we declare full specialization of the hash() functions in FontTaggedSettings.h.
     13
     14        No new tests, behavior unchanged.
     15
     16        * platform/graphics/FontCache.h: Explicitly include FontTaggedSettings to avoid possible future breakage.
     17        * platform/graphics/FontTaggedSettings.h: Declare full specialization of FontTaggedSettings::hash().
     18
    1192018-09-14  Ryan Haddad  <ryanhaddad@apple.com>
    220
  • trunk/Source/WebCore/platform/graphics/FontCache.h

    r233935 r236013  
    3232#include "FontDescription.h"
    3333#include "FontPlatformData.h"
     34#include "FontTaggedSettings.h"
    3435#include "Timer.h"
    3536#include <array>
  • trunk/Source/WebCore/platform/graphics/FontTaggedSettings.h

    r220503 r236013  
    140140typedef FontTaggedSettings<int> FontFeatureSettings;
    141141
     142template <> unsigned FontFeatureSettings::hash() const;
     143
    142144#if ENABLE(VARIATION_FONTS)
    143145
    144146typedef FontTaggedSettings<float> FontVariationSettings;
    145147WTF::TextStream& operator<<(WTF::TextStream&, const FontVariationSettings&);
     148
     149template <> unsigned FontVariationSettings::hash() const;
    146150
    147151#else
Note: See TracChangeset for help on using the changeset viewer.