haikuwebkit/LayoutTests/svg/text/svg-font-hittest-expected.txt

4 lines
115 B
Plaintext
Raw Permalink Normal View History

svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html and svg/css/font-face-crash.html frequently assert in ComplexTextController::offsetForPosition https://bugs.webkit.org/show_bug.cgi?id=119747 Reviewed by Simon Fraser. Source/WebCore: Even though kerning and ligatures currently don't work with the simple text path, messing those up is better than creating null CTRun and CTLine objects. Rather than calling the badly-named renderingContext() function on TextRun objects to determine if they are drawn with an SVG font, this patch creates a wrapper function with a better name and uses that instead. Test: svg/text/svg-font-hittest.html * platform/graphics/Font.cpp: (WebCore::isDrawnWithSVGFont): Wrapper around renderingContext() (WebCore::Font::drawText): Use wrapper function (WebCore::Font::drawEmphasisMarks): Use wrapper function (WebCore::Font::width): Use wrapper function (WebCore::Font::selectionRectForText): Use wrapper function (WebCore::Font::offsetForPosition): If we are using an SVG font, use the simple path instead of the complex one (WebCore::Font::codePath): Use wrapper function * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::ctFont): LayoutTests: Clicking on SVG text used to cause a ComplexTextController to be built around the SVG text (which is incorrect and would crash). This test does just that and makes sure there is no crash. * svg/text/resources/Litherum.svg: Added. * svg/text/svg-font-hittest-expected.txt: Added. * svg/text/svg-font-hittest.html: Added. * LayoutTests/platform/mac/TestExpectations: Unskipped tests Canonical link: https://commits.webkit.org/149107@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-01 20:05:08 +00:00
This code triggers the glyph hit-testing code, which should not crash when a glyph is drawn with SVG fonts.
Pass
|