From 941fb250ab369599d578209b7fec9c32a2501ea1 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Tue, 21 Jun 2005 04:04:12 +0000 Subject: [PATCH] Bug 295571. Make sure we resize the combobox dropdown's view and widget if we reflow the combobox while its dropdown is showing. r+sr=dbaron,a=chofmann --- layout/forms/nsComboboxControlFrame.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index 394150c8d31f..07abb5a6e838 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -641,14 +641,19 @@ nsComboboxControlFrame::ReflowComboChildFrame(nsIFrame* aFrame, viewManager->ResizeView(view, emptyRect); } - // Reflow child + // Allow the child to move/size/change-visibility its view if it's currently + // dropped down + PRInt32 flags = NS_FRAME_NO_MOVE_VIEW | NS_FRAME_NO_VISIBILITY | NS_FRAME_NO_SIZE_VIEW; + if (mDroppedDown) { + flags = 0; + } nsRect rect = aFrame->GetRect(); nsresult rv = ReflowChild(aFrame, aPresContext, aDesiredSize, kidReflowState, - rect.x, rect.y, NS_FRAME_NO_MOVE_VIEW | NS_FRAME_NO_SIZE_VIEW | NS_FRAME_NO_VISIBILITY, aStatus); + rect.x, rect.y, flags, aStatus); // Set the child's width and height to it's desired size FinishReflowChild(aFrame, aPresContext, &kidReflowState, aDesiredSize, - rect.x, rect.y, NS_FRAME_NO_MOVE_VIEW | NS_FRAME_NO_SIZE_VIEW | NS_FRAME_NO_VISIBILITY); + rect.x, rect.y, flags); return rv; }