mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
Remove vestiges of <input type="browse">. Bug 242873, r+sr=peterv
This commit is contained in:
parent
17122cd2e9
commit
cb3f422652
@ -46,7 +46,6 @@ class nsString;
|
|||||||
class nsIFormProcessor;
|
class nsIFormProcessor;
|
||||||
class nsIFormSubmission;
|
class nsIFormSubmission;
|
||||||
|
|
||||||
#define NS_FORM_BROWSE 0
|
|
||||||
#define NS_FORM_BUTTON_BUTTON 1
|
#define NS_FORM_BUTTON_BUTTON 1
|
||||||
#define NS_FORM_BUTTON_RESET 2
|
#define NS_FORM_BUTTON_RESET 2
|
||||||
#define NS_FORM_BUTTON_SUBMIT 3
|
#define NS_FORM_BUTTON_SUBMIT 3
|
||||||
|
@ -1714,7 +1714,6 @@ nsHTMLInputElement::SetParent(nsIContent* aParent)
|
|||||||
// nsIHTMLContent
|
// nsIHTMLContent
|
||||||
|
|
||||||
static const nsHTMLValue::EnumTable kInputTypeTable[] = {
|
static const nsHTMLValue::EnumTable kInputTypeTable[] = {
|
||||||
{ "browse", NS_FORM_BROWSE }, // XXX not valid html, but it is convenient
|
|
||||||
{ "button", NS_FORM_INPUT_BUTTON },
|
{ "button", NS_FORM_INPUT_BUTTON },
|
||||||
{ "checkbox", NS_FORM_INPUT_CHECKBOX },
|
{ "checkbox", NS_FORM_INPUT_CHECKBOX },
|
||||||
{ "file", NS_FORM_INPUT_FILE },
|
{ "file", NS_FORM_INPUT_FILE },
|
||||||
|
@ -91,26 +91,18 @@ nsGfxButtonControlFrame::GetType() const
|
|||||||
|
|
||||||
// Special check for the browse button of a file input.
|
// Special check for the browse button of a file input.
|
||||||
//
|
//
|
||||||
// Since this is actually type "NS_FORM_INPUT_BUTTON", we
|
// We'll return PR_TRUE if type is NS_FORM_INPUT_BUTTON and our parent
|
||||||
// can't tell if it is part of a file input by the type.
|
// is a file input.
|
||||||
// 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
|
|
||||||
PRBool
|
PRBool
|
||||||
nsGfxButtonControlFrame::IsFileBrowseButton(PRInt32 type)
|
nsGfxButtonControlFrame::IsFileBrowseButton(PRInt32 type)
|
||||||
{
|
{
|
||||||
PRBool rv = PR_FALSE;
|
PRBool rv = PR_FALSE;
|
||||||
if (NS_FORM_BROWSE == type) {
|
if (NS_FORM_INPUT_BUTTON == type) {
|
||||||
rv = PR_TRUE;
|
|
||||||
}
|
|
||||||
else if (NS_FORM_INPUT_BUTTON == type) {
|
|
||||||
// Check to see if parent is a file input
|
// Check to see if parent is a file input
|
||||||
nsCOMPtr<nsIFormControl> formCtrl =
|
nsCOMPtr<nsIFormControl> formCtrl =
|
||||||
do_QueryInterface(mContent->GetParent());
|
do_QueryInterface(mContent->GetParent());
|
||||||
|
|
||||||
if (formCtrl && formCtrl->GetType() == NS_FORM_INPUT_FILE) {
|
rv = formCtrl && formCtrl->GetType() == NS_FORM_INPUT_FILE;
|
||||||
rv = PR_TRUE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
@ -91,26 +91,18 @@ nsGfxButtonControlFrame::GetType() const
|
|||||||
|
|
||||||
// Special check for the browse button of a file input.
|
// Special check for the browse button of a file input.
|
||||||
//
|
//
|
||||||
// Since this is actually type "NS_FORM_INPUT_BUTTON", we
|
// We'll return PR_TRUE if type is NS_FORM_INPUT_BUTTON and our parent
|
||||||
// can't tell if it is part of a file input by the type.
|
// is a file input.
|
||||||
// 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
|
|
||||||
PRBool
|
PRBool
|
||||||
nsGfxButtonControlFrame::IsFileBrowseButton(PRInt32 type)
|
nsGfxButtonControlFrame::IsFileBrowseButton(PRInt32 type)
|
||||||
{
|
{
|
||||||
PRBool rv = PR_FALSE;
|
PRBool rv = PR_FALSE;
|
||||||
if (NS_FORM_BROWSE == type) {
|
if (NS_FORM_INPUT_BUTTON == type) {
|
||||||
rv = PR_TRUE;
|
|
||||||
}
|
|
||||||
else if (NS_FORM_INPUT_BUTTON == type) {
|
|
||||||
// Check to see if parent is a file input
|
// Check to see if parent is a file input
|
||||||
nsCOMPtr<nsIFormControl> formCtrl =
|
nsCOMPtr<nsIFormControl> formCtrl =
|
||||||
do_QueryInterface(mContent->GetParent());
|
do_QueryInterface(mContent->GetParent());
|
||||||
|
|
||||||
if (formCtrl && formCtrl->GetType() == NS_FORM_INPUT_FILE) {
|
rv = formCtrl && formCtrl->GetType() == NS_FORM_INPUT_FILE;
|
||||||
rv = PR_TRUE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user