Bernd wrote: > No Boris, you aren't missing anything. But you are probably reinventing > the wheel see: > http://lxr.mozilla.org/mozilla1.8/source/layout/tables/nsTableFrame.cpp#3841 > > It shows clearly when you can do which optimization.
I'm not sure it does. For example, if NeedStrategyInit() or equivalent is true in today's world, that is NOT good enough for what SetGeometryDirty() tries to accomplish, because while it will trigger a column rebalance it will not reflow the rows unless the column widths _change_. The code cited is trying to optimize away column rebalances, not optimize away reflows that would affect the vertical sizing of cells. What we want to do on trunk is to reflow certain cells (those affected by the cell insertions/deletions) even if none of the column widths changed, so that heights can update as needed. One question is what "certain" are. Right now, it's "all", all the time, if any cells got added or removed anywhere in the table. Ideally we would cheaply flag only some rows/rowgroups/cells(?) as needing reflow. Less ideally, we'd at least optimize the cases where "certain" == "none" and not reflow anything once we determine that the column widths are still the same. In particular, I don't see the code cited doing anything with rowspans, which we would probably need to do for what we want on trunk. -Boris _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

