Last Comment Bug 749164 - tcheckerboard2 sometimes returns NaNs
: tcheckerboard2 sometimes returns NaNs
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: unspecified
: All Android
-- normal (vote)
: Firefox 15
Assigned To: Kartikaya Gupta (
: Sebastian Kaspari (:sebastian)
Depends on:
Blocks: 748382
  Show dependency treegraph
Reported: 2012-04-26 06:42 PDT by Kartikaya Gupta (
Modified: 2012-04-27 07:04 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Proposed patch (2.25 KB, patch)
2012-04-26 07:12 PDT, Kartikaya Gupta (
jmuizelaar: review+
Details | Diff | Splinter Review

Description User image Kartikaya Gupta ( 2012-04-26 06:42:28 PDT
The patch for bug 748382 seems to have made it possible for the checkerboard tests to return NaN because the screenArea calculated might be zero.
Comment 1 User image Kartikaya Gupta ( 2012-04-26 07:12:44 PDT
Created attachment 618646 [details] [diff] [review]
Proposed patch

Running this through try right now. The problem was that mPageRect is already translated by the viewport origin, so when you scroll to the bottom of a page like CNN you'd get something like viewport at 0,1281,720,2319 and page at 0,-1281,720,877 which would then intersect to empty.

Also normally you should never be able to get into a case where the intersection is empty, but I added an extra check to guard against it anyway.
Comment 2 User image Jeff Muizelaar [:jrmuizel] 2012-04-26 08:56:00 PDT
Comment on attachment 618646 [details] [diff] [review]
Proposed patch

viewport is a bad name for this variable.
Comment 3 User image Kartikaya Gupta ( 2012-04-26 11:26:24 PDT
Comment 4 User image Ed Morley [:emorley] 2012-04-27 07:04:36 PDT

Note You need to log in before you can comment on or make changes to this bug.