Crash when measuring a glyphs from a fallback SVG font
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Jul 2014 00:27:09 +0000 (00:27 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Jul 2014 00:27:09 +0000 (00:27 +0000)
commitca28e917d38edcd0c2b59fbc0a6a6561268432f8
tree8d2ba6ba26e50476732527c3c8b55b69393dac29
parent01bfa45f4c118ce226034fa09e7ab956fc94c63b
Crash when measuring a glyphs from a fallback SVG font
https://bugs.webkit.org/show_bug.cgi?id=135264

Reviewed by Simon Fraser.

Source/WebCore:
We can't realize font data for all fallback fonts ahead
of time, but we don't have all the necessary context to
realize SVG fallback data when it's needed. For now, we
can just bail; however, a larger, more invasive fix is
in order.

Test: svg/text/svg-fallback-font-crash.html

* platform/graphics/WidthIterator.cpp:
(WebCore::applyFontTransforms):

LayoutTests:
Render some text with a fallback SVG Font including a glyph which
only exists in that fallback font. Make sure there is no crash.

* svg/text/resources/Litherum.svg:
* svg/text/svg-fallback-font-crash-expected.txt: Added.
* svg/text/svg-fallback-font-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/text/resources/Litherum.svg
LayoutTests/svg/text/svg-fallback-font-crash-expected.txt [new file with mode: 0644]
LayoutTests/svg/text/svg-fallback-font-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/WidthIterator.cpp