Robert O'Callahan wrote:
So I suspect the listbox code is trying to avoid a situation where the listbox is scrolled to the bottom, and the first-pass reflow gives a temporarily-shorter height than the true height, which would cause the listbox to spuriously scroll up.
OK. I think I'm actually going to ignore this eventuality, with the following comment:
/* * I don't think we want to SetSuppressScrollbarUpdate() here. The only case * we'd _want_ to suppress it is the case when we're going to do both reflow * passes and the first pass will produce a height that is both smaller than * the current height and smaller than the height we'll eventually end up * with, since in that situation we'd end up clamping the scroll position to * a too-small value after the first reflow. The only way that can happen is * if our size attr has decreased (so that we'll end up with a smaller height * than our current height), and at the same time the size of our tallest * option has increased. This is a pretty rare case, and not calling * SetSuppressScrollbarUpdate() means we can get away without a second reflow * in other (much more common) cases. */ If you buy this, we can remove SetSuppressScrollbarUpdate altogether, I think. ;) -Boris _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

