Closed Bug 736877 Opened 14 years ago Closed 14 years ago

Context2D permanently stops rendering after setting a specific transform.

Categories

(Core :: Graphics: Canvas2D, defect)

11 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: grant, Unassigned)

Details

Attachments

(2 files)

Attached file FFCanvasBug.html —
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.53.11 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10 Steps to reproduce: If you set a transformation representing skewX=145, skewY=45, the canvas will lock up, and no longer render. Note that this transformation should result in no rendering (similar to a 0 scale transformation), but it will not render even after changing to a different transformation or doing a restore(). ctx.fillStyle = "#0F0"; ctx.fillRect(0,0,50,50); // renders as expected ctx.setTransform(0.7071067811865476, 0.7071067811865475, -0.7071067811865476, -0.7071067811865475, 0, 0); ctx.setTransform(1,0,0,1,0,0); // revert to identity matrix ctx.fillStyle = "#F00"; ctx.fillRect(100,0,50,50); // does not render. Only reseting the canvas by setting width/height will resolve this. Actual results: Second (red) square does not render after setting and reverting the transformation. Expected results: Red square should render correctly. (for reference: works as expected in webkit)
Forgot to save after removing test for resetting the canvas with canvas.width prior to uploading the original test file. This removes that to make the problem more clear.
Appears to be fixed in Firefox 12. Likely the same root cause as bug 720721. +cc: Jeff Muizelaar
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Confirmed that this is resolved in 12. Any thoughts on inexpensive (computationally) workarounds in the interim? This is an edge case, but the outcome (complete rendering failure) is obviously something I'd like to avoid in our framework.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: