mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 828246 - Prevent stroke from drawing, on SVG text with a stroke-width of 0. r=dholbert
This commit is contained in:
parent
4bdff069b2
commit
6d76cd33e9
@ -292,6 +292,7 @@ fuzzy-if(cocoaWidget&&layersGPUAccelerated,1,3) == text-layout-06.svg text-layou
|
||||
== text-style-01d.svg text-style-01-ref.svg
|
||||
== text-style-01e.svg text-style-01-ref.svg
|
||||
== thin-stroke-01.svg pass.svg
|
||||
== zero-stroke-01.svg pass.svg
|
||||
== tspan-dxdy-01.svg tspan-dxdy-ref.svg
|
||||
== tspan-dxdy-02.svg tspan-dxdy-ref.svg
|
||||
== tspan-dxdy-03.svg tspan-dxdy-ref.svg
|
||||
|
12
layout/reftests/svg/zero-stroke-01.svg
Normal file
12
layout/reftests/svg/zero-stroke-01.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
<title>Testcase for stroke-width="0"</title>
|
||||
|
||||
<rect width="100%" height="100%" fill="lime"/>
|
||||
<text font-size="50" fill="lime" x="100" y="100" stroke="red" stroke-width="0">should not see this</text>
|
||||
|
||||
</svg>
|
After Width: | Height: | Size: 379 B |
@ -966,12 +966,11 @@ nsSVGGlyphFrame::SetupCairoStroke(gfxContext *aContext,
|
||||
gfxTextObjectPaint *aOuterObjectPaint,
|
||||
SVGTextObjectPaint *aThisObjectPaint)
|
||||
{
|
||||
const nsStyleSVG *style = GetStyleSVG();
|
||||
if (style->mStroke.mType == eStyleSVGPaintType_None) {
|
||||
aThisObjectPaint->SetStrokeOpacity(0.0f);
|
||||
if (!nsSVGUtils::HasStroke(this, aOuterObjectPaint)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const nsStyleSVG *style = GetStyleSVG();
|
||||
nsSVGUtils::SetupCairoStrokeHitGeometry(this, aContext, aOuterObjectPaint);
|
||||
float opacity = nsSVGUtils::GetOpacity(style->mStrokeOpacitySource,
|
||||
style->mStrokeOpacity,
|
||||
|
@ -595,11 +595,8 @@ nsSVGPathGeometryFrame::Render(nsRenderingContext *aContext)
|
||||
gfx->Fill();
|
||||
}
|
||||
|
||||
if (nsSVGUtils::HasStroke(this, objectPaint)) {
|
||||
nsSVGUtils::SetupCairoStrokeHitGeometry(this, gfx, objectPaint);
|
||||
if (nsSVGUtils::SetupCairoStrokePaint(this, gfx, objectPaint)) {
|
||||
gfx->Stroke();
|
||||
}
|
||||
if (nsSVGUtils::SetupCairoStroke(this, gfx, objectPaint)) {
|
||||
gfx->Stroke();
|
||||
}
|
||||
|
||||
gfx->NewPath();
|
||||
|
Loading…
Reference in New Issue
Block a user