From c0f7402b618248cc1437b92ea33482718f156ba8 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Thu, 1 Sep 2005 18:58:31 +0000 Subject: [PATCH] Restore disabled state for all form controls. Bug 306616, r+sr=peterv --- content/html/content/src/nsHTMLInputElement.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/content/html/content/src/nsHTMLInputElement.cpp b/content/html/content/src/nsHTMLInputElement.cpp index 6efd7f5e97c..67da114406b 100644 --- a/content/html/content/src/nsHTMLInputElement.cpp +++ b/content/html/content/src/nsHTMLInputElement.cpp @@ -2441,18 +2441,10 @@ nsHTMLInputElement::DoneCreatingElement() SET_BOOLBIT(mBitField, BF_PARSER_CREATING, PR_FALSE); // - // Restore state for checkbox, radio, text and file + // Restore state as needed. Note that disabled state applies to all control + // types. // - PRBool restoredCheckedState = PR_FALSE; - switch (mType) { - case NS_FORM_INPUT_CHECKBOX: - case NS_FORM_INPUT_RADIO: - case NS_FORM_INPUT_TEXT: - case NS_FORM_INPUT_FILE: - case NS_FORM_INPUT_HIDDEN: - restoredCheckedState = RestoreFormControlState(this, this); - break; - } + PRBool restoredCheckedState = RestoreFormControlState(this, this); // // If restore does not occur, we initialize .checked using the CHECKED