I noticed a bug in the debugger scrolling in DHTML, after Max's change to text measurement callbacks. See LPP-8862. It looked like a race condition where the code was not getting an updated scroll height after it adds text to the debugger's output text window.
The weird thing is that there is already code in the debugger to wait a frame to defer looking at the text scrollheight. In DHTML. It uses the lz.Idle.callOnIdle to wait a frame and then look at the scrollheight. When I changed it to use lz.Timer.addTimer() to call itself back, instead of callOnIdle(), then the bug went away. The difference, I think, is in the kernel implentation, callOnIdle uses setInterval(), whereas addTimer uses setTimeout(). I'm not sure what implications this has for us, but maybe it means we should be careful to use setTimeout in the DHTML runtime when we want these layout callbacks to work properly, rather relying on anything that uses setInterval. -- Henry Minsky Software Architect [email protected]
