зеркало из https://github.com/mozilla/gecko-dev.git
Bug 344887 - ASSERTION: Don't try to move the root widget to something non-zero. r=tor, sr=roc
This commit is contained in:
Родитель
cc3ffb45fc
Коммит
14a2546e99
|
@ -433,12 +433,13 @@ nsSVGPathGeometryFrame::UpdateCoveredRegion()
|
|||
} else
|
||||
cairo_fill_extents(ctx, &xmin, &ymin, &xmax, &ymax);
|
||||
|
||||
cairo_user_to_device(ctx, &xmin, &ymin);
|
||||
cairo_user_to_device(ctx, &xmax, &ymax);
|
||||
if (!IsDegeneratePath(xmin, ymin, xmax, ymax)) {
|
||||
cairo_user_to_device(ctx, &xmin, &ymin);
|
||||
cairo_user_to_device(ctx, &xmax, &ymax);
|
||||
|
||||
mRect = nsSVGUtils::ToBoundingPixelRect(xmin, ymin, xmax, ymax);
|
||||
}
|
||||
cairo_destroy(ctx);
|
||||
|
||||
mRect = nsSVGUtils::ToBoundingPixelRect(xmin, ymin, xmax, ymax);
|
||||
}
|
||||
|
||||
// Add in markers
|
||||
|
@ -503,11 +504,7 @@ nsSVGPathGeometryFrame::GetBBox(nsIDOMSVGRect **_retval)
|
|||
|
||||
cairo_fill_extents(ctx, &xmin, &ymin, &xmax, &ymax);
|
||||
|
||||
/* cairo_fill_extents doesn't work on degenerate paths */
|
||||
if (xmin == 32767 &&
|
||||
ymin == 32767 &&
|
||||
xmax == -32768 &&
|
||||
ymax == -32768) {
|
||||
if (IsDegeneratePath(xmin, ymin, xmax, ymax)) {
|
||||
/* cairo_stroke_extents doesn't work with stroke width zero, fudge */
|
||||
cairo_set_line_width(ctx, 0.0001);
|
||||
cairo_stroke_extents(ctx, &xmin, &ymin, &xmax, &ymax);
|
||||
|
|
|
@ -133,6 +133,16 @@ private:
|
|||
void Render(nsISVGRendererCanvas *aCanvas);
|
||||
void GeneratePath(cairo_t *ctx, nsISVGCairoCanvas* aCanvas);
|
||||
|
||||
/*
|
||||
* Check for what cairo returns for the fill extents of a degenerate path
|
||||
*/
|
||||
static PRBool
|
||||
IsDegeneratePath(double xmin, double ymin, double xmax, double ymax)
|
||||
{
|
||||
return (xmin == 32767 && ymin == 32767 &&
|
||||
xmax == -32768 && ymax == -32768);
|
||||
}
|
||||
|
||||
nsSVGMarkerProperty *GetMarkerProperty();
|
||||
void GetMarkerFromStyle(nsSVGMarkerFrame **aResult,
|
||||
nsSVGMarkerProperty *property,
|
||||
|
|
Загрузка…
Ссылка в новой задаче