Antonio Gomes wrote:
> is there a better way to verify if a nsiframe is visible in viewport

Which viewport?

> http://lxr.mozilla.org/mozilla1.8/source/extensions/spatialnavigation/src/nsSpatialNavigationUtils.cpp#780

This code:

807    nsRect relFrameRect = frame->GetRect();
...
809    nsIView *containingView = frame->GetViewExternal();
...
821    viewManager->GetRectVisibility(containingView, relFrameRect,
822                                   NS_STATIC_CAST(PRUint16, (kMinPixels * 
p2t)),
823                                   &rectVisibility);

is wrong.  GetRectVisibility takes a rect in the view's coordinate system, and 
GetParent() is in the frame's parent's coordinate system.  So any time the 
frame 
has a view you'll be off by the In other words, you want realFrameRect to be 
more like nsRect(nsPoint(0, 0), frame->GetSize()).

Does fixing that help any?

-Boris

_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to