Bug 748116; Get windows taskbar tab previews working with Skia/Azure canvas; r=roc

This commit is contained in:
Nicholas Cameron 2012-04-26 10:04:36 +12:00
parent 3d56c18a45
commit 62f769d3a5
2 changed files with 9 additions and 7 deletions

View File

@ -3700,12 +3700,14 @@ nsCanvasRenderingContext2DAzure::DrawImage(const HTMLImageOrCanvasOrVideoElement
// This might not be an Azure canvas!
srcSurf = srcCanvas->GetSurfaceSnapshot();
if (srcSurf && mCanvasElement) {
// Do security check here.
CanvasUtils::DoDrawImageSecurityCheck(mCanvasElement,
element->NodePrincipal(),
canvas->IsWriteOnly(),
false);
if (srcSurf) {
if (mCanvasElement) {
// Do security check here.
CanvasUtils::DoDrawImageSecurityCheck(mCanvasElement,
element->NodePrincipal(),
canvas->IsWriteOnly(),
false);
}
imgSize = gfxIntSize(srcSurf->GetSize().width, srcSurf->GetSize().height);
}
}

View File

@ -61,7 +61,7 @@ GetRenderingContext(nsIDocShell *shell, gfxASurface *surface,
if (!ctx) {
// create the canvas rendering context
ctx = do_CreateInstance("@mozilla.org/content/2dthebes-canvas-rendering-context;1", &rv);
ctx = do_CreateInstance("@mozilla.org/content/canvas-rendering-context;1?id=2d", &rv);
if (NS_FAILED(rv)) {
NS_WARNING("Could not create nsICanvasRenderingContext2D for tab previews!");
return rv;