Summary: | Canvas: rect(x,y,w,h) should move to (x,y) even if w=0 and h=0 | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andreas Kling <kling> | ||||
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | Keywords: | HTML5 | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Andreas Kling
2010-07-13 16:37:42 PDT
Created attachment 61433 [details]
Proposed patch
Comment on attachment 61433 [details] Proposed patch Do we still need the validateRectForCanvas function? Can we refactor it so we can still use it? > + if (!isfinite(x) | !isfinite(y) | !isfinite(width) | !isfinite(height)) > + return; Why "|" instead of "||"? > + if (width < 0) { > + width = -width; > + x -= width; > + } > + > + if (height < 0) { > + height = -height; > + y -= height; > + } It’s inelegant to modify the arguments like this. r=me Committed r63270: <http://trac.webkit.org/changeset/63270> |