Closed Bug 476729 Opened 15 years ago Closed 15 years ago

Calculate a viewing rect relative to the canvas

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: taras.mozilla, Assigned: taras.mozilla)

References

Details

Attachments

(1 file, 1 obsolete file)

currently viewingRect is partially bogus.
a) It contains negative values when toolbar is showing(in a non-frozen state)
ie instead of height changing, y is set to a -ve value
Same thing happens with the tab bar
b)when a frozen toolbar is showing, then viewingRect does not comprensate for it(screws up spacial nav)
Attached patch workaround (obsolete) — Splinter Review
In this patch I use math.max(0,) to normalize left/right(instead of fixing resizing code)

and iterate over widgets to find a frozen one that may overlap. It's suboptimal, but it solves the problem at the moment. A correct solution will take a little more effort.
Assignee: nobody → tglek
Depends on: 474804
Summary: make WidgetStack's viewingRect true → Calculate a viewing rect relative to the canvas
I still would like to be able to compensate for frozen toolbar hanging over the viewport, but for now i'd like to get this landed.
Attachment #360387 - Attachment is obsolete: true
Attachment #360611 - Flags: review?(gavin.sharp)
Comment on attachment 360611 [details] [diff] [review]
using correct rects

WidgetStack tries to be somewhat canvas-agnostic, so a better name would be viewportVisibleRect, I think. r=me with that change.

(I think losing the "public" viewingRect getter and replacing it with this one is OK, since the actual viewingRect is unlikely to be useful to external consumers anyways, and there aren't any other users of this that I know of.)
Attachment #360611 - Flags: review?(gavin.sharp) → review+
Oh, and can you add a comment that mentions that we're relying on viewportBounds and viewingRect having the same origin? We do have some code that tries to support them being aligned differently, but don't rely on it in Fennec (I suspect it's buggy). Probably worth filing a followup to figure out what to do about that...
I'm assuming we can close this out since the patch was pushed
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: