Closed Bug 531064 Opened 15 years ago Closed 13 years ago

context.drawWindow strangeness when height > 2048

Categories

(Core :: Graphics: Canvas2D, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: nicolas, Unassigned)

Details

Attachments

(2 files, 1 obsolete file)

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
Attached file Test case (load in chrome) (obsolete) —
Attachment #414498 - Attachment is obsolete: true
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.
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
Closed: 13 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: