WebKit Bugzilla
Attachment 349566 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 FontDescriptionKey::computeHash into the corresponding implementation file + inline tag)
bug-189541-20180912203736.patch (text/plain), 3.48 KB, created by
Frédéric Wang (:fredw)
on 2018-09-12 11:37:37 PDT
(
hide
)
Description:
Patch (Move FontDescriptionKey::computeHash into the corresponding implementation file + inline tag)
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2018-09-12 11:37:37 PDT
Size:
3.48 KB
patch
obsolete
>Subversion Revision: 235934 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index eec833acfd519677abd76aa8f000e265390e63db..abf745673f3d5520908dd5d9d3190348dd0d7aa9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2018-09-12 Frederic Wang <fwang@igalia.com> >+ >+ Move FontDescriptionKey::computeHash into the corresponding implementation file >+ https://bugs.webkit.org/show_bug.cgi?id=189541 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ FontDescriptionKey::computeHash requires implicit instantiation of the FontTaggedSettings template. Since the >+ function is implemented directly in the header, this instantiation may happen before FontTaggedSettings::hash() is >+ actually specialized in FontFeatureSettings.cpp or FontVariationSettings.cpp. To avoid compiler errors, the >+ implementation is moved into FontCache.cpp ; while still marking the function as inline. >+ >+ No new tests, behavior unchanged. >+ >+ * platform/graphics/FontCache.cpp: >+ (WebCore::FontDescriptionKey::computeHash const): >+ * platform/graphics/FontCache.h: >+ (WebCore::FontDescriptionKey::computeHash const): Deleted. >+ > 2018-09-12 Pablo Saavedra <psaavedra@igalia.com> > > Linking against libWPEWebKit-0.1.so is not posible when WPE is build with ENABLE_VIDEO=OFF and ENABLE_WEB_AUDIO=OFF >diff --git a/Source/WebCore/platform/graphics/FontCache.cpp b/Source/WebCore/platform/graphics/FontCache.cpp >index 58773be73c26c3791398090bd540b3a920ad56bf..2ddd3ce819bddcf1c24ac62f76a135e6ed22386a 100644 >--- a/Source/WebCore/platform/graphics/FontCache.cpp >+++ b/Source/WebCore/platform/graphics/FontCache.cpp >@@ -488,4 +488,21 @@ RefPtr<Font> FontCache::similarFont(const FontDescription&, const AtomicString&) > } > #endif > >+unsigned FontDescriptionKey::computeHash() const >+{ >+ IntegerHasher hasher; >+ hasher.add(m_size); >+ hasher.add(m_fontSelectionRequest.weight); >+ hasher.add(m_fontSelectionRequest.width); >+ hasher.add(m_fontSelectionRequest.slope.value_or(normalItalicValue())); >+ hasher.add(m_locale.existingHash()); >+ for (unsigned flagItem : m_flags) >+ hasher.add(flagItem); >+ hasher.add(m_featureSettings.hash()); >+#if ENABLE(VARIATION_FONTS) >+ hasher.add(m_variationSettings.hash()); >+#endif >+ return hasher.hash(); >+} >+ > } // namespace WebCore >diff --git a/Source/WebCore/platform/graphics/FontCache.h b/Source/WebCore/platform/graphics/FontCache.h >index 8564db9c1e0f25e08467f48a840a2ea1b18cc1ca..0b79cce8736ec6eabd2cd5f76233d15b251c7d87 100644 >--- a/Source/WebCore/platform/graphics/FontCache.h >+++ b/Source/WebCore/platform/graphics/FontCache.h >@@ -104,22 +104,7 @@ struct FontDescriptionKey { > > bool isHashTableDeletedValue() const { return m_size == cHashTableDeletedSize; } > >- inline unsigned computeHash() const >- { >- IntegerHasher hasher; >- hasher.add(m_size); >- hasher.add(m_fontSelectionRequest.weight); >- hasher.add(m_fontSelectionRequest.width); >- hasher.add(m_fontSelectionRequest.slope.value_or(normalItalicValue())); >- hasher.add(m_locale.existingHash()); >- for (unsigned flagItem : m_flags) >- hasher.add(flagItem); >- hasher.add(m_featureSettings.hash()); >-#if ENABLE(VARIATION_FONTS) >- hasher.add(m_variationSettings.hash()); >-#endif >- return hasher.hash(); >- } >+ inline unsigned computeHash() const; > > private: > static std::array<unsigned, 2> makeFlagsKey(const FontDescription& description)
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