Don't optimize away necessary reflows. Bug 388374, r+sr+a=dbaron

This commit is contained in:
bzbarsky@mit.edu 2007-08-02 15:02:25 -07:00
Родитель f96b378a2e
Коммит 4aa4d5dd92
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -559,15 +559,17 @@ nsListControlFrame::Reflow(nsPresContext* aPresContext,
*
* - We're reflowing with a constrained computed height -- just use that
* height.
* - We're not dirty and have no dirty kids. In this case, our cached max
* height of a child is not going to change.
* - We're not dirty and have no dirty kids and shouldn't be reflowing all
* kids. In this case, our cached max height of a child is not going to
* change.
* - We do our first reflow using our cached max height of a child, then
* compute the new max height and it's the same as the old one.
*/
PRBool autoHeight = (aReflowState.ComputedHeight() == NS_UNCONSTRAINEDSIZE);
mMightNeedSecondPass = autoHeight && NS_SUBTREE_DIRTY(this);
mMightNeedSecondPass = autoHeight &&
(NS_SUBTREE_DIRTY(this) || aReflowState.ShouldReflowAllKids());
nsHTMLReflowState state(aReflowState);
PRInt32 length = GetNumberOfOptions();
@ -637,7 +639,8 @@ nsListControlFrame::ReflowAsDropdown(nsPresContext* aPresContext,
NS_PRECONDITION(aReflowState.ComputedHeight() == NS_UNCONSTRAINEDSIZE,
"We should not have a computed height here!");
mMightNeedSecondPass = NS_SUBTREE_DIRTY(this);
mMightNeedSecondPass = NS_SUBTREE_DIRTY(this) ||
aReflowState.ShouldReflowAllKids();
nscoord oldHeightOfARow = HeightOfARow();