Closed
Bug 728629
Opened 13 years ago
Closed 12 years ago
canvas2D fillText & strokeText should not throw exceptions when non-finite doubles are passed for the position
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: jonathan.winterflood, Assigned: almasry.mina)
References
Details
Attachments
(1 file)
|
3.23 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Build ID: 20120216082320
Steps to reproduce:
Called canvas 2D context method strokeText or fillText with NaN, undefine or Infinity as a coordinate:
var c=document.createElement('canvas');
document.body.appendChild(c);
c.getContext("2d").strokeText("Hello",NaN,50); // Substitute fillText, undefined, Infinity
a null is ignored and seems treated as 0 (this may be an acceptable behaviour)
Actual results:
Exception "Error: An invalid or illegal string was specified" was thrown.
Expected results:
An exception along the lines of 'Error: An invalid x coordinate was specified: NaN' (substitute y, undefined, Infinity... as appropriate) should be thrown.
| Reporter | ||
Updated•13 years ago
|
Component: Untriaged → Canvas: 2D
Product: Firefox → Core
| Reporter | ||
Updated•13 years ago
|
Severity: normal → minor
Updated•13 years ago
|
QA Contact: untriaged → canvas.2d
Comment 1•13 years ago
|
||
Actually, the behavior the spec calls for here is to silently ignore the strokeText call.
Summary: canvas2D fillText & strokeText incorrect exception with invalid coordinate → canvas2D fillText & strokeText should not throw exceptions when non-finite doubles are passed for the position
Comment 2•13 years ago
|
||
More still? *sigh*
| Assignee | ||
Comment 3•12 years ago
|
||
This is no longer an issue. Attached a test case to show that.
Attachment #792545 -
Flags: review?(vladimir)
Attachment #792545 -
Flags: review?(vladimir) → review+
| Assignee | ||
Comment 4•12 years ago
|
||
Should I checkin this or no?
Comment 6•12 years ago
|
||
Fwiw, chances are the switch to WebIDL bindings is what fixed this.
| Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 8•12 years ago
|
||
Comment 9•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•