Closed Bug 172661 Opened 22 years ago Closed 22 years ago

nsIFrame::CheckVisibility() doesn't handle enough cases

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: aaronlev, Assigned: attinasi)

References

Details

CheckVisibility() is not checking to see if a frame has visibility:hidden or visibility:collapsed. Shouldn't CheckVisibility() return false when something is hidden that way? I haven't tested what happens when something is hidden via zindex, but I guess that should be supported as well, if it isn't.
Blocks: 172656
Does CheckVisibility say something is invisible if it's scrolled off screen? If so, I suppose we can't just simply use CheckVisibility from nsFind to determine if a range returned is visible, because it needs to find things that are off-screen too.
Why is attinasi still the owner for layout bugs. Is he still active in Mozilla?
CheckVisibility seems to be used for selection. Should we still be able to select things with 'visibility: hidden'? Should we scroll to them? I think the answer to both is yes. (See CSS2 11.2 for the little text to go by.) (BTW, layout is going to be split, with new component owners, whenever the split is actually done. See bug 160347.)
CheckVisibility is a bad name then, because it sounds like it has something to do with the "visibility: blah" styles. Maybe the various CheckVisibility methods should take another argument? Either out boolean invisibleeViaStyle or in boolean allowInvisibleViaStyle (which would affect how the return value is computed)
CC'ing mjudge, to comment on whether elements invisible through CSS should be selectable. Personally I don't think visibility: hidden or visibility: collapse should be selectable. Currently, display: none stuff is not selectable, and I think it should behave like that. What if a user selects text and gets a bunch of stuff that's not on the page?
Aha, why we have IsVisibleForPainting(), although it requires the creation of a device context to use it. It's just easier to use frame->GetStyleContext and go from there. Marking INVALID
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.