gecko/layout/reftests/scrolling/subpixel-1-ref.html
Robert O'Callahan 2bbcb226e2 Bug 754556. Ensure that setting scroll positions in CSS pixels doesn't unexpectedly move the scroll position, especially not in the wrong direction. r=matspal
If the current scroll position is fractional, e.g. y=N.4 CSS pixels, and something tries to read the
position in CSS pixels and scroll to that position (e.g. calling window.scrollTo(0, rootElem.scrollTop),
or equivalently window.scrollBy(0, 0)), it can actually end up scrolling backwards. So create a new
method nsIScrollableFrame::ScrollToCSSPixels which ensures that scrolling to a CSS pixel offset tries to
preserve the current fractional scroll position if that's possible, and if that's not possible at least does
not allow the scroll position to move in the wrong direction.
2012-05-15 17:58:09 +12:00

8 lines
162 B
HTML

<!DOCTYPE HTML>
<html>
<body style="margin:0">
<div style="height:1205.6px"></div>
<div id="d" style="height:0.6px; background:red"></div>
</body>
</html>