SVGGlyphToPathTranslator ASSERTs when encountering a missing glyph in an SVG font
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jun 2014 02:24:25 +0000 (02:24 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jun 2014 02:24:25 +0000 (02:24 +0000)
commit64e33c6a0128670a00cdf02b4b5cf2e88cade092
tree1a4ab73ae08a97d23e6703288b8d01481c4a8d60
parente2ad0ec2415e1bb28e4314f0f51104430d76adae
SVGGlyphToPathTranslator ASSERTs when encountering a missing glyph in an SVG font
https://bugs.webkit.org/show_bug.cgi?id=133528

Reviewed by Simon Fraser.

Source/WebCore:
Turns out this assertion is benign. We can take an early out of advance() (which
is then handled properly by Font::dashesForIntersectionsWithRect()

Test: svg/custom/skip-underline-missing-glyph.html

* platform/graphics/mac/FontMac.mm:
(WebCore::Font::dashesForIntersectionsWithRect): Rather than skip partial results,
don't skip anything at all to be consistent.
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGGlyphToPathTranslator::advance): Take an early out to avoid an ASSERT.

LayoutTests:
Make sure that no ASSERT occurs in this situation. In addition, make sure that the
whole element doesn't get skip:ink gaps. This will need to be updated when we
support SVG + non-SVG mixed runs.

* svg/custom/skip-underline-missing-glyph-expected.html: Added
* svg/custom/skip-underline-missing-glyph.html: Added

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/custom/skip-underline-missing-glyph-expected.html [new file with mode: 0644]
LayoutTests/svg/custom/skip-underline-missing-glyph.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/mac/FontMac.mm
Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp