mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 906521. Part 9: Add tests for invalid glyph id values. r=jfkthame
--HG-- extra : rebase_source : 3ffd23c06a40cd51af30c83652ee701ae6057566
This commit is contained in:
parent
7353ff0cc7
commit
ba9a70db15
@ -1,5 +1,6 @@
|
||||
pref(gfx.font_rendering.opentype_svg.enabled,false) != svg-glyph-basic.svg svg-glyph-basic-ref.svg
|
||||
pref(gfx.font_rendering.opentype_svg.enabled,true) fails-if(Android||B2G) == svg-glyph-basic.svg svg-glyph-basic-ref.svg # bug 872487
|
||||
pref(gfx.font_rendering.opentype_svg.enabled,true) fails-if(Android||B2G) == svg-glyph-invalid-ids.svg svg-glyph-invalid-ids-ref.svg # bug 872487
|
||||
pref(gfx.font_rendering.opentype_svg.enabled,false) != svg-glyph-positioning.svg svg-glyph-positioning-ref.svg
|
||||
pref(gfx.font_rendering.opentype_svg.enabled,true) fails-if(Android||B2G) == svg-glyph-positioning.svg svg-glyph-positioning-ref.svg # bug 872487
|
||||
pref(gfx.font_rendering.opentype_svg.enabled,true) fails-if(winWidget) == svg-glyph-html.html svg-glyph-html-ref.svg # bug 872486
|
||||
|
@ -6,5 +6,5 @@ not a valid SVG table so no SVG glyphs will be used.
|
||||
nosvg.woff is derived from the "Liberation" font. It contains no SVG table.
|
||||
|
||||
svg.woff is nosvg.woff with an SVG table added. The
|
||||
table contains the glyph documents glyphs-base.svg, glyphs-objectcolor.svg,
|
||||
glyphs-objectopacity.svg and glyphs-objectstroke.svg.
|
||||
table contains the glyph documents glyphs-base.svg, glyphs-invalid.svg,
|
||||
glyphs-objectcolor.svg, glyphs-objectopacity.svg and glyphs-objectstroke.svg.
|
||||
|
40
layout/reftests/text-svgglyphs/resources/glyphs-invalid.svg
Normal file
40
layout/reftests/text-svgglyphs/resources/glyphs-invalid.svg
Normal file
@ -0,0 +1,40 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<!--
|
||||
Test handling of invalid ids
|
||||
-->
|
||||
<!-- not valid: leading space not allowed -->
|
||||
<g id="glyph 47">
|
||||
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
|
||||
fill="red"/>
|
||||
</g>
|
||||
<!-- not valid: leading zero not allowed -->
|
||||
<g id="glyph047">
|
||||
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
|
||||
fill="red"/>
|
||||
</g>
|
||||
<!-- not valid: trailing garbage not allowed -->
|
||||
<g id="glyph47xxx">
|
||||
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
|
||||
fill="red"/>
|
||||
</g>
|
||||
<!-- not valid: trailing space not allowed -->
|
||||
<g id="glyph47 ">
|
||||
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
|
||||
fill="red"/>
|
||||
</g>
|
||||
<!-- not valid: floating point not allowed -->
|
||||
<g id="glyph47.0">
|
||||
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
|
||||
fill="red"/>
|
||||
</g>
|
||||
<!-- char = M -->
|
||||
<g id="glyph47">
|
||||
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
|
||||
fill="lime"/>
|
||||
</g>
|
||||
<!-- Ensure first glyph47 is picked -->
|
||||
<g id="glyph47">
|
||||
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
|
||||
fill="red"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<g>
|
||||
<rect x="20" y="20" width="160" height="160" stroke-width="10"
|
||||
fill="lime" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 149 B |
22
layout/reftests/text-svgglyphs/svg-glyph-invalid-ids.svg
Normal file
22
layout/reftests/text-svgglyphs/svg-glyph-invalid-ids.svg
Normal file
@ -0,0 +1,22 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
@font-face {
|
||||
font-family: "Liberation";
|
||||
src:url(resources/svg.woff);
|
||||
}
|
||||
text
|
||||
{
|
||||
font-family: Liberation;
|
||||
font-size: 200px;
|
||||
}
|
||||
]]>
|
||||
</style>
|
||||
<!--
|
||||
Test that the right SVG glyph is picked from a document containing various
|
||||
invalid glyph IDs.
|
||||
-->
|
||||
<text x="0" y="200">
|
||||
M
|
||||
</text>
|
||||
</svg>
|
After Width: | Height: | Size: 448 B |
Loading…
Reference in New Issue
Block a user