Alex Vincent wrote:
In my particular case, no. When I said "Can the user see it", I mean, "Assuming this browser window were in the foreground, would this frame be rendered on the screen or somewhere you could scroll to in the main window?"

OK. So all you really care about is whether anything is on top of it, but not if it's clipped by scrollframes? What about overflow:hidden, where the page can scroll to it but the user can't?

Pardon my ignorance, but I'm wondering what impact other windows have on this. (I know well enough that you wouldn't ask without good reason.)

Well, it affects visibility to the user (but not our internal data structures, necessarily).

So what are you really asking? Also are you working against Gecko 1.8, or Gecko 1.9?

I'm asking if there's a way to tell that a frame doesn't have another frame covering it, partially or completely, and does paint to a portion of the window (including parts you could see if you scrolled the window to them).

We're in a transition state from 1.8 to 1.9.0.x, so I have to work with both code bases at the moment.

On 1.9 you could build the display list and then grovel through it after optimizing it, but that would also clip out things that are not in the viewport right now....

On 1.8, there's nothing that nice.

Honestly, I don't think we have a simple way to answer the question you're trying to answer here (mostly because nothing in the current Gecko code needs it answered). We can answer the question of "what things are visibile right now" including covering stuff, but not the question of "what things could be visible under this one set of transformations but not this other set"....

Let's say you have one element partially covering another - say, a text hyperlink that gets partially hidden because someone positioned a lightbox over it. I'd really love to get a rectangle for only the part of the hyperlink that's visible, if that's possible.

The display list stuff might do this (though it errs on the side of treating things as visible if it's not sure, and has the scrollframe issues from your point of view... and it might optimize away only entire display items, not parts of them).

Another example would be an overflow: hidden case - where there's content the user can't see because it's in an area of the parent's layout which is cropped by the overflow setting.

Except it can be scrolled to, as above.

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

Reply via email to