ASSERTION FAILED: markFontData in FontCascade::emphasisMarkHeight
https://bugs.webkit.org/show_bug.cgi?id=150171
Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2015-10-21
Reviewed by Myles C. Maxfield.
It happens with several tests like fast/ruby/text-emphasis.html in
the GTK Debug bot. The tests seem to pass in Release and the rendering
looks correct as well removing the assert. The thing is that
for some reason we can get an empty GlyphData from
FontCascade::getEmphasisMarkGlyphData() when it ends up falling
back to system (FontCascadeFonts::glyphDataForSystemFallback).
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::getEmphasisMarkGlyphData): Return
Optional<GlyphData> instead of returning a boolean and an out
parameter. If we get an invalid GlyphData, Nullopt is
returned. Also use a SurrogatePairAwareTextIterator to handle
surrogate pairs.
(WebCore::FontCascade::emphasisMarkAscent):
(WebCore::FontCascade::emphasisMarkDescent):
(WebCore::FontCascade::emphasisMarkHeight):
(WebCore::FontCascade::drawEmphasisMarks):
* platform/graphics/FontCascade.h:
* platform/graphics/GlyphPage.h:
(WebCore::GlyphData::isValid): Return whether the GlyphData is valid.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191386
268f45cc-cd09-0410-ab3c-
d52691b4dbfc