[webkit-reviews] review granted: [Bug 39149] Canvas element cannot have negative width or height : [Attachment 56176] Proposed patch v2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 16 00:39:34 PDT 2010


Eric Seidel <eric at webkit.org> has granted Andreas Kling
<andreas.kling at nokia.com>'s request for review:
Bug 39149: Canvas element cannot have negative width or height
https://bugs.webkit.org/show_bug.cgi?id=39149

Attachment 56176: Proposed patch v2
https://bugs.webkit.org/attachment.cgi?id=56176&action=review

------- Additional Comments from Eric Seidel <eric at webkit.org>
WebCore/html/HTMLCanvasElement.cpp:116
 +	    setAttribute(heightAttr, String::number(DefaultHeight));
I would have probably used a ternary here.  Something like:
int height = (value >= 0) ? value : DefaultHeight);

Otherwise the code and test look great.


More information about the webkit-reviews mailing list