The default bug view has changed. See this FAQ.

tcheckerboard2 sometimes returns NaNs

RESOLVED FIXED in Firefox 15

Status

()

Firefox for Android
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: kats, Assigned: kats)

Tracking

unspecified
Firefox 15
All
Android
Points:
---

Firefox Tracking Flags

(firefox15 fixed)

Details

Attachments

(1 attachment)

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]
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.
Attachment #618646 - Flags: review?(jmuizelaar)
Comment on attachment 618646 [details] [diff] [review]
Proposed patch

viewport is a bad name for this variable.
Attachment #618646 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/ead719dd0ec1
status-firefox15: --- → fixed
Target Milestone: --- → Firefox 15
https://hg.mozilla.org/mozilla-central/rev/ead719dd0ec1
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.