Bug 846867 - checkVisible() should call scrollIntoView() only if the element is not yet in the viewport, r=mdas