mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
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:
parent
e6726a692a
commit
12c51b16e1
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user