Bug 1294784: remove special case for 'number' type from HTMLInputElement::SetType; r?smaug draft
authorDecky Coss <coss@cosstropolis.com>
Thu, 11 Aug 2016 16:55:39 -0400
changeset 400224 b79209e0550fd5e6eaf8ea5db67833edd51dbf4a
parent 400147 c4ad5f94a5bc06aa2e6a49d49ab918aa1cea906e
child 528160 5d90821d263534cff68146c4508641246d80a80c
push id26096
push usercoss@cosstropolis.com
push dateFri, 12 Aug 2016 19:01:55 +0000
reviewerssmaug
bugs1294784
milestone51.0a1
Bug 1294784: remove special case for 'number' type from HTMLInputElement::SetType; r?smaug MozReview-Commit-ID: DHW9RfOoHhC
dom/html/HTMLInputElement.h
--- a/dom/html/HTMLInputElement.h
+++ b/dom/html/HTMLInputElement.h
@@ -622,23 +622,16 @@ public:
   {
     SetHTMLAttr(nsGkAtoms::step, aValue, aRv);
   }
 
   // XPCOM GetType() is OK
   void SetType(const nsAString& aValue, ErrorResult& aRv)
   {
     SetHTMLAttr(nsGkAtoms::type, aValue, aRv);
-    if (aValue.EqualsLiteral("number")) {
-      // For NS_FORM_INPUT_NUMBER we rely on having frames to process key
-      // events. Make sure we have them in case someone changes the type of
-      // this element to "number" and then expects to be able to send key
-      // events to it (type changes are rare, so not a big perf issue):
-      FlushFrames();
-    }
   }
 
   // XPCOM GetDefaultValue() is OK
   void SetDefaultValue(const nsAString& aValue, ErrorResult& aRv)
   {
     SetHTMLAttr(nsGkAtoms::value, aValue, aRv);
   }