Closed Bug 401788 Opened 17 years ago Closed 14 years ago

Canvas throws exceptions on invalid string values

Categories

(Core :: Graphics: Canvas2D, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla2.0b2

People

(Reporter: philip, Assigned: Ms2ger)

References

()

Details

(Keywords: dev-doc-complete)

Attachments

(1 file, 1 obsolete file)

User-Agent: Opera/9.24 (X11; Linux i686; U; en) Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a9pre) Gecko/2007103004 Minefield/3.0a9pre Invalid strings are handled incorrectly in a few places: canvas.getContext('unrecognised') should return null, but throws NS_ERROR_ILLEGAL_VALUE. canvas.toDataURL('unrecognised') should fall back to image/png, but throws NS_ERROR_FAILURE. ctx.{globalCompositeOperation,lineCap,lineJoin} = 'unrecognised' should be ignored, but throw NS_ERROR_NOT_IMPLEMENTED. Opera and WebKit follow the spec in these cases. Reproducible: Always
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Is this still an issue?
Assignee: nobody → Ms2ger
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: x86 → All
Attached patch Patch v1 (obsolete) (deleted) — Splinter Review
Attachment #450356 - Flags: review?(jonas)
Blocks: 571532
Keywords: checkin-needed
Keywords: dev-doc-needed
this is bitrotted against current m-c, please provide an updated patch and re-ask c-n.
Keywords: checkin-needed
Attached patch Patch v2 (merged to tip) (deleted) — Splinter Review
r=jonas
Attachment #450356 - Attachment is obsolete: true
Keywords: checkin-needed
If you are confident that the changes between the old and new patch are trivial enough, can you manually set jonas r+ on the new patch and say "carrying forward r+"... Then I'll be happy to check it in for you (since you tagged as checkin-needed).
Adding Vlad in CC since I thought he'd have an opinion on this subject.
Comment on attachment 456174 [details] [diff] [review] Patch v2 (merged to tip) Looks fine, though one small change: > nsresult > nsHTMLCanvasElement::ToDataURLImpl(const nsAString& aMimeType, > const nsAString& aEncoderOptions, > nsAString& aDataURL) > { >- nsresult rv; don't do this -- keep the nsresult declaration here, it's used all throughout the function below.
Attachment #456174 - Flags: review+
Just following "Declare local variables as near to their use as possible." <https://developer.mozilla.org/En/Developer_Guide/Coding_Style#General_Practices> here.
Can you push this or do you need someone to do it? (Asking because of the checkin-needed)
I don't understand what's not obvious. I just followed Marco's instructions: > this is bitrotted against current m-c, please provide an updated patch and > re-ask c-n. I would assume that asking checkin-needed for a reviewed patch, which just needed to be updated to current trunk, is an unambiguous request to check it in.
(In reply to comment #5) > If you are confident that the changes between the old and new patch are trivial > enough, can you manually set jonas r+ on the new patch and say "carrying > forward r+"... Bugzilla doesn't have support for "carrying forward r+". Manually setting r+ isn't useful, as it lacks the important "jonas" bit. (In reply to comment #10) > I don't understand what's not obvious. I just followed Marco's instructions: > > > this is bitrotted against current m-c, please provide an updated patch and > > re-ask c-n. > > I would assume that asking checkin-needed for a reviewed patch, which just > needed to be updated to current trunk, is an unambiguous request to check it > in. Yep.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3b2
Thanks! I added a note to <https://developer.mozilla.org/en/Firefox_4_for_developers#section_3>. It doesn't look like anything else needs to be updated.
Depends on: 578215
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: