So, here's what's happening. We're actually reflowing three times:
1. Once from nsRefreshDriver::Notify which seems to be a usual refresh event pending in the event queue.
2. Once from nsTypedSelection::ScrollIntoViewEvent::Run which we post when the editing operation is done.
3. Once from nsViewManager::CallWillPaintOnObservers which happens when painting the invalidated area generated in steps 1 and 2.
So, here's what's happening. We're actually reflowing three times:
1. Once from nsRefreshDriver ::Notify which seems to be a usual refresh event pending in the event queue. n::ScrollIntoVi ewEvent: :Run which we post when the editing operation is done. :CallWillPaintO nObservers which happens when painting the invalidated area generated in steps 1 and 2.
2. Once from nsTypedSelectio
3. Once from nsViewManager:
Why we reflow three times really puzzles me...