[Webkit-unassigned] [Bug 96015] New: 2D canvas strokeRect: negative width or height should affect winding direction

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 6 13:19:00 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=96015

           Summary: 2D canvas strokeRect: negative width or height should
                    affect winding direction
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Canvas
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: junov at google.com
                CC: darin at apple.com, ian at hixie.ch, simon.fraser at apple.com,
                    dino at apple.com, senorblanco at chromium.org


>From whatwg strokeRect spec:
"the path has a single subpath are four points, with coordinates (x, y), (x+w, y), (x+w, y+h), and (x, y+h), connected to each other in that order by straight lines"

Emphasis on: "in that order"

This means that if w is negative xor y is negative, then the vertices should be drawn in counter clockwise order. This has an effect on how line dashes are drawn.  This is currently broken because CanvasRenderingContext2D::strokeRect calls validateRectForCanvas, which normalizes the rectangle to make w and h positive.

When fixing the, care must be taken not to regress any of the graphics ports.  The skia port of GraphicsContext is capable of handling negative w/h, haven't looked at the others yet.

-- 
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