backout Bug 510177 (reftest failure)

This commit is contained in:
Robert Longson 2009-12-19 19:28:48 +00:00
parent 1b9b5b1ed5
commit 82d6c026db
3 changed files with 4 additions and 11 deletions

View File

@ -103,7 +103,6 @@ fails == inline-in-xul-basic-01.xul pass.svg
# See bugs 379610 and 432298.
random-if(MOZ_WIDGET_TOOLKIT=="cocoa") == opacity-and-gradient-01.svg pass.svg
== opacity-and-pattern-01.svg pass.svg
== path-01.svg path-01-ref.svg
== pattern-live-01a.svg pattern-live-01-ref.svg
== pattern-live-01b.svg pattern-live-01-ref.svg
== pattern-live-01c.svg pattern-live-01-ref.svg

View File

@ -270,16 +270,6 @@ nsSVGPathGeometryFrame::UpdateCoveredRegion()
if (HasStroke()) {
SetupCairoStrokeGeometry(&context);
if (extent.IsEmpty()) {
// If 'extent' is empty, its position will not be set. Although
// GetUserStrokeExtent gets the extents wrong we can still use it
// to get the device space position of zero length stroked paths.
extent = context.GetUserStrokeExtent();
extent.pos.x += extent.size.width / 2;
extent.pos.y += extent.size.height / 2;
extent.size.width = 0;
extent.size.height = 0;
}
extent = nsSVGUtils::PathExtentsToMaxStrokeExtents(extent, this);
} else if (GetStyleSVG()->mFill.mType == eStyleSVGPaintType_None) {
extent = gfxRect(0, 0, 0, 0);

View File

@ -1486,6 +1486,10 @@ nsSVGUtils::WritePPM(const char *fname, gfxImageSurface *aSurface)
nsSVGUtils::PathExtentsToMaxStrokeExtents(const gfxRect& aPathExtents,
nsSVGGeometryFrame* aFrame)
{
if (aPathExtents.Width() == 0 && aPathExtents.Height() == 0) {
return gfxRect(0, 0, 0, 0);
}
// The logic here comes from _cairo_stroke_style_max_distance_from_path
double style_expansion = 0.5;