Closed Bug 296904 Opened 20 years ago Closed 17 years ago

canvas shapes incorrectly affect current path

Categories

(Core :: Graphics: Canvas2D, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: paper, Unassigned)

References

()

Details

(Keywords: relnote)

Attachments

(2 files, 1 obsolete file)

From the specs (as written currently): "Shapes are painted without affecting the current path" However, clearRect, fillRect, and strokeRect all destroy the current path in the current implementation. Safari canvas specs say clearRect is destroys the current path, while fillRect and strokeRect have no such feature listed. At the very least, I suggest making all three functions behave the same, either by altering Gecko code to the spec, or the spec to the Gecko code.
Fixed either by 333177 or before; we use stroke_preserve and friends now.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached file test case
More comprehensive test case - fillRect, strokeRect, clearRect, drawImage, putImageData.
Attached patch patch (obsolete) — Splinter Review
This fixes compatibility with the current spec, and with Opera and Safari 3. It also breaks compatibility with some sites that depend on FF2's behaviour - see http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-September/012561.html
Attachment #282173 - Flags: review?(vladimir)
Comment on attachment 282173 [details] [diff] [review] patch looks good to me; I wish we hadn't put in fillRect()/drawRect() in the first place, but I guess we would've had the same problems with images anyway.
Attachment #282173 - Flags: review?(vladimir) → review+
Same code, but converted the test case into a reftest. (I'm hoping it's alright to carry through the r+.)
Attachment #282173 - Attachment is obsolete: true
Attachment #282192 - Flags: superreview?(pavlov)
Attachment #282192 - Flags: review+
Would be great to get all browsers do the same before too many sites start depending on the old behavior. And since there is a patch getting it fixed shouldn't be too much work.
Flags: blocking1.9?
Flags: blocking1.9? → blocking1.9+
Attachment #282192 - Flags: superreview?(pavlov) → superreview+
Attachment #282192 - Flags: approval1.9?
blocking1.9 already, doesn't need approval to land, right?
Comment on attachment 282192 [details] [diff] [review] patch with reftest Correct; Philip, do you have cvs commit privs? Or do you need me to land this?
Attachment #282192 - Flags: approval1.9? → approval1.9+
Checked in, thanks!
Status: REOPENED → RESOLVED
Closed: 19 years ago17 years ago
Keywords: relnote
Resolution: --- → FIXED
Thanks for writing a reftest and including it in the patch! People who include automated tests in their patches are my heroes.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: