haikuwebkit/LayoutTests/fast/text/otsvg-spacing-expected.html

14 lines
262 B
HTML
Raw Permalink Normal View History

[GPU Process] Temporarily disable drawing OT-SVG glyphs in the GPU process until it can be implemented properly https://bugs.webkit.org/show_bug.cgi?id=221744 Source/WebCore: <rdar://problem/74222334> Reviewed by Simon Fraser. Link with the system OTSVG framework to determine if glyphs will be rendered using that infrastructure. Filter out glyphs which would be rendered using that infrastructure in the web process, and RELEASE_ASSERT() in the GPU process that it won't be using that infrastructure. This is just a temporary plug of a security hole, until we can properly transcode OT-SVG glyphs into WebKit's display list infrastructure. This patch explicitly breaks drawing OT-SVG glyphs using the GPU process (which, right now, only means it will be broken in canvas drawing, since regular DOM drawing doesn't use the GPU process yet.) Test: fast/text/otsvg-spacing.html * platform/graphics/Font.h: * platform/graphics/coretext/FontCascadeCoreText.cpp: (WebCore::FontCascade::drawGlyphs): * platform/graphics/coretext/FontCoreText.cpp: (WebCore::Font::findOTSVGGlyphs const): * platform/graphics/displaylists/DisplayListDrawGlyphsRecorderCoreText.cpp: (WebCore::DisplayList::filterOutOTSVGGlyphs): (WebCore::DisplayList::DrawGlyphsRecorder::drawGlyphs): Source/WebCore/PAL: Reviewed by Simon Fraser. This patch soft-links the OTSVG framework because it's a private framework that doesn't exist on watchOS. * PAL.xcodeproj/project.pbxproj: * pal/cf/CoreTextSoftLink.cpp: Added. * pal/cf/CoreTextSoftLink.h: Added. * pal/cf/OTSVGTable.cpp: Added. (PAL::OTSVGTable::OTSVGTable): (PAL::OTSVGTable::~OTSVGTable): (PAL::OTSVGTable::operator=): * pal/cf/OTSVGTable.h: Added. * pal/spi/cf/CoreTextSPI.h: LayoutTests: <rdar://problem/74222334> Reviewed by Simon Fraser. Create an OTSVG font for testing. The A glyph is a green rectangle. The B glyph is an image. The C glyph is another image, with a different EXIF orientation than the B glyph. This test makes sure that two glyphs with an OTSVG glyph between them don't get smooshed together in canvas. I'm explicitly not testing the behavior of OTSVG itself in canvas, because this test explicitly disables that behavior. I think it's wrong to create tests that make sure some functionality is broken, because the functionality, philosophically, shouldn't be broken. * fast/text/otsvg-spacing-expected.html: Added. * fast/text/otsvg-spacing.html: Added. * fast/text/resources/Ahem-SVG.ttf: Added. Canonical link: https://commits.webkit.org/234318@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-19 03:25:04 +00:00
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<canvas id="canvas" width="800" height="800">
<script>
var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");
context.fillRect(100, 20, 500, 100);
</script>
</body>
</html>