diff --git a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp index 2fd727e9649..1ab551a26ba 100644 --- a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp @@ -347,7 +347,6 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext, // Indent the child inside us by the focus border. We must do this separate // from the regular border. availSize.width -= aFocusPadding.LeftRight(); - availSize.width = PR_MAX(availSize.width,0); // See whether out availSize's width is big enough. If it's smaller than our // intrinsic min width, that means that the kid wouldn't really fit; for a @@ -367,6 +366,7 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext, xoffset -= extraleft; availSize.width += extraleft + extraright; } + availSize.width = PR_MAX(availSize.width,0); nsHTMLReflowState reflowState(aPresContext, aReflowState, aFirstKid, availSize); diff --git a/mozilla/layout/reftests/bugs/180085-2-ref.html b/mozilla/layout/reftests/bugs/180085-2-ref.html new file mode 100644 index 00000000000..48e106b089d --- /dev/null +++ b/mozilla/layout/reftests/bugs/180085-2-ref.html @@ -0,0 +1,35 @@ + + + + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + + diff --git a/mozilla/layout/reftests/bugs/180085-2.html b/mozilla/layout/reftests/bugs/180085-2.html new file mode 100644 index 00000000000..66d3be296af --- /dev/null +++ b/mozilla/layout/reftests/bugs/180085-2.html @@ -0,0 +1,34 @@ + + + + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + diff --git a/mozilla/layout/reftests/bugs/reftest.list b/mozilla/layout/reftests/bugs/reftest.list index 90b643b281e..7deb5d28f3a 100644 --- a/mozilla/layout/reftests/bugs/reftest.list +++ b/mozilla/layout/reftests/bugs/reftest.list @@ -73,7 +73,8 @@ fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 28811-2a.html 28811-2-ref.html # bug 38 == 163504-2b.html 163504-2-ref.html == 169749-1.html 169749-1-ref.html == 172073-1.html 172073-1-ref.html -fails == 180085-1.html 180085-1-ref.html +== 180085-1.html 180085-1-ref.html +== 180085-2.html 180085-2-ref.html == 185388-1.html 185388-1-ref.html == 201215-1.html 201215-1-ref.html == 206516-1.html 206516-1-ref.html