Hi, > > is there a better way to verify if a nsiframe is visible in viewport > Which viewport?
but viewport, I mean area in the page currently being displayed. >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? Yep, it fixes it ;) great ... thanks ! >> http://lxr.mozilla.org/mozilla1.8/source/extensions/spatialnavigation/src/nsSpatialNavigationUtils.cpp#780 > I hate to ask this... why isn't this using GetClosestView if that's what it > wants? not sure how getClosestView would help here : / -- --Antonio Gomes _______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding
