Re: Include out of viewport frames in display list

[email protected]
Newsgroups gmane.comp.mozilla.devel.layout
Message-ID <[email protected]>
Thanks again for replying!

I was able to get everything working with your instructions :)
I also applied the same method to ignore backface-visibility:hidden;
This check is done here:
https://dxr.mozilla.org/mozilla-central/rev/e5a10bc7dac4ee2453d8319165c1f6578203eac7/layout/base/nsDisplayList.cpp#6018

Hopefully I'm now only excluding elements with display:none and elements which aren't visible because their outside the visible part of a scrollable HTML element.

Another thing I realized I should do was calling GetPrimaryFrame() on the dom::Element* I got from GetFramesForArea(). This way I could filter only the primary frames, which correspond to the HTML elements. Now I no longer have duplicate HTML tags in my output. This also filters out the list decoration of ul and ol elements and the scrollbars.

And sorry about the video! I forgot to turn that on. But the video wasn't very good anyway.

Thanks for the help and I'll post my final result when I've got something to show.

On Thursday, 5 May 2016 01:59:34 UTC+2, [email protected]  wrote:
> On Monday, May 2, 2016 at 4:55:13 PM UTC-4, [email protected] wrote:
> > Does it means I also have to modify nsDisplayList.h in order to add the flag to nsDisplayListBuilder? I'm still a bit unsure how to add a flag to nsDisplayListBuilder. 
> 
> Just add a new member variable, like mIgnoreVisibility (and a getter/setter for it, if it's not public).
> 
> > In my brief testing I noticed that overriding the pointer-events check in nsDisplayList::HitTest() allows me to also retrieve elements with pointer-events:none. Though strangely no iframes with pointer-events:none. Those are still left out.
> 
> Ah, there is a separate check for iframes here [1]!
> 
> > I made this screen recording to give an idea of my end goal: https://youtu.be/EtH1MMDorKA
> 
> The video is private, I can't access it.
> 
> Cheers,
> Botond
> 
> [1] https://dxr.mozilla.org/mozilla-central/rev/369a5ee3a2880a4a98df3a00bf3db8d8f36b181b/layout/generic/nsSubDocumentFrame.cpp#379
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.