WebKit Bugzilla
Attachment 349755 Details for
Bug 189541
: Build error in FontDescriptionKey::computeHash when compiling FontTaggedSettings and FontCascadeFonts together
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch (move template functions to header)
189541.patch (text/plain), 2.71 KB, created by
Frédéric Wang (:fredw)
on 2018-09-14 02:38:30 PDT
(
hide
)
Description:
Patch (move template functions to header)
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2018-09-14 02:38:30 PDT
Size:
2.71 KB
patch
obsolete
>diff --git a/Source/WebCore/platform/graphics/FontTaggedSettings.cpp b/Source/WebCore/platform/graphics/FontTaggedSettings.cpp >index b0ca43d55c4..3bed3892c3a 100644 >--- a/Source/WebCore/platform/graphics/FontTaggedSettings.cpp >+++ b/Source/WebCore/platform/graphics/FontTaggedSettings.cpp >@@ -32,36 +32,7 @@ > > namespace WebCore { > >-template <> >-unsigned FontFeatureSettings::hash() const >-{ >- IntegerHasher hasher; >- for (auto& feature : m_list) { >- hasher.add(FourCharacterTagHash::hash(feature.tag())); >- hasher.add(feature.value()); >- } >- return hasher.hash(); >-} >- > #if ENABLE(VARIATION_FONTS) >-template <> >-unsigned FontVariationSettings::hash() const >-{ >- static_assert(sizeof(float) == sizeof(int), "IntegerHasher needs to accept floats too"); >- union { >- float f; >- int i; >- } floatToInt; >- >- IntegerHasher hasher; >- for (auto& variation : m_list) { >- hasher.add(FourCharacterTagHash::hash(variation.tag())); >- floatToInt.f = variation.value(); >- hasher.add(floatToInt.i); >- } >- return hasher.hash(); >-} >- > TextStream& operator<<(TextStream& ts, const FontVariationSettings& item) > { > for (unsigned i = 0; i < item.size(); ++i) { >diff --git a/Source/WebCore/platform/graphics/FontTaggedSettings.h b/Source/WebCore/platform/graphics/FontTaggedSettings.h >index 23ca2eec038..70c3c117588 100644 >--- a/Source/WebCore/platform/graphics/FontTaggedSettings.h >+++ b/Source/WebCore/platform/graphics/FontTaggedSettings.h >@@ -28,6 +28,7 @@ > > #include <array> > #include <wtf/HashTraits.h> >+#include <wtf/Hasher.h> > #include <wtf/Vector.h> > > namespace WTF { >@@ -139,11 +140,40 @@ void FontTaggedSettings<T>::insert(FontTaggedSetting<T>&& feature) > typedef FontTaggedSetting<int> FontFeature; > typedef FontTaggedSettings<int> FontFeatureSettings; > >+template <> >+unsigned FontFeatureSettings::hash() const >+{ >+ IntegerHasher hasher; >+ for (auto& feature : m_list) { >+ hasher.add(FourCharacterTagHash::hash(feature.tag())); >+ hasher.add(feature.value()); >+ } >+ return hasher.hash(); >+} >+ > #if ENABLE(VARIATION_FONTS) > > typedef FontTaggedSettings<float> FontVariationSettings; > WTF::TextStream& operator<<(WTF::TextStream&, const FontVariationSettings&); > >+template <> >+unsigned FontVariationSettings::hash() const >+{ >+ static_assert(sizeof(float) == sizeof(int), "IntegerHasher needs to accept floats too"); >+ union { >+ float f; >+ int i; >+ } floatToInt; >+ >+ IntegerHasher hasher; >+ for (auto& variation : m_list) { >+ hasher.add(FourCharacterTagHash::hash(variation.tag())); >+ floatToInt.f = variation.value(); >+ hasher.add(floatToInt.i); >+ } >+ return hasher.hash(); >+} >+ > #else > > struct FontVariationSettings {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189541
:
349537
|
349566
|
349651
| 349755 |
349758