diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 445ab28e27b..e4df6e354d2 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -3714,7 +3714,12 @@ nsLayoutUtils::SurfaceFromElement(nsIDOMElement *aElement, result.mSurface = gfxsurf; result.mSize = gfxIntSize(imgWidth, imgHeight); result.mPrincipal = principal; - result.mIsWriteOnly = PR_FALSE; + + // SVG images could have and/or elements that load + // content from another domain. For safety, they make the canvas write-only. + // XXXdholbert We could probably be more permissive here if we check that our + // helper SVG document has no elements that could load remote content. + result.mIsWriteOnly = (imgContainer->GetType() == imgIContainer::TYPE_VECTOR); return result; }