From 745a4ea21f7166ce1dfd95119bd5d273e1563e5a Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Tue, 12 Feb 2002 15:24:37 +0000 Subject: [PATCH] Override if the computed size is zero Bug 121461 r=dcone sr=attinasi git-svn-id: svn://10.0.0.236/trunk@114284 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsComboboxControlFrame.cpp | 2 +- mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/layout/forms/nsComboboxControlFrame.cpp b/mozilla/layout/forms/nsComboboxControlFrame.cpp index 6161004bb9e..a05fef835eb 100644 --- a/mozilla/layout/forms/nsComboboxControlFrame.cpp +++ b/mozilla/layout/forms/nsComboboxControlFrame.cpp @@ -961,7 +961,7 @@ nsComboboxControlFrame::ReflowCombobox(nsIPresContext * aPresContext, // Fix for Bug 58220 (part of it) // make sure we size correctly if the CSS width is set to something really small like 0, 1, or 2 pixels nscoord computedWidth = aReflowState.mComputedWidth + aBorderPadding.left + aBorderPadding.right; - if (aReflowState.mComputedWidth != NS_UNCONSTRAINEDSIZE && computedWidth <= 0) { + if ((aReflowState.mComputedWidth != NS_UNCONSTRAINEDSIZE && computedWidth <= 0) || aReflowState.mComputedWidth == 0) { nsRect buttonRect(0,0,0,0); nsRect displayRect(0,0,0,0); aBtnWidth = 0; diff --git a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp index 6161004bb9e..a05fef835eb 100644 --- a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp @@ -961,7 +961,7 @@ nsComboboxControlFrame::ReflowCombobox(nsIPresContext * aPresContext, // Fix for Bug 58220 (part of it) // make sure we size correctly if the CSS width is set to something really small like 0, 1, or 2 pixels nscoord computedWidth = aReflowState.mComputedWidth + aBorderPadding.left + aBorderPadding.right; - if (aReflowState.mComputedWidth != NS_UNCONSTRAINEDSIZE && computedWidth <= 0) { + if ((aReflowState.mComputedWidth != NS_UNCONSTRAINEDSIZE && computedWidth <= 0) || aReflowState.mComputedWidth == 0) { nsRect buttonRect(0,0,0,0); nsRect displayRect(0,0,0,0); aBtnWidth = 0;