Closed Bug 477262 Opened 15 years ago Closed 15 years ago

viewportVisibleRect can return null if the viewingRect has size 0

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Gavin, Assigned: mfinkle)

Details

Attachments

(1 file)

this is causing trouble if we get spurious 0/0 resize events early in startup. I propose we fix wsRect.intersect to return [0,0,0,0] for [0,0,0,0].intersect(0,0,10,10), rather than null.
Though I suppose it doesn't make too much sense to return an no-width/height rect when two rects are adjacent but don't actually interesect. We could special case 0-width/height rects I suppose, but perhaps we should just have the viewportVisibleRect deal with non-intersecting rects.
possible fix if we make viewportVisibleRect deal with the null result from intersect
Comment on attachment 360970 [details] [diff] [review]
make viewportVisibleRect deal with a null intersect result

yeah, let's just do this
Attachment #360970 - Flags: review+
http://hg.mozilla.org/mobile-browser/rev/f021711f4e8d
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
bugspam
Assignee: nobody → mark.finkle
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: