PRUint16 val; mZoomAndPan->GetIntegerValue(val); if (val == nsIDOMSVGZoomAndPan::SVG_ZOOMANDPAN_MAGNIFY) { nsCOMPtr<nsIDOMSVGMatrix> zoomPanMatrix; nsCOMPtr<nsIDOMSVGMatrix> temp; float scale, x, y; mCurrentScale->GetValue(&scale); mCurrentTranslate->GetX(&x); mCurrentTranslate->GetY(&y); svgElement->CreateSVGMatrix(getter_AddRefs(zoomPanMatrix)); zoomPanMatrix->Translate(x, y, getter_AddRefs(temp)); temp->Scale(scale, getter_AddRefs(zoomPanMatrix)); zoomPanMatrix->Multiply(mCanvasTM, getter_AddRefs(temp)); temp.swap(mCanvasTM);
if (mZoomAndPan) {   PRUint16 val; mZoomAndPan->GetIntegerValue(val); if (val == nsIDOMSVGZoomAndPan::SVG_ZOOMANDPAN_MAGNIFY) { nsCOMPtr<nsIDOMSVGMatrix> zoomPanMatrix; nsCOMPtr<nsIDOMSVGMatrix> temp; float scale, x, y; mCurrentScale->GetValue(&scale); mCurrentTranslate->GetX(&x); mCurrentTranslate->GetY(&y); svgElement->CreateSVGMatrix(getter_AddRefs(zoomPanMatrix)); zoomPanMatrix->Translate(x, y, getter_AddRefs(temp)); temp->Scale(scale, getter_AddRefs(zoomPanMatrix)); zoomPanMatrix->Multiply(mCanvasTM, getter_AddRefs(temp)); temp.swap(mCanvasTM); }
nsSVGOuterSVGFrame::GetCanvasTM(){  if (!mCanvasTM) {    nsCOMPtr<nsIDOMSVGSVGElement> svgElement = do_QueryInterface(mContent);    NS_ASSERTION(svgElement, "wrong content element");    svgElement->GetViewboxToViewportTransform(getter_AddRefs(mCanvasTM));    PRUint16 val;    mZoomAndPan->GetIntegerValue(val);    if (val == nsIDOMSVGZoomAndPan::SVG_ZOOMANDPAN_MAGNIFY) {      nsCOMPtr<nsIDOMSVGMatrix> zoomPanMatrix;      nsCOMPtr<nsIDOMSVGMatrix> temp;      float scale, x, y;      mCurrentScale->GetValue(&scale);      mCurrentTranslate->GetX(&x);      mCurrentTranslate->GetY(&y);      svgElement->CreateSVGMatrix(getter_AddRefs(zoomPanMatrix));      zoomPanMatrix->Translate(x, y, getter_AddRefs(temp));      temp->Scale(scale, getter_AddRefs(zoomPanMatrix));      zoomPanMatrix->Multiply(mCanvasTM, getter_AddRefs(temp));      temp.swap(mCanvasTM);    }  }  nsIDOMSVGMatrix* retval = mCanvasTM.get();  NS_IF_ADDREF(retval);  return retval;}