[Webkit-unassigned] [Bug 20258] New: HTML5 canvas: fillRect() and friends do not support negative heights

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 1 14:20:17 PDT 2008


           Summary: HTML5 canvas: fillRect() and friends do not support
                    negative heights
           Product: WebKit
           Version: 525.x (Safari 3.1)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: drj at pobox.com

fillRect(x, y, w, h)
will fail with "INDEX_SIZE_ERR: INDEX_SIZE_ERR: DOM Exception 1" (or something
like that) when h is negative.

There's nothing in the spec to prohibit fillRect() from taking a negative h. 
The specification requires that the path be formed from the four coordinates:
"(x, y), (x+w, y), (x+w, y+h), (x, y+h)".  These four coodinates still have a
perfectly sensible interpretation when either h or w is negative, and there's
nothing I can see in the spec from prohibiting h and w from being negative.

It is sometimes even quite natural to use a negative h, for example if one has
flipped the Y-axis by issuing a scale(1,-1) then one still might want (x,y) to
be the top-left of a rectangle, in which case h will be negative.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list