Bug 85560

Summary: [chromium] CCMathUtil projectPoint needs to avoid divide-by-zero
Product: WebKit Reporter: Shawn Singh <shawnsingh>
Component: Layout and RenderingAssignee: Shawn Singh <shawnsingh>
Status: RESOLVED FIXED    
Severity: Normal CC: cc-bugs, enne, jamesr, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Shawn Singh
Reported 2012-05-03 17:40:39 PDT
I'm not sure if this is causing any known rendering artifacts / bugs, but of course it needs to be fixed anyway. When m33() is zero in projectPoint(), that implies the projection plane is parallel to the ray being traced, so it doesn't really project to any specific point on the plane. To my knowledge, its correct enough to just return any point in this case, as long as we don't divide by zero and cause Infs and NaNs for the rest of the code. I think this case only happens for layers that are not visible anyway (rotated perfectly so that they don't show up, or co-planar with the camera point).
Attachments
Patch (5.80 KB, patch)
2012-05-07 10:07 PDT, Shawn Singh
no flags
Shawn Singh
Comment 1 2012-05-07 10:07:26 PDT
Created attachment 140543 [details] Patch Please note, one unit test had to be updated so it does not fail due to the new divide-by-zero code. By a lucky fluke, it turned out that the test was still providing worthwhile coverage before this fix, but now it is even better
Adrienne Walker
Comment 2 2012-05-07 11:01:35 PDT
Comment on attachment 140543 [details] Patch Nice catch. R=me.
WebKit Review Bot
Comment 3 2012-05-07 11:47:24 PDT
Comment on attachment 140543 [details] Patch Clearing flags on attachment: 140543 Committed r116332: <http://trac.webkit.org/changeset/116332>
WebKit Review Bot
Comment 4 2012-05-07 11:47:33 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.