12012-04-01 Koji Ishii <kojiishi@gmail.com>
2
3 Cache support for OpenTypeVerticalData
4 https://bugs.webkit.org/show_bug.cgi?id=81332
5
6 This patch adds FontCache to cache OpenTypeVerticalData class
7 instances that was introduced in bug 81326.
8
9 We need one instance of the class per OpenType font file, and we don't
10 have a class to hold such instances today.
11
12 ENABLE_OPENTYPE_VERTICAL isn't enabled for any platforms yet, so this
13 patch isn't on any code path. Apple Windows port (bug 48459) is going
14 to use this code, and probably Chromium (51450, 69282) as well.
15
16 "FIXME" comment in SimpleFontData.h will be implemented in 48459.
17
18 Reviewed by NOBODY (OOPS!).
19
20 No new tests are required. No behavior changes.
21
22 * platform/graphics/FontCache.cpp:
23 (WebCore::FontCache::getCachedFontPlatformData): Ignore leading "@" on Windows to disable Windows feature for vertical flow.
24 (WebCore):
25 (WebCore::FontCache::getVerticalData): Get cached OpenTypeVerticalData from FontPlatformData, or crete one.
26 (WebCore::FontCache::purgeInactiveFontData): Purge inactive OpenTypeVerticalData.
27 * platform/graphics/FontCache.h:
28 (WebCore):
29 * platform/graphics/SimpleFontData.h:
30 (SimpleFontData):
31 (WebCore::SimpleFontData::verticalData): A dummy implementation for purgeInactiveFontData() to work.
32 * platform/graphics/opentype/OpenTypeVerticalData.h: Added m_inFontCache for mark & sweep.
33 (OpenTypeVerticalData):
34