context.drawWindow strangeness when height > 2048

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
9 years ago
7 years ago

People

(Reporter: nicolas, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5

Loading a web page in an iframe, I want to copy its content to a canvas using the context2d.drawWindow method. Depending on the size on the region being copied (width x height), I get strange results.
if height > 2048 and width <= 2048, it's looking like only the background layer (borders, background colors) is fully drawn in the canvas, with the upper part of the foreground layer (text, pictures) which is actually (height - 2048) pixels height.
I tried to add 2048 to the page height, but it's all starting again at 4096...

Reproducible: Always

Steps to Reproduce:
1. Load the test case in chrome (need chrome privileges to use drawWindow)
2. Play with the width and height parameters
Actual Results:  
200x200 -> ok
200x2049 -> full background, 1px foreground
200x2148 -> full background, 100px foreground

Expected Results:  
Always copy the requested area with background and foreground
(Reporter)

Comment 1

9 years ago
Created attachment 414497 [details]
Visual example of the 3 tests (200x200, 200x2049, 200x2148)
(Reporter)

Comment 2

9 years ago
Created attachment 414498 [details]
Test case (load in chrome)
(Reporter)

Comment 3

9 years ago
Created attachment 414503 [details]
Test case reduced to canvas resize
Attachment #414498 - Attachment is obsolete: true
(Reporter)

Comment 4

9 years ago
The problems doesn't come from the selected area, but from the size of the canvas.

Copying only 200x200 pixels from the iframe to a 300x300 canvas works, if the canvas is resized to 300x2049, it fails.
(Reporter)

Comment 5

9 years ago
Comment on attachment 414503 [details]
Test case reduced to canvas resize

This test case requires chrome privileges.
I can't reproduce in Firefox 6.0.2. This has likely been fixed since reporting. Please re-open if this isn't the case. Sorry this took so long to triage.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.