[Cocoa] Unify FontPlatformData's hashing and equality operators
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Jan 2017 03:52:39 +0000 (03:52 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Jan 2017 03:52:39 +0000 (03:52 +0000)
commitd17f32cfe93d61d4bf311493e8d11747f40e4bc9
tree88ac72295fbd31faea07035e1d5ef150f99ee939
parent0e5c7fe53df50436333835bf1f6ced04e6d4ea84
[Cocoa] Unify FontPlatformData's hashing and equality operators
https://bugs.webkit.org/show_bug.cgi?id=167061

Reviewed by Darin Adler.

On iOS, we were using CFEqual() and CFHash(), while on macOS
we were using pointer hashing and pointer equality. Instead,
we should be consistent about these operators.

Right now, FontPlatformData holds two internal CTFontRefs, and
switching to these higher-level CFEqual() and CFHash()
functions is required for eliminating one of these two
internal font objects.

No new tests because there is no behavior change.

* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::hash): Deleted.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::hash):
(WebCore::FontPlatformData::platformIsEqual):
(WebCore::cascadeToLastResortAttributesDictionary):
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::FontPlatformData::hash):
* platform/graphics/win/FontPlatformDataCGWin.cpp:
(WebCore::FontPlatformData::hash):
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::hash):
* platform/graphics/win/FontPlatformDataDirect2D.cpp:
(WebCore::FontPlatformData::hash):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/FontPlatformData.h
Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm
Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp
Source/WebCore/platform/graphics/win/FontPlatformDataCGWin.cpp
Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp
Source/WebCore/platform/graphics/win/FontPlatformDataDirect2D.cpp