From 33a123151f2c193a9be2df9f1124525b8fd2b0f2 Mon Sep 17 00:00:00 2001 From: "sharparrow1%yahoo.com" Date: Wed, 14 Mar 2007 02:47:05 +0000 Subject: [PATCH] Bug 373381: Rendering of radios/checkboxes with auto width has regressed. r+sr=roc. git-svn-id: svn://10.0.0.236/trunk@221862 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsFormControlFrame.cpp | 12 ++++++++---- mozilla/layout/reftests/bugs/373381-1-ref.html | 4 ++++ mozilla/layout/reftests/bugs/373381-1.html | 4 ++++ mozilla/layout/reftests/bugs/reftest.list | 1 + 4 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 mozilla/layout/reftests/bugs/373381-1-ref.html create mode 100644 mozilla/layout/reftests/bugs/373381-1.html 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