зеркало из https://github.com/mozilla/gecko-dev.git
Bug 368840 - Fallback paint should be used for degenerate objectBoundingBox gradients. r+sr=tor,a1.9=mtschrep
This commit is contained in:
Родитель
4f992d164d
Коммит
3b73b8a2a7
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче