[SVG -> OTF Converter] Crashes when SVG font is invalid
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Jan 2015 22:51:47 +0000 (22:51 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Jan 2015 22:51:47 +0000 (22:51 +0000)
commit4dca004d5adad56223cafd30b90da0166debaafe
tree679c7b7e71ebdba45d93e1e12f61078a9ef55713
parent03828233668efef86de193f4fdd942fc9a758ddc
[SVG -> OTF Converter] Crashes when SVG font is invalid
https://bugs.webkit.org/show_bug.cgi?id=140378

Reviewed by Antti Koivisto.

Because CachedSVGFonts are cached, they have to be able to be used
in subsequent documents regardless how the first document left it.

Tests: fast/css/font-face-svg-decoding-error.html
       svg/custom/svg-fonts-in-html.html
       svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html

* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureCustomFontData):
* loader/cache/CachedFont.h:
* loader/cache/CachedSVGFont.cpp:
(WebCore::CachedSVGFont::getFontData):
(WebCore::CachedSVGFont::ensureCustomFontData):
(WebCore::CachedSVGFont::maybeInitializeExternalSVGFontElement):
* loader/cache/CachedSVGFont.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/loader/cache/CachedFont.cpp
Source/WebCore/loader/cache/CachedFont.h
Source/WebCore/loader/cache/CachedSVGFont.cpp
Source/WebCore/loader/cache/CachedSVGFont.h