mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
Bug 748116; Get windows taskbar tab previews working with Skia/Azure canvas; r=roc
This commit is contained in:
parent
d450574f99
commit
dbc18f6058
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user