[webkit-reviews] review granted: [Bug 43161] 2d.path.clip.empty.html test is failing : [Attachment 63026] take 3
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 29 23:23:15 PDT 2010
Darin Adler <darin at apple.com> has granted Matthew Delaney
<mdelaney at apple.com>'s request for review:
Bug 43161: 2d.path.clip.empty.html test is failing
https://bugs.webkit.org/show_bug.cgi?id=43161
Attachment 63026: take 3
https://bugs.webkit.org/attachment.cgi?id=63026&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
> + // If the path is empty, CGContextClip will do nothing.
> + // If the path contains only a point, CGContextClip will reduce the
> + // clipping region to nothing. Since, we want this method to reduce
> + // the clipping region to nothing when the path is empty, swapping
> + // a trivial path (one containing only a point) in for the empty
> + // path achieves our desired behavior.
Great comment. You could probably shorten it a bit, but this is exactly the
kind of comment I was looking for.
An even more efficient way to get the desired result would be to check for the
empty patch and call CGContextClipToRect(context, CGRectZero) instead of
CGContextBeginPath/CGContextAddPath/CGContextClip in that case.
More information about the webkit-reviews
mailing list