[webkit-dev] Table hit testing

David Hyatt hyatt at apple.com
Thu May 20 13:07:57 PDT 2010

On May 20, 2010, at 2:54 PM, Fady Samuel wrote:

> CSS is Awesome indeed :P
> So are you against fast paths? It seems if we don't have overflow, we can do binary searches for hit testing, right? Unless I'm yet again missing something fundamental? Sorry about that. :P

Even when content doesn't overflow cells, the cells can actually overlap one another.  This happens with crazy spans in degenerate cases.  That's why the painting code narrows things down to a column and row range, and then makes sure to walk all the rows painting any cells in that column range.  In those degenerate cases, the paint and hit testing order does become relevant for the spanning cells.

If we could properly detect those degenerate cases, then you could probably get away with binary search, but until we do that, I don't think you can.

(hyatt at apple.com)

More information about the webkit-dev mailing list