Overlay scrollbars don't take any space, so the setVerticalScrollbarMode/setHorizontalScrollbarMode stuff that FrameView::layout() does is a waste of time.
*** Bug 113734 has been marked as a duplicate of this bug. ***
I think bug 121267 will fix the main issue here.