Hm, could this be related to e10s? I remember we had to do some work to
make the devtools screenshot command e10s-compatible. Now it runs in the
content process, whereas before it would run in the parent process. Trying
to take a screenshot from the parent process with e10s enabled would end up
with an white canvas.
In fact, if you open the dev toolbar (shift-F2) and type in 'screenshot
--chrome', this will take a screenshot of the whole browser window, and
you'll see that the content area is just a white rectangle if you have e10s
enabled.

On Wed, Jan 20, 2016 at 10:50 AM, <m.bauermeis...@sto.com> wrote:

> I'm not sure what exactly I'm doing wrong but neither drawWindow, nor
> asyncDrawXULElement seem to work for me. Not even for screenshots of the
> whole window.
>
> "Borrowing" from capture.js/screenshot.js also made me none the wiser.
>
> Is there something wrong with how I'm trying to copy the contents of the
> window to the canvas?
>
>
> <?xml version="1.0"?>
> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
> <window xmlns="
> http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
> xmlns:html="http://www.w3.org/1999/xhtml"; id="window">
>
> <button>Test</button>
>
> <html:canvas id="canvas" width="1024" height="768">
> </html:canvas>
>
> <script>
>
> var canvas = document.getElementById("canvas");
> var ctx = canvas.getContext("2d");
> ctx.drawWindow(window, 0, 0, 1024, 768, "rgba(255,255,255,1)");
> </script>
> </window>
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to