Table rows are not returned by BuildDisplayList (which breaks elementFromPoint)




2 years ago
a year ago


(Reporter: whimboo, Unassigned)


57 Branch

Firefox Tracking Flags

(Not tracked)


As seen via attachment 8922225 [details] there are no `tr` nodes included in the returned list of nodes from `elementsFromPoint`. Over on bug 1406505 I asked David Baron and got the following response:

(In reply to David Baron :dbaron: ⌚️UTC-7 from bug 1406505 comment #18)
> (In reply to Henrik Skupin (:whimboo) from comment #17)
> > (In reply to Olli Pettay [:smaug] from comment #16)
> > > tr elements are in the tree, but looks like elementsFromPoint doesn't return
> > > them.
> > > Why that behavior, I don't know. That is a question to the layout folks.
> > 
> > Interesting. I'm not sure whom from the layout team to ask directly. David,
> > can you help us on that question please? Thanks.
> I suspect this would be fixed by adding code that does roughly:
>   if (aBuilder->IsForEventDelivery()) {
>     nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder, this,
> GetRectRelativeToSelf(), aLists.BorderBackground());
>   }
> or similar to nsTableRowFrame::BuildDisplayList (and the same for
> nsTableRowGroupFrame... the interesting question is whether to do the same
> for nsTableColFrame and nsTableColGroupFrame).  Though a little bit more
> might be needed to make it actually work.  (You can see similar code at at
> least some if not many of the uses of
> .)
> This code isn't there already because table rows aren't responsible for
> drawing their own background; it's drawn via the cells.  But
> nsLayoutUtils::GetFramesForArea() uses a display list builder configured for
> event delivery.
> The other question is then whether there are other uses of display list
> builders for event delivery that rely on not having table rows (etc.).  I
> hope not, but it seems like something to consider.

If the chosen bug summary is not the best please update it.
Priority: -- → P3
Summary: Table rows are not returned by BuildDisplayList → Table rows are not returned by BuildDisplayList (which breaks elementFromPoint)
You need to log in before you can comment on or make changes to this bug.