Bug 1531417 - fix marionette test. r=me CLOSED TREE

This commit is contained in:
Lee Salzman 2019-03-01 16:40:58 -05:00
parent 8ce632b49b
commit 7f0bdd5469

View File

@ -133,6 +133,13 @@ capture.canvas = function(win, left, top, width, height,
canvas.height = canvasHeight;
}
if (width * scale > MAX_SKIA_DIMENSIONS) {
width = Math.floor(MAX_SKIA_DIMENSIONS / scale);
}
if (height * scale > MAX_SKIA_DIMENSIONS) {
height = Math.floor(MAX_SKIA_DIMENSIONS / scale);
}
let ctx = canvas.getContext(CONTEXT_2D);
if (flags === null) {
flags = ctx.DRAWWINDOW_DRAW_CARET;