зеркало из https://github.com/mozilla/gecko-dev.git
Bug 828246 - Prevent stroke from drawing, on SVG text with a stroke-width of 0. r=dholbert
This commit is contained in:
Родитель
6d82d31725
Коммит
2cff5d6731
|
@ -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
|
||||
|
|
|
@ -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>
|
После Ширина: | Высота: | Размер: 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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче