[Webkit-unassigned] [Bug 80637] New: fillText() does not ignore null or undefined as the maxWidth parameter
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Mar 8 13:54:38 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=80637
Summary: fillText() does not ignore null or undefined as the
maxWidth parameter
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Canvas
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: tomhudson at google.com
CC: abarth at webkit.org, tomhudson at google.com
(Originally reported at http://code.google.com/p/chromium/issues/detail?id=110995, but appears to be a WebKit issue)
1. Use null or undefined as the fourth parameter for fillText
e.g. ctx.fillText("Hello World!", 10, 10, null);
2. Note that it does not get displayed (probably translates null -> 0)
By my reading of the spec, that may be a defensible result for null, but not for undefined.
V8CanvasRenderingContext2D.cpp is auto-generated, and the IDL allows for optional parameters, but the autogenerated implementation isn't checking whether the 4th parameter is NULL or UNSPECIFIED - if anything's provided there from the JavaScript, it's passed as the 4th parameter, presumably coerced to 0. When the fourth parameter is undefined, we should instead be calling the 3-parameter version of the function.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list