HarfBuzzFace::CacheEntry should use 32-bit values in its HashMap
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 Nov 2018 17:26:15 +0000 (17:26 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 Nov 2018 17:26:15 +0000 (17:26 +0000)
commita89373ddfa314d88e7689b538ea4f5b5945eba0d
treeb9242b97d75186dfdd6c48fd335bd04f09240fcf
parentdeccdb3c7da533e2d0f101cbf7bf4e114f500ea2
HarfBuzzFace::CacheEntry should use 32-bit values in its HashMap
https://bugs.webkit.org/show_bug.cgi?id=191825

Patch by Zan Dobersek <zdobersek@igalia.com> on 2018-11-18
Reviewed by Michael Catanzaro.

The HashMap-based glyph cache contained in HarfBuzzFace::CacheEntry
objects is used to map given Unicode codepoints to corresponding
glyph indices (which occurs in the harfBuzzGetGlyph() function that's
invoked by HarfBuzz).

The 16-bit unsigned integer as the map's value type is not enough here
when the glyph index mapping is done through Freetype -- its API returns
32-bit glyph indices, and Cairo assigns this value to the 64-bit
unsigned index variable in the cairo_glyph_t struct. The value type is
thus bumped to 32 bits to match the unsigned type size of the index's
origin.

* platform/graphics/harfbuzz/HarfBuzzFace.h:
* platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/harfbuzz/HarfBuzzFace.h
Source/WebCore/platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp