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


Attachments
Proposed patch (2.25 KB, patch)
2012-04-26 07:12 PDT, Kartikaya Gupta (email:kats@mozilla.com)
jmuizelaar: review+
Details | Diff | Splinter Review

Description Kartikaya Gupta (email:kats@mozilla.com) 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 Kartikaya Gupta (email:kats@mozilla.com) 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 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 Kartikaya Gupta (email:kats@mozilla.com) 2012-04-26 11:26:24 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/ead719dd0ec1
Comment 4 Ed Morley [:emorley] 2012-04-27 07:04:36 PDT
https://hg.mozilla.org/mozilla-central/rev/ead719dd0ec1

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