repaint and reflow