Backed out changeset a46f3da8aba6 (bug 1345853)

This commit is contained in:
Sebastian Hengst 2017-03-17 21:53:24 +01:00
Родитель 17f72f2991
Коммит e35416592f
6 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -289,7 +289,7 @@ SVGGeometryFrame::PaintSVG(gfxContext& aContext,
gfxMatrix newMatrix =
aContext.CurrentMatrix().PreMultiply(aTransform).NudgeToIntegers();
if (newMatrix.IsSingular()) {
return DrawResult::SUCCESS;
return DrawResult::BAD_ARGS;
}
uint32_t paintOrder = StyleSVG()->mPaintOrder;

Просмотреть файл

@ -3595,7 +3595,7 @@ SVGTextFrame::PaintSVG(gfxContext& aContext,
if (aTransform.IsSingular()) {
NS_WARNING("Can't render text element!");
return DrawResult::SUCCESS;
return DrawResult::BAD_ARGS;
}
gfxMatrix matrixForPaintServers = aTransform * initialMatrix;

Просмотреть файл

@ -221,7 +221,7 @@ nsSVGForeignObjectFrame::PaintSVG(gfxContext& aContext,
if (aTransform.IsSingular()) {
NS_WARNING("Can't render foreignObject element!");
return DrawResult::SUCCESS;
return DrawResult::BAD_ARGS;
}
nsRect kidDirtyRect = kid->GetVisualOverflowRect();

Просмотреть файл

@ -256,7 +256,7 @@ nsSVGGradientFrame::GetPaintServerPattern(nsIFrame* aSource,
gfxMatrix patternMatrix = GetGradientTransform(aSource, aOverrideBounds);
if (patternMatrix.IsSingular()) {
return MakePair(DrawResult::SUCCESS, RefPtr<gfxPattern>());
return MakePair(DrawResult::BAD_ARGS, RefPtr<gfxPattern>());
}
// revert any vector effect transform so that the gradient appears unchanged
@ -268,7 +268,7 @@ nsSVGGradientFrame::GetPaintServerPattern(nsIFrame* aSource,
}
if (!patternMatrix.Invert()) {
return MakePair(DrawResult::SUCCESS, RefPtr<gfxPattern>());
return MakePair(DrawResult::BAD_ARGS, RefPtr<gfxPattern>());
}
RefPtr<gfxPattern> gradient = CreateGradient();

Просмотреть файл

@ -320,7 +320,7 @@ nsSVGMaskFrame::GetMaskForMaskedFrame(MaskParams& aParams)
// Moz2D transforms in the opposite direction to Thebes
if (!maskSurfaceMatrix.Invert()) {
return MakePair(DrawResult::SUCCESS, RefPtr<SourceSurface>());
return MakePair(DrawResult::TEMPORARY_ERROR, RefPtr<SourceSurface>());
}
*aParams.maskTransform = ToMatrix(maskSurfaceMatrix);

Просмотреть файл

@ -301,7 +301,7 @@ nsSVGPatternFrame::PaintPattern(const DrawTarget* aDrawTarget,
gfxMatrix ctm = ConstructCTM(viewBox, patternContentUnits, patternUnits,
callerBBox, aContextMatrix, aSource);
if (ctm.IsSingular()) {
return MakePair(DrawResult::SUCCESS, RefPtr<SourceSurface>());
return MakePair(DrawResult::BAD_ARGS, RefPtr<SourceSurface>());
}
if (patternWithChildren->mCTM) {
@ -328,7 +328,7 @@ nsSVGPatternFrame::PaintPattern(const DrawTarget* aDrawTarget,
patternTransform *= ToMatrix(userToOuterSVG);
if (patternTransform.IsSingular()) {
NS_WARNING("Singular matrix painting non-scaling-stroke");
return MakePair(DrawResult::SUCCESS, RefPtr<SourceSurface>());
return MakePair(DrawResult::BAD_ARGS, RefPtr<SourceSurface>());
}
}
}
@ -338,7 +338,7 @@ nsSVGPatternFrame::PaintPattern(const DrawTarget* aDrawTarget,
*patternMatrix = GetPatternMatrix(patternUnits, patternTransform,
bbox, callerBBox, aContextMatrix);
if (patternMatrix->IsSingular()) {
return MakePair(DrawResult::SUCCESS, RefPtr<SourceSurface>());
return MakePair(DrawResult::BAD_ARGS, RefPtr<SourceSurface>());
}
// Now that we have all of the necessary geometries, we can