Fixing bug 323753. Initialise meetOrSlice variable properly. Patched by Robert Longson longsonr@gmail.com, r=jwatt@jwatt.org, sr=tor@acm.org

This commit is contained in:
jwatt%jwatt.org 2006-01-20 16:38:58 +00:00
parent e6726a692a
commit 12c51b16e1
4 changed files with 6 additions and 6 deletions

View File

@ -464,7 +464,7 @@ nsSVGMarkerElement::GetViewboxToViewportTransform(nsIDOMSVGMatrix **_retval)
if (align == nsIDOMSVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_UNKNOWN)
align = nsIDOMSVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID;
if (meetOrSlice == nsIDOMSVGPreserveAspectRatio::SVG_MEETORSLICE_UNKNOWN)
align = nsIDOMSVGPreserveAspectRatio::SVG_MEETORSLICE_MEET;
meetOrSlice = nsIDOMSVGPreserveAspectRatio::SVG_MEETORSLICE_MEET;
float a, d, e, f;
a = viewportWidth/viewboxWidth;

View File

@ -849,7 +849,7 @@ nsSVGSVGElement::GetViewboxToViewportTransform(nsIDOMSVGMatrix **_retval)
if (align == nsIDOMSVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_UNKNOWN)
align = nsIDOMSVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID;
if (meetOrSlice == nsIDOMSVGPreserveAspectRatio::SVG_MEETORSLICE_UNKNOWN)
align = nsIDOMSVGPreserveAspectRatio::SVG_MEETORSLICE_MEET;
meetOrSlice = nsIDOMSVGPreserveAspectRatio::SVG_MEETORSLICE_MEET;
float a, d, e, f;
a = viewportWidth/viewboxWidth;

View File

@ -392,7 +392,7 @@ nsSVGImageFrame::PaintSVG(nsISVGRendererCanvas* canvas,
if (align == nsIDOMSVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_UNKNOWN)
align = nsIDOMSVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID;
if (meetOrSlice == nsIDOMSVGPreserveAspectRatio::SVG_MEETORSLICE_UNKNOWN)
align = nsIDOMSVGPreserveAspectRatio::SVG_MEETORSLICE_MEET;
meetOrSlice = nsIDOMSVGPreserveAspectRatio::SVG_MEETORSLICE_MEET;
float a, d, e, f;
a = width/nativeWidth;

View File

@ -472,8 +472,8 @@ nsSVGPatternFrame::PaintPattern(nsISVGRendererCanvas* canvas,
/*
* OK, we've got the content geometry in general. Now we need to get two
* different transformation matricies. First, we need to transform the
* x,y,width,and heigth units. This is done differently than the units of
* different transformation matrices. First, we need to transform the
* x,y,width,and height units. This is done differently than the units of
* the actual elements we are going to paint. We also need to pass some
* of this information back to our caller (to get the x,y offset of the
* pattern within the painted area. So, we need to generate two matrices
@ -1059,7 +1059,7 @@ nsSVGPatternFrame::ConstructCTM(nsIDOMSVGMatrix **ctm, nsIDOMSVGMatrix *aPCTM, n
if (align == nsIDOMSVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_UNKNOWN)
align = nsIDOMSVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID;
if (meetOrSlice == nsIDOMSVGPreserveAspectRatio::SVG_MEETORSLICE_UNKNOWN)
align = nsIDOMSVGPreserveAspectRatio::SVG_MEETORSLICE_MEET;
meetOrSlice = nsIDOMSVGPreserveAspectRatio::SVG_MEETORSLICE_MEET;
float viewportWidth, viewportHeight;
GetWidth(&viewportWidth);