Bug 130473 - Implement isPointInPath and isPointInStroke with Path2D argument
Summary: Implement isPointInPath and isPointInStroke with Path2D argument
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://www.whatwg.org/specs/web-apps/...
Keywords: WebExposed
Depends on:
Reported: 2014-03-19 14:08 PDT by Dirk Schulze
Modified: 2014-03-20 00:20 PDT (History)
8 users (show)

See Also:

Patch (17.01 KB, patch)
2014-03-19 14:14 PDT, Dirk Schulze
dino: review+
Details | Formatted Diff | Diff
Patch (19.29 KB, patch)
2014-03-19 15:00 PDT, Dirk Schulze
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schulze 2014-03-19 14:08:04 PDT
Implement isPointInPath and isPointInStroke with Path2D argument
Comment 1 Dirk Schulze 2014-03-19 14:14:06 PDT
Created attachment 227215 [details]
Comment 2 Dean Jackson 2014-03-19 14:35:04 PDT
Comment on attachment 227215 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=227215&action=review

> LayoutTests/fast/canvas/canvas-path-isPointInPath-expected.txt:12
> +PASS ctx.isPointInPath(null, 50, 50) threw exception TypeError: Argument 3 ('winding') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".

Discussion on irc suggests this error message is wrong.

> LayoutTests/fast/canvas/script-tests/canvas-path-isPointInPath.js:34
> +shouldThrow("ctx.isPointInPath({}, 50, 50, 'nonzero')");
> +shouldThrow("ctx.isPointInPath({}, 50, 50, 'evenodd')");

I would like to see some tests where you are passing in some extremely unexpected data, such as Number.MAX_VALUE or strings, etc.
Comment 3 Dirk Schulze 2014-03-19 15:00:50 PDT
Created attachment 227222 [details]
Comment 4 WebKit Commit Bot 2014-03-19 15:40:09 PDT
Comment on attachment 227222 [details]

Clearing flags on attachment: 227222

Committed r165927: <http://trac.webkit.org/changeset/165927>
Comment 5 WebKit Commit Bot 2014-03-19 15:40:15 PDT
All reviewed patches have been landed.  Closing bug.