Remove vestiges of <input type="browse">. Bug 242873, r+sr=peterv

This commit is contained in:
bzbarsky%mit.edu 2004-05-11 18:16:41 +00:00
parent 17122cd2e9
commit cb3f422652
4 changed files with 8 additions and 26 deletions

View File

@ -46,7 +46,6 @@ class nsString;
class nsIFormProcessor;
class nsIFormSubmission;
#define NS_FORM_BROWSE 0
#define NS_FORM_BUTTON_BUTTON 1
#define NS_FORM_BUTTON_RESET 2
#define NS_FORM_BUTTON_SUBMIT 3

View File

@ -1714,7 +1714,6 @@ nsHTMLInputElement::SetParent(nsIContent* aParent)
// nsIHTMLContent
static const nsHTMLValue::EnumTable kInputTypeTable[] = {
{ "browse", NS_FORM_BROWSE }, // XXX not valid html, but it is convenient
{ "button", NS_FORM_INPUT_BUTTON },
{ "checkbox", NS_FORM_INPUT_CHECKBOX },
{ "file", NS_FORM_INPUT_FILE },

View File

@ -91,26 +91,18 @@ nsGfxButtonControlFrame::GetType() const
// Special check for the browse button of a file input.
//
// Since this is actually type "NS_FORM_INPUT_BUTTON", we
// can't tell if it is part of a file input by the type.
// We'll return PR_TRUE if either:
// (a) type is NS_FORM_BROWSE or
// (b) type is NS_FORM_INPUT_BUTTON and our parent is a file input
// We'll return PR_TRUE if type is NS_FORM_INPUT_BUTTON and our parent
// is a file input.
PRBool
nsGfxButtonControlFrame::IsFileBrowseButton(PRInt32 type)
{
PRBool rv = PR_FALSE;
if (NS_FORM_BROWSE == type) {
rv = PR_TRUE;
}
else if (NS_FORM_INPUT_BUTTON == type) {
if (NS_FORM_INPUT_BUTTON == type) {
// Check to see if parent is a file input
nsCOMPtr<nsIFormControl> formCtrl =
do_QueryInterface(mContent->GetParent());
if (formCtrl && formCtrl->GetType() == NS_FORM_INPUT_FILE) {
rv = PR_TRUE;
}
rv = formCtrl && formCtrl->GetType() == NS_FORM_INPUT_FILE;
}
return rv;
}

View File

@ -91,26 +91,18 @@ nsGfxButtonControlFrame::GetType() const
// Special check for the browse button of a file input.
//
// Since this is actually type "NS_FORM_INPUT_BUTTON", we
// can't tell if it is part of a file input by the type.
// We'll return PR_TRUE if either:
// (a) type is NS_FORM_BROWSE or
// (b) type is NS_FORM_INPUT_BUTTON and our parent is a file input
// We'll return PR_TRUE if type is NS_FORM_INPUT_BUTTON and our parent
// is a file input.
PRBool
nsGfxButtonControlFrame::IsFileBrowseButton(PRInt32 type)
{
PRBool rv = PR_FALSE;
if (NS_FORM_BROWSE == type) {
rv = PR_TRUE;
}
else if (NS_FORM_INPUT_BUTTON == type) {
if (NS_FORM_INPUT_BUTTON == type) {
// Check to see if parent is a file input
nsCOMPtr<nsIFormControl> formCtrl =
do_QueryInterface(mContent->GetParent());
if (formCtrl && formCtrl->GetType() == NS_FORM_INPUT_FILE) {
rv = PR_TRUE;
}
rv = formCtrl && formCtrl->GetType() == NS_FORM_INPUT_FILE;
}
return rv;
}