Closed
Bug 401788
Opened 17 years ago
Closed 14 years ago
Canvas throws exceptions on invalid string values
Categories
(Core :: Graphics: Canvas2D, defect, P2)
Core
Graphics: Canvas2D
Tracking
()
RESOLVED
FIXED
mozilla2.0b2
People
(Reporter: philip, Assigned: Ms2ger)
References
()
Details
(Keywords: dev-doc-complete)
Attachments
(1 file, 1 obsolete file)
13.94 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
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
Updated•17 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•17 years ago
|
Priority: -- → P2
Comment 1•15 years ago
|
||
Is this still an issue?
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → Ms2ger
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: x86 → All
Assignee | ||
Comment 2•14 years ago
|
||
Attachment #450356 -
Flags: review?(jonas)
Attachment #450356 -
Flags: review?(jonas) → review+
Assignee | ||
Updated•14 years ago
|
Blocks: 571532
Keywords: checkin-needed
Assignee | ||
Updated•14 years ago
|
Keywords: dev-doc-needed
Comment 3•14 years ago
|
||
this is bitrotted against current m-c, please provide an updated patch and re-ask c-n.
Keywords: checkin-needed
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Comment 5•14 years ago
|
||
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).
Comment 6•14 years ago
|
||
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+
Assignee | ||
Comment 8•14 years ago
|
||
Just following "Declare local variables as near to their use as possible." <https://developer.mozilla.org/En/Developer_Guide/Coding_Style#General_Practices> here.
Comment 9•14 years ago
|
||
Can you push this or do you need someone to do it? (Asking because of the checkin-needed)
Assignee | ||
Comment 10•14 years ago
|
||
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.
Comment 11•14 years ago
|
||
(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.
Comment 12•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3b2
Assignee | ||
Comment 13•14 years ago
|
||
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.
Keywords: dev-doc-needed → dev-doc-complete
Comment 14•14 years ago
|
||
Could this have caused: https://bugzilla.mozilla.org/show_bug.cgi?id=578215
You need to log in
before you can comment on or make changes to this bug.
Description
•