gecko-dev/layout/reftests/scrolling/xul-scrollbar-iterate.html
L. David Baron 57368ff4e7 Bug 1379334 - Make XULScrollFrame test for needing a vertical scrollbar because of the size of the horizontal scrollbar. r=dholbert
This fixes an incremental layout bug, where the number of times we
reflow the frame affects its layout.  This is because we make the
decisions about the vertical scrollbar before the horizontal scrollbar
(and, when making the decision, adjust mHelper.mScrollPort for the size
of the scrollbar).  Thus, in order to avoid a situation where reflowing
the scrollframe once leads us to have no vertical scrollbar, but
reflowing it a second time leads us to add that scrollbar, we need to
retest for the need for a vertical scrollbar after we add the horizontal
one.

(It's possible there are some other missing cases here, but this is the
one that (a) already existed in the code and (b) is needed to fix the
reftest failure on Windows that I got on bug 1308876, in
layout/reftests/text-overflow/xulscroll.html .

The reftest here shows the bug even without bug 1308876 (though I
confirmed that only by loading the test and reference in a nightly
build, not in the reftest harness).  I did test that, in combination
with bug 1308876, the test fails without the patch and passes with the
patch.

MozReview-Commit-ID: LhMi7LbmB6J
2017-07-12 19:37:11 -07:00

28 lines
375 B
HTML

<!DOCTYPE HTML>
<title>XUL scrollbar testcase</title>
<style>
html { overflow: hidden }
div.outer {
display: -moz-box;
overflow: auto;
width: 200px;
height: 100px;
background: yellow;
}
div.inner {
width: 300px;
height: 100px;
min-width: 300px;
min-height: 100px;
background: aqua;
}
</style>
<div class="outer">
<div class="inner">
</div>
</div>