diff --git a/mozilla/layout/forms/nsFormControlFrame.cpp b/mozilla/layout/forms/nsFormControlFrame.cpp index 2b748ac4a8c..9617e2aab89 100644 --- a/mozilla/layout/forms/nsFormControlFrame.cpp +++ b/mozilla/layout/forms/nsFormControlFrame.cpp @@ -80,15 +80,19 @@ nsFormControlFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr) nscoord nsFormControlFrame::GetIntrinsicWidth() { - // Actual width is set in forms.css - return 0; + // Provide a reasonable default for sites that use an "auto" height. + // Note that if you change this, you should change the values in forms.css + // as well. This is the 13px default width minus the 2px default border. + return nsPresContext::CSSPixelsToAppUnits(13 - 2 * 2); } nscoord nsFormControlFrame::GetIntrinsicHeight() { - // Actual width is set in forms.css - return 0; + // Provide a reasonable default for sites that use an "auto" height. + // Note that if you change this, you should change the values in forms.css + // as well. This is the 13px default width minus the 2px default border. + return nsPresContext::CSSPixelsToAppUnits(13 - 2 * 2); } NS_METHOD diff --git a/mozilla/layout/reftests/bugs/373381-1-ref.html b/mozilla/layout/reftests/bugs/373381-1-ref.html new file mode 100644 index 00000000000..75b3b5bd876 --- /dev/null +++ b/mozilla/layout/reftests/bugs/373381-1-ref.html @@ -0,0 +1,4 @@ + + + + diff --git a/mozilla/layout/reftests/bugs/373381-1.html b/mozilla/layout/reftests/bugs/373381-1.html new file mode 100644 index 00000000000..19d4c860cbe --- /dev/null +++ b/mozilla/layout/reftests/bugs/373381-1.html @@ -0,0 +1,4 @@ + + + + diff --git a/mozilla/layout/reftests/bugs/reftest.list b/mozilla/layout/reftests/bugs/reftest.list index 995dc872be7..8dc3e3b5ec0 100644 --- a/mozilla/layout/reftests/bugs/reftest.list +++ b/mozilla/layout/reftests/bugs/reftest.list @@ -190,3 +190,4 @@ fails == 368504-1.html 368504-1-ref.html # bug 368504 == 371925-1a.html 371925-1-ref.html == 371925-1b.html 371925-1-ref.html == 372553-1.html 372553-1-ref.html +== 373381-1.html 373381-1-ref.html