Bug 368840 - Fallback paint should be used for degenerate objectBoundingBox gradients. r+sr=tor,a1.9=mtschrep
git-svn-id: svn://10.0.0.236/trunk@245127 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
d75a70a8b4
commit
462d0c8340
@ -349,8 +349,15 @@ nsSVGGeometryFrame::SetupCairoFill(gfxContext *aContext)
|
||||
if (GetStateBits() & NS_STATE_SVG_FILL_PSERVER) {
|
||||
nsSVGPaintServerFrame *ps = static_cast<nsSVGPaintServerFrame*>
|
||||
(GetProperty(nsGkAtoms::fill));
|
||||
return ps->SetupPaintServer(aContext, this, opacity);
|
||||
} else if (GetStyleSVG()->mFill.mType == eStyleSVGPaintType_Server) {
|
||||
if (ps->SetupPaintServer(aContext, this, opacity))
|
||||
return PR_TRUE;
|
||||
|
||||
// On failure, use the fallback colour in case we have an
|
||||
// objectBoundingBox where the width or height of the object is zero.
|
||||
// See http://www.w3.org/TR/SVG11/coords.html#ObjectBoundingBox
|
||||
}
|
||||
|
||||
if (GetStyleSVG()->mFill.mType == eStyleSVGPaintType_Server) {
|
||||
SetupCairoColor(aContext,
|
||||
GetStyleSVG()->mFill.mFallbackColor,
|
||||
opacity);
|
||||
@ -418,8 +425,15 @@ nsSVGGeometryFrame::SetupCairoStroke(gfxContext *aContext)
|
||||
if (GetStateBits() & NS_STATE_SVG_STROKE_PSERVER) {
|
||||
nsSVGPaintServerFrame *ps = static_cast<nsSVGPaintServerFrame*>
|
||||
(GetProperty(nsGkAtoms::stroke));
|
||||
return ps->SetupPaintServer(aContext, this, opacity);
|
||||
} else if (GetStyleSVG()->mStroke.mType == eStyleSVGPaintType_Server) {
|
||||
if (ps->SetupPaintServer(aContext, this, opacity))
|
||||
return PR_TRUE;
|
||||
|
||||
// On failure, use the fallback colour in case we have an
|
||||
// objectBoundingBox where the width or height of the object is zero.
|
||||
// See http://www.w3.org/TR/SVG11/coords.html#ObjectBoundingBox
|
||||
}
|
||||
|
||||
if (GetStyleSVG()->mStroke.mType == eStyleSVGPaintType_Server) {
|
||||
SetupCairoColor(aContext,
|
||||
GetStyleSVG()->mStroke.mFallbackColor,
|
||||
opacity);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user