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.
Created attachment 618646 [details] [diff] [review]
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 on attachment 618646 [details] [diff] [review]
viewport is a bad name for this variable.