Bug 1405830 - Reset aStatus before calling nsHTMLScrollFrame::Reflow() the second time. r=dholbert

nsListControlFrame's Reflow() and ReflowAsDropdown() might need to call
nsHTMLScrollFrame::Reflow() twice. In case that happens, reset aStatus to
ensure nsHTMLScrollFrame::Reflow() always uses a fresh status.

MozReview-Commit-ID: LwdsvRHpCt5

--HG--
extra : rebase_source : 67bbe7c759616be15452913cb1685bfb0fee4fae
This commit is contained in:
Ting-Yu Lin 2017-10-05 17:10:15 +08:00
parent c0799cfa99
commit abaaefa126
3 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,19 @@
<html>
<head>
<style>
#a { display: -webkit-box }
* { column-width: 0em }
</style>
<script>
function go() {
document.body.appendChild(a);
}
</script>
<body onload=go()>
<select id="a" multiple=""></select>
0
Q
-
w
g
k

View File

@ -69,3 +69,4 @@ load 1228670.xhtml
load 1279354.html
load 1388230-1.html
load 1388230-2.html
load 1405830.html

View File

@ -490,6 +490,7 @@ nsListControlFrame::Reflow(nsPresContext* aPresContext,
// XXXbz to make the ascent really correct, we should add our
// mComputedPadding.top to it (and subtract it from descent). Need that
// because nsGfxScrollFrame just adds in the border....
aStatus.Reset();
nsHTMLScrollFrame::Reflow(aPresContext, aDesiredSize, state, aStatus);
}
@ -614,6 +615,7 @@ nsListControlFrame::ReflowAsDropdown(nsPresContext* aPresContext,
mLastDropdownComputedBSize = state.ComputedBSize();
aStatus.Reset();
nsHTMLScrollFrame::Reflow(aPresContext, aDesiredSize, state, aStatus);
}