Bug 565904 - "HTMLOptGroupElement and HTMLOptionElement are not form controls but are listed in nsIFormControl" [r=smaug]
authorMounir Lamouri <mounir.lamouri@gmail.com>
Thu, 27 May 2010 06:51:00 -0400
changeset 43118 8406214f84c8
parent 43117 0c87f407797d
child 43119 4153cd536a73
push id13625
push userCallek@gmail.com
push dateSat, 05 Jun 2010 02:02:21 +0000
treeherdermozilla-central@63b89b311461 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs565904
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 565904 - "HTMLOptGroupElement and HTMLOptionElement are not form controls but are listed in nsIFormControl" [r=smaug]
content/html/content/public/nsIFormControl.h
content/html/content/src/nsGenericHTMLElement.cpp
content/html/content/src/nsHTMLFormElement.cpp
embedding/browser/gtk/src/EmbedContextMenuInfo.cpp
--- a/content/html/content/public/nsIFormControl.h
+++ b/content/html/content/public/nsIFormControl.h
@@ -43,18 +43,16 @@ class nsPresState;
 class nsIContent;
 class nsString;
 class nsIFormProcessor;
 class nsFormSubmission;
 
 enum FormControlsTypes {
   NS_FORM_FIELDSET = 1,
   NS_FORM_LABEL,
-  NS_FORM_OPTION,
-  NS_FORM_OPTGROUP,
   NS_FORM_OUTPUT,
   NS_FORM_SELECT,
   NS_FORM_TEXTAREA,
   NS_FORM_OBJECT,
   eFormControlsWithoutSubTypesMax,
   // After this, all types will have sub-types which introduce new enum lists.
   // eFormControlsWithoutSubTypesMax let us know if the previous types values
   // are not overlapping with sub-types/masks.
--- a/content/html/content/src/nsGenericHTMLElement.cpp
+++ b/content/html/content/src/nsGenericHTMLElement.cpp
@@ -2720,18 +2720,16 @@ nsGenericHTMLFormElement::IsSingleLineTe
 PRBool
 nsGenericHTMLFormElement::IsLabelableControl() const
 {
   // Check for non-labelable form controls as they are not numerous.
   // TODO: datalist should be added to this list.
   PRInt32 type = GetType();
   return type != NS_FORM_FIELDSET &&
          type != NS_FORM_LABEL &&
-         type != NS_FORM_OPTION &&
-         type != NS_FORM_OPTGROUP &&
          type != NS_FORM_OBJECT;
 }
 
 PRInt32
 nsGenericHTMLFormElement::IntrinsicState() const
 {
   // If you add attribute-dependent states here, you need to add them them to
   // AfterSetAttr too.  And add them to AfterSetAttr for all subclasses that
--- a/content/html/content/src/nsHTMLFormElement.cpp
+++ b/content/html/content/src/nsHTMLFormElement.cpp
@@ -197,18 +197,16 @@ ShouldBeInElements(nsIFormControl* aForm
     return PR_TRUE;
   }
 
   // These form control types are not supposed to end up in the
   // form.elements array
   //
   // NS_FORM_INPUT_IMAGE
   // NS_FORM_LABEL
-  // NS_FORM_OPTION
-  // NS_FORM_OPTGROUP
 
   return PR_FALSE;
 }
 
 // nsHTMLFormElement implementation
 
 // construction, destruction
 nsGenericHTMLElement*
--- a/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp
+++ b/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp
@@ -219,20 +219,16 @@ EmbedContextMenuInfo::SetFormControlType
         break;
       case NS_FORM_INPUT_SEARCH:
       case NS_FORM_INPUT_TEXT:
       case NS_FORM_INPUT_TEL:
         mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT;
         break;
       case NS_FORM_LABEL:
         break;
-      case NS_FORM_OPTION:
-        break;
-      case NS_FORM_OPTGROUP:
-        break;
       case NS_FORM_SELECT:
         break;
       case NS_FORM_TEXTAREA:
         mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT;
         break;
       case NS_FORM_OBJECT:
         break;
       case NS_FORM_OUTPUT: