Allow targetting the SVG->OTF font converter with ENABLE(SVG_OTF_CONVERTER)
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jan 2015 20:55:09 +0000 (20:55 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jan 2015 20:55:09 +0000 (20:55 +0000)
commit84af715ffd107048cb157a919692193f57cb8469
treea0b82b28df7a6edc59f49f2016e9e0b7a9e6b9dd
parent55fe74d1f33d31b5e39c831817be8c300c350fbf
Allow targetting the SVG->OTF font converter with ENABLE(SVG_OTF_CONVERTER)
https://bugs.webkit.org/show_bug.cgi?id=136769

Reviewed by Antti Koivisto.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

If ENABLE(SVG_OTF_CONVERTER) is defined, use the converter. It can be defined at the same
time as ENABLE(SVG_FONTS) but, if so, the SVG font code will be dead code.

No new tests because the define is off by default. Tests will come soon, I promise.

* Configurations/FeatureDefines.xcconfig:
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData): When creating a font, if the ENABLE is on,
do the transcode and take the non-SVG path.
(WebCore::CSSFontFaceSource::ensureFontData): Pass extra arguments to
CachedFont::ensureCustomFontData()
* css/CSSFontFaceSource.h: For the case of in-document SVG fonts, keep the transcoded
bytes around.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureCustomFontData): For out-of-document SVG fonts, do the
transcode if the ENABLE is on, then treat as if the font is any old webfont.
(WebCore::CachedFont::getSVGFontById): This function looks up the relevant <font>
element. Modify it to take a pointer to a (possibly external) document within which
to search.
* loader/cache/CachedFont.h: Extra arguments to CachedFont::ensureCustomFontData()
and CachedFont::getSVGFontById()

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/css/CSSFontFaceSource.cpp
Source/WebCore/css/CSSFontFaceSource.h
Source/WebCore/loader/cache/CachedFont.cpp
Source/WebCore/loader/cache/CachedFont.h
Source/WebCore/loader/cache/CachedSVGFont.cpp
Source/WebCore/loader/cache/CachedSVGFont.h
Source/WebCore/svg/SVGToOTFFontConversion.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/FeatureDefines.xcconfig