2009-12-02 Yusuke Sato <yusukes@chromium.org>
Reviewed by Eric Seidel.
Sanitize web fonts using the OTS library
https://bugs.webkit.org/show_bug.cgi?id=31106
Add support for OpenType sanitizer (OTS). It parses OpenType files (from @font-face)
and attempts to validate and sanitize them. We hope this reduces the attack surface
of the system font libraries.
* WebCore.gyp/WebCore.gyp: Added dependency to (chromium_src_dir)/third_party/ots/ library.
* WebCore.gypi: Added new files below.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* platform/graphics/chromium/FontCustomPlatformData.cpp: Validate and transcode a web font.
(WebCore::createFontCustomPlatformData):
* platform/graphics/mac/FontCustomPlatformData.cpp: Ditto.
(WebCore::createFontCustomPlatformData):
* platform/graphics/opentype/OpenTypeSanitizer.cpp: Added.
(WebCore::OpenTypeSanitizer::sanitize):
* platform/graphics/opentype/OpenTypeSanitizer.h: Added.
(WebCore::OpenTypeSanitizer::OpenTypeSanitizer):
2009-12-02 Yusuke Sato <yusukes@chromium.org>
Reviewed by Eric Seidel.
Sanitize web fonts using the OTS library
https://bugs.webkit.org/show_bug.cgi?id=31106
* DEPS: Added dependency to the OpenType sanitizer library.
* features.gypi: Added ENABLE_OPENTYPE_SANITIZER=1.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51623
268f45cc-cd09-0410-ab3c-
d52691b4dbfc