Title: [179061] trunk/Source
- Revision
- 179061
- Author
- [email protected]
- Date
- 2015-01-24 08:28:14 -0800 (Sat, 24 Jan 2015)
Log Message
Provide implementation for WTF::DefaultHash<bool>
https://bugs.webkit.org/show_bug.cgi?id=140848
Reviewed by Anders Carlsson.
Source/WebCore:
Use HashMap<std::pair<UChar32, bool>> type in Font.cpp for
CharacterFallbackMap instead of HashMap<std::pair<UChar32, unsigned>>.
It builds now that WTF::DefaultHash<bool> is defined in WTF.
* platform/graphics/Font.cpp:
(WebCore::Font::removeFromSystemFallbackCache):
Source/WTF:
Provide implementation for WTF::DefaultHash<bool> so that we can use
HashMap<std::pair<XXX, bool>> in the code base. Right now, we need to
use some integer type to work around the issue.
* wtf/HashFunctions.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (179060 => 179061)
--- trunk/Source/WTF/ChangeLog 2015-01-24 07:05:45 UTC (rev 179060)
+++ trunk/Source/WTF/ChangeLog 2015-01-24 16:28:14 UTC (rev 179061)
@@ -1,3 +1,16 @@
+2015-01-24 Chris Dumez <[email protected]>
+
+ Provide implementation for WTF::DefaultHash<bool>
+ https://bugs.webkit.org/show_bug.cgi?id=140848
+
+ Reviewed by Anders Carlsson.
+
+ Provide implementation for WTF::DefaultHash<bool> so that we can use
+ HashMap<std::pair<XXX, bool>> in the code base. Right now, we need to
+ use some integer type to work around the issue.
+
+ * wtf/HashFunctions.h:
+
2015-01-23 Carlos Garcia Campos <[email protected]>
[GTK] Add missing null check in some derefGPtr implementations
Modified: trunk/Source/WTF/wtf/HashFunctions.h (179060 => 179061)
--- trunk/Source/WTF/wtf/HashFunctions.h 2015-01-24 07:05:45 UTC (rev 179060)
+++ trunk/Source/WTF/wtf/HashFunctions.h 2015-01-24 16:28:14 UTC (rev 179061)
@@ -173,6 +173,7 @@
// make IntHash the default hash function for many integer types
+ template<> struct DefaultHash<bool> { typedef IntHash<uint8_t> Hash; };
template<> struct DefaultHash<short> { typedef IntHash<unsigned> Hash; };
template<> struct DefaultHash<unsigned short> { typedef IntHash<unsigned> Hash; };
template<> struct DefaultHash<int> { typedef IntHash<unsigned> Hash; };
Modified: trunk/Source/WebCore/ChangeLog (179060 => 179061)
--- trunk/Source/WebCore/ChangeLog 2015-01-24 07:05:45 UTC (rev 179060)
+++ trunk/Source/WebCore/ChangeLog 2015-01-24 16:28:14 UTC (rev 179061)
@@ -1,3 +1,17 @@
+2015-01-24 Chris Dumez <[email protected]>
+
+ Provide implementation for WTF::DefaultHash<bool>
+ https://bugs.webkit.org/show_bug.cgi?id=140848
+
+ Reviewed by Anders Carlsson.
+
+ Use HashMap<std::pair<UChar32, bool>> type in Font.cpp for
+ CharacterFallbackMap instead of HashMap<std::pair<UChar32, unsigned>>.
+ It builds now that WTF::DefaultHash<bool> is defined in WTF.
+
+ * platform/graphics/Font.cpp:
+ (WebCore::Font::removeFromSystemFallbackCache):
+
2015-01-23 Brent Fulgham <[email protected]>
[Win] Cursor assignment operator is skipping scale factor
Modified: trunk/Source/WebCore/platform/graphics/Font.cpp (179060 => 179061)
--- trunk/Source/WebCore/platform/graphics/Font.cpp 2015-01-24 07:05:45 UTC (rev 179060)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp 2015-01-24 16:28:14 UTC (rev 179061)
@@ -397,7 +397,8 @@
}
// Fonts are not ref'd to avoid cycles.
-typedef HashMap<std::pair<UChar32, unsigned>, Font*> CharacterFallbackMap;
+typedef std::pair<UChar32, bool /* isForPlatformFont */> CharacterFallbackMapKey;
+typedef HashMap<CharacterFallbackMapKey, Font*> CharacterFallbackMap;
typedef HashMap<const Font*, CharacterFallbackMap> SystemFallbackCache;
static SystemFallbackCache& systemFallbackCache()
@@ -443,7 +444,7 @@
return;
for (auto& characterMap : systemFallbackCache().values()) {
- Vector<std::pair<UChar32, unsigned>, 512> toRemove;
+ Vector<CharacterFallbackMapKey, 512> toRemove;
for (auto& entry : characterMap) {
if (entry.value == this)
toRemove.append(entry.key);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes